@arkxos/arkos-app-gateway-manage 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/ark_dist/ark-meta.json +14 -14
  2. package/ark_dist/css/views/{views-CreateGateway.41b2bde6.css → views-CreateGateway.6fbb1ad6.css} +7 -7
  3. package/ark_dist/index.html +3 -3
  4. package/ark_dist/js/app.b656f470.js +2 -0
  5. package/ark_dist/js/app.b656f470.js.map +1 -0
  6. package/ark_dist/js/views/views-CreateGateway.11d048ca.js +3 -0
  7. package/ark_dist/js/views/views-CreateGateway.11d048ca.js.LICENSE.txt +1 -0
  8. package/ark_dist/js/views/views-CreateGateway.11d048ca.js.map +1 -0
  9. package/package.json +159 -156
  10. package/src/api/gateway-manage/client_api.js +6 -6
  11. package/src/api/gateway-manage/open_client.js +8 -8
  12. package/src/component/BoxCard.vue +4 -4
  13. package/src/component/ClientInfo.vue +1 -1
  14. package/src/component/GroovyScriptTable.vue +6 -6
  15. package/src/component/RouteInfo.vue +5 -5
  16. package/src/component/RouteRequestCount.vue +1 -1
  17. package/src/views/AddClientGateway.vue +7 -7
  18. package/src/views/AddGatewayClient.vue +6 -6
  19. package/src/views/AddGroovyScript.vue +6 -6
  20. package/src/views/ApiCount.vue +1 -1
  21. package/src/views/ApiDoc.vue +5 -5
  22. package/src/views/ApiMonitor.vue +29 -29
  23. package/src/views/CreateBalanced.vue +4 -4
  24. package/src/views/CreateClient.vue +7 -7
  25. package/src/views/CreateGateway.vue +30 -30
  26. package/src/views/IpList.vue +5 -5
  27. package/ark_dist/js/app.e014b7a5.js +0 -1
  28. package/ark_dist/js/views/views-CreateGateway.7db295a9.js +0 -3
  29. package/ark_dist/js/views/views-CreateGateway.7db295a9.js.LICENSE.txt +0 -1
  30. package/ark_dist/js/views/views-CreateGateway.7db295a9.js.map +0 -1
@@ -1,3 +0,0 @@
1
- /*! For license information please see views-CreateGateway.7db295a9.js.LICENSE.txt */
2
- (self["helJsonp_@arkxos/arkos-app-gateway-manage_1748945817316"]=self["helJsonp_@arkxos/arkos-app-gateway-manage_1748945817316"]||[]).push([[834],{2786:function(e,t,o){var a=o(5792),l=o(6825),r=TypeError;e.exports=function(e){if(a(e))return e;throw r(l(e)+" is not a function")}},7829:function(e,t,o){var a=o(4588),l=TypeError;e.exports=function(e,t){if(a(t,e))return e;throw l("Incorrect invocation")}},3987:function(e,t,o){var a=o(4079),l=String,r=TypeError;e.exports=function(e){if(a(e))return e;throw r(l(e)+" is not an object")}},3132:function(e,t,o){var a=o(3286),l=o(2212),r=o(4818),n=function(e){return function(t,o,n){var i,d=a(t),c=r(d),s=l(n,c);if(e&&o!=o){for(;c>s;)if((i=d[s++])!=i)return!0}else for(;c>s;s++)if((e||s in d)&&d[s]===o)return e||s||0;return!e&&-1}};e.exports={includes:n(!0),indexOf:n(!1)}},5054:function(e,t,o){"use strict";var a=o(3950),l=o(1188),r=TypeError,n=Object.getOwnPropertyDescriptor,i=a&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=i?function(e,t){if(l(e)&&!n(e,"length").writable)throw r("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},3406:function(e,t,o){var a=o(3987),l=o(2820);e.exports=function(e,t,o,r){try{return r?t(a(o)[0],o[1]):t(o)}catch(t){l(e,"throw",t)}}},5857:function(e,t,o){var a=o(2585),l=a({}.toString),r=a("".slice);e.exports=function(e){return r(l(e),8,-1)}},9806:function(e,t,o){var a=o(4345),l=o(5792),r=o(5857),n=o(3823)("toStringTag"),i=Object,d="Arguments"==r(function(){return arguments}());e.exports=a?r:function(e){var t,o,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(o=function(e,t){try{return e[t]}catch(e){}}(t=i(e),n))?o:d?r(t):"Object"==(a=r(t))&&l(t.callee)?"Arguments":a}},5700:function(e,t,o){var a=o(8609),l=o(8466),r=o(7844),n=o(2612);e.exports=function(e,t,o){for(var i=l(t),d=n.f,c=r.f,s=0;s<i.length;s++){var u=i[s];a(e,u)||o&&a(o,u)||d(e,u,c(t,u))}}},2169:function(e,t,o){var a=o(1128);e.exports=!a((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},7496:function(e){e.exports=function(e,t){return{value:e,done:t}}},4575:function(e,t,o){var a=o(3950),l=o(2612),r=o(3455);e.exports=a?function(e,t,o){return l.f(e,t,r(1,o))}:function(e,t,o){return e[t]=o,e}},3455:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},9846:function(e,t,o){var a=o(5792),l=o(2612),r=o(8258),n=o(5032);e.exports=function(e,t,o,i){i||(i={});var d=i.enumerable,c=void 0!==i.name?i.name:t;if(a(o)&&r(o,c,i),i.global)d?e[t]=o:n(t,o);else{try{i.unsafe?e[t]&&(d=!0):delete e[t]}catch(e){}d?e[t]=o:l.f(e,t,{value:o,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return e}},4558:function(e,t,o){var a=o(9846);e.exports=function(e,t,o){for(var l in t)a(e,l,t[l],o);return e}},5032:function(e,t,o){var a=o(2087),l=Object.defineProperty;e.exports=function(e,t){try{l(a,e,{value:t,configurable:!0,writable:!0})}catch(o){a[e]=t}return t}},3950:function(e,t,o){var a=o(1128);e.exports=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},1245:function(e){var t="object"==typeof document&&document.all,o=void 0===t&&void 0!==t;e.exports={all:t,IS_HTMLDDA:o}},2530:function(e,t,o){var a=o(2087),l=o(4079),r=a.document,n=l(r)&&l(r.createElement);e.exports=function(e){return n?r.createElement(e):{}}},7435:function(e){var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},9355:function(e){e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},6797:function(e,t,o){var a,l,r=o(2087),n=o(9355),i=r.process,d=r.Deno,c=i&&i.versions||d&&d.version,s=c&&c.v8;s&&(l=(a=s.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1])),!l&&n&&(!(a=n.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=n.match(/Chrome\/(\d+)/))&&(l=+a[1]),e.exports=l},7054:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8982:function(e,t,o){var a=o(2087),l=o(7844).f,r=o(4575),n=o(9846),i=o(5032),d=o(5700),c=o(9801);e.exports=function(e,t){var o,s,u,m,p,h=e.target,f=e.global,V=e.stat;if(o=f?a:V?a[h]||i(h,{}):(a[h]||{}).prototype)for(s in t){if(m=t[s],u=e.dontCallGetSet?(p=l(o,s))&&p.value:o[s],!c(f?s:h+(V?".":"#")+s,e.forced)&&void 0!==u){if(typeof m==typeof u)continue;d(m,u)}(e.sham||u&&u.sham)&&r(m,"sham",!0),n(o,s,m,e)}}},1128:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},3571:function(e,t,o){var a=o(9722),l=o(2786),r=o(1037),n=a(a.bind);e.exports=function(e,t){return l(e),void 0===t?e:r?n(e,t):function(){return e.apply(t,arguments)}}},1037:function(e,t,o){var a=o(1128);e.exports=!a((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},1739:function(e,t,o){var a=o(1037),l=Function.prototype.call;e.exports=a?l.bind(l):function(){return l.apply(l,arguments)}},4052:function(e,t,o){var a=o(3950),l=o(8609),r=Function.prototype,n=a&&Object.getOwnPropertyDescriptor,i=l(r,"name"),d=i&&"something"===function(){}.name,c=i&&(!a||a&&n(r,"name").configurable);e.exports={EXISTS:i,PROPER:d,CONFIGURABLE:c}},9722:function(e,t,o){var a=o(5857),l=o(2585);e.exports=function(e){if("Function"===a(e))return l(e)}},2585:function(e,t,o){var a=o(1037),l=Function.prototype,r=l.call,n=a&&l.bind.bind(r,r);e.exports=a?n:function(e){return function(){return r.apply(e,arguments)}}},3661:function(e,t,o){var a=o(2087),l=o(5792);e.exports=function(e,t){return arguments.length<2?(o=a[e],l(o)?o:void 0):a[e]&&a[e][t];var o}},4180:function(e,t,o){var a=o(2786),l=o(3987);e.exports=function(e){return{iterator:e,next:a(l(e).next)}}},4521:function(e,t,o){var a=o(9806),l=o(7839),r=o(6989),n=o(3858),i=o(3823)("iterator");e.exports=function(e){if(!r(e))return l(e,i)||l(e,"@@iterator")||n[a(e)]}},4194:function(e,t,o){var a=o(1739),l=o(2786),r=o(3987),n=o(6825),i=o(4521),d=TypeError;e.exports=function(e,t){var o=arguments.length<2?i(e):t;if(l(o))return r(a(o,e));throw d(n(e)+" is not iterable")}},7839:function(e,t,o){var a=o(2786),l=o(6989);e.exports=function(e,t){var o=e[t];return l(o)?void 0:a(o)}},2087:function(e,t,o){var a=function(e){return e&&e.Math==Math&&e};e.exports=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof o.g&&o.g)||function(){return this}()||Function("return this")()},8609:function(e,t,o){var a=o(2585),l=o(4546),r=a({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return r(l(e),t)}},4132:function(e){e.exports={}},9999:function(e,t,o){var a=o(3661);e.exports=a("document","documentElement")},1422:function(e,t,o){var a=o(3950),l=o(1128),r=o(2530);e.exports=!a&&!l((function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},3502:function(e,t,o){var a=o(2585),l=o(1128),r=o(5857),n=Object,i=a("".split);e.exports=l((function(){return!n("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?i(e,""):n(e)}:n},234:function(e,t,o){var a=o(2585),l=o(5792),r=o(6222),n=a(Function.toString);l(r.inspectSource)||(r.inspectSource=function(e){return n(e)}),e.exports=r.inspectSource},2840:function(e,t,o){var a,l,r,n=o(740),i=o(2087),d=o(4079),c=o(4575),s=o(8609),u=o(6222),m=o(5550),p=o(4132),h="Object already initialized",f=i.TypeError,V=i.WeakMap;if(n||u.state){var g=u.state||(u.state=new V);g.get=g.get,g.has=g.has,g.set=g.set,a=function(e,t){if(g.has(e))throw f(h);return t.facade=e,g.set(e,t),t},l=function(e){return g.get(e)||{}},r=function(e){return g.has(e)}}else{var N=m("state");p[N]=!0,a=function(e,t){if(s(e,N))throw f(h);return t.facade=e,c(e,N,t),t},l=function(e){return s(e,N)?e[N]:{}},r=function(e){return s(e,N)}}e.exports={set:a,get:l,has:r,enforce:function(e){return r(e)?l(e):a(e,{})},getterFor:function(e){return function(t){var o;if(!d(t)||(o=l(t)).type!==e)throw f("Incompatible receiver, "+e+" required");return o}}}},5746:function(e,t,o){var a=o(3823),l=o(3858),r=a("iterator"),n=Array.prototype;e.exports=function(e){return void 0!==e&&(l.Array===e||n[r]===e)}},1188:function(e,t,o){var a=o(5857);e.exports=Array.isArray||function(e){return"Array"==a(e)}},5792:function(e,t,o){var a=o(1245),l=a.all;e.exports=a.IS_HTMLDDA?function(e){return"function"==typeof e||e===l}:function(e){return"function"==typeof e}},9801:function(e,t,o){var a=o(1128),l=o(5792),r=/#|\.prototype\./,n=function(e,t){var o=d[i(e)];return o==s||o!=c&&(l(t)?a(t):!!t)},i=n.normalize=function(e){return String(e).replace(r,".").toLowerCase()},d=n.data={},c=n.NATIVE="N",s=n.POLYFILL="P";e.exports=n},6989:function(e){e.exports=function(e){return null==e}},4079:function(e,t,o){var a=o(5792),l=o(1245),r=l.all;e.exports=l.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:a(e)||e===r}:function(e){return"object"==typeof e?null!==e:a(e)}},2077:function(e){e.exports=!1},77:function(e,t,o){var a=o(3661),l=o(5792),r=o(4588),n=o(8605),i=Object;e.exports=n?function(e){return"symbol"==typeof e}:function(e){var t=a("Symbol");return l(t)&&r(t.prototype,i(e))}},7240:function(e,t,o){var a=o(3571),l=o(1739),r=o(3987),n=o(6825),i=o(5746),d=o(4818),c=o(4588),s=o(4194),u=o(4521),m=o(2820),p=TypeError,h=function(e,t){this.stopped=e,this.result=t},f=h.prototype;e.exports=function(e,t,o){var V,g,N,w,C,x,v,y=o&&o.that,b=!(!o||!o.AS_ENTRIES),k=!(!o||!o.IS_RECORD),_=!(!o||!o.IS_ITERATOR),E=!(!o||!o.INTERRUPTED),T=a(t,y),S=function(e){return V&&m(V,"normal",e),new h(!0,e)},z=function(e){return b?(r(e),E?T(e[0],e[1],S):T(e[0],e[1])):E?T(e,S):T(e)};if(k)V=e.iterator;else if(_)V=e;else{if(!(g=u(e)))throw p(n(e)+" is not iterable");if(i(g)){for(N=0,w=d(e);w>N;N++)if((C=z(e[N]))&&c(f,C))return C;return new h(!1)}V=s(e,g)}for(x=k?e.next:V.next;!(v=l(x,V)).done;){try{C=z(v.value)}catch(e){m(V,"throw",e)}if("object"==typeof C&&C&&c(f,C))return C}return new h(!1)}},2820:function(e,t,o){var a=o(1739),l=o(3987),r=o(7839);e.exports=function(e,t,o){var n,i;l(e);try{if(!(n=r(e,"return"))){if("throw"===t)throw o;return o}n=a(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw o;if(i)throw n;return l(n),o}},7537:function(e,t,o){"use strict";var a=o(1739),l=o(9290),r=o(4575),n=o(4558),i=o(3823),d=o(2840),c=o(7839),s=o(2155).IteratorPrototype,u=o(7496),m=o(2820),p=i("toStringTag"),h="IteratorHelper",f="WrapForValidIterator",V=d.set,g=function(e){var t=d.getterFor(e?f:h);return n(l(s),{next:function(){var o=t(this);if(e)return o.nextHandler();try{var a=o.done?void 0:o.nextHandler();return u(a,o.done)}catch(e){throw o.done=!0,e}},return:function(){var o=t(this),l=o.iterator;if(o.done=!0,e){var r=c(l,"return");return r?a(r,l):u(void 0,!0)}if(o.inner)try{m(o.inner.iterator,"normal")}catch(e){return m(l,"throw",e)}return m(l,"normal"),u(void 0,!0)}})},N=g(!0),w=g(!1);r(w,p,"Iterator Helper"),e.exports=function(e,t){var o=function(o,a){a?(a.iterator=o.iterator,a.next=o.next):a=o,a.type=t?f:h,a.nextHandler=e,a.counter=0,a.done=!1,V(this,a)};return o.prototype=t?N:w,o}},7445:function(e,t,o){"use strict";var a=o(1739),l=o(2786),r=o(3987),n=o(4180),i=o(7537),d=o(3406),c=i((function(){var e=this.iterator,t=r(a(this.next,e));if(!(this.done=!!t.done))return d(e,this.mapper,[t.value,this.counter++],!0)}));e.exports=function(e){return new c(n(this),{mapper:l(e)})}},2155:function(e,t,o){"use strict";var a,l,r,n=o(1128),i=o(5792),d=o(4079),c=o(9290),s=o(2733),u=o(9846),m=o(3823),p=o(2077),h=m("iterator"),f=!1;[].keys&&("next"in(r=[].keys())?(l=s(s(r)))!==Object.prototype&&(a=l):f=!0),!d(a)||n((function(){var e={};return a[h].call(e)!==e}))?a={}:p&&(a=c(a)),i(a[h])||u(a,h,(function(){return this})),e.exports={IteratorPrototype:a,BUGGY_SAFARI_ITERATORS:f}},3858:function(e){e.exports={}},4818:function(e,t,o){var a=o(3122);e.exports=function(e){return a(e.length)}},8258:function(e,t,o){var a=o(2585),l=o(1128),r=o(5792),n=o(8609),i=o(3950),d=o(4052).CONFIGURABLE,c=o(234),s=o(2840),u=s.enforce,m=s.get,p=String,h=Object.defineProperty,f=a("".slice),V=a("".replace),g=a([].join),N=i&&!l((function(){return 8!==h((function(){}),"length",{value:8}).length})),w=String(String).split("String"),C=e.exports=function(e,t,o){"Symbol("===f(p(t),0,7)&&(t="["+V(p(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),o&&o.getter&&(t="get "+t),o&&o.setter&&(t="set "+t),(!n(e,"name")||d&&e.name!==t)&&(i?h(e,"name",{value:t,configurable:!0}):e.name=t),N&&o&&n(o,"arity")&&e.length!==o.arity&&h(e,"length",{value:o.arity});try{o&&n(o,"constructor")&&o.constructor?i&&h(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var a=u(e);return n(a,"source")||(a.source=g(w,"string"==typeof t?t:"")),e};Function.prototype.toString=C((function(){return r(this)&&m(this).source||c(this)}),"toString")},2504:function(e){var t=Math.ceil,o=Math.floor;e.exports=Math.trunc||function(e){var a=+e;return(a>0?o:t)(a)}},9290:function(e,t,o){var a,l=o(3987),r=o(3867),n=o(7054),i=o(4132),d=o(9999),c=o(2530),s=o(5550),u="prototype",m="script",p=s("IE_PROTO"),h=function(){},f=function(e){return"<"+m+">"+e+"</"+m+">"},V=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){try{a=new ActiveXObject("htmlfile")}catch(e){}var e,t,o;g="undefined"!=typeof document?document.domain&&a?V(a):(t=c("iframe"),o="java"+m+":",t.style.display="none",d.appendChild(t),t.src=String(o),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F):V(a);for(var l=n.length;l--;)delete g[u][n[l]];return g()};i[p]=!0,e.exports=Object.create||function(e,t){var o;return null!==e?(h[u]=l(e),o=new h,h[u]=null,o[p]=e):o=g(),void 0===t?o:r.f(o,t)}},3867:function(e,t,o){var a=o(3950),l=o(2055),r=o(2612),n=o(3987),i=o(3286),d=o(3417);t.f=a&&!l?Object.defineProperties:function(e,t){n(e);for(var o,a=i(t),l=d(t),c=l.length,s=0;c>s;)r.f(e,o=l[s++],a[o]);return e}},2612:function(e,t,o){var a=o(3950),l=o(1422),r=o(2055),n=o(3987),i=o(3750),d=TypeError,c=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",m="configurable",p="writable";t.f=a?r?function(e,t,o){if(n(e),t=i(t),n(o),"function"==typeof e&&"prototype"===t&&"value"in o&&p in o&&!o[p]){var a=s(e,t);a&&a[p]&&(e[t]=o.value,o={configurable:m in o?o[m]:a[m],enumerable:u in o?o[u]:a[u],writable:!1})}return c(e,t,o)}:c:function(e,t,o){if(n(e),t=i(t),n(o),l)try{return c(e,t,o)}catch(e){}if("get"in o||"set"in o)throw d("Accessors not supported");return"value"in o&&(e[t]=o.value),e}},7844:function(e,t,o){var a=o(3950),l=o(1739),r=o(6755),n=o(3455),i=o(3286),d=o(3750),c=o(8609),s=o(1422),u=Object.getOwnPropertyDescriptor;t.f=a?u:function(e,t){if(e=i(e),t=d(t),s)try{return u(e,t)}catch(e){}if(c(e,t))return n(!l(r.f,e,t),e[t])}},127:function(e,t,o){var a=o(6911),l=o(7054).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return a(e,l)}},6075:function(e,t){t.f=Object.getOwnPropertySymbols},2733:function(e,t,o){var a=o(8609),l=o(5792),r=o(4546),n=o(5550),i=o(2169),d=n("IE_PROTO"),c=Object,s=c.prototype;e.exports=i?c.getPrototypeOf:function(e){var t=r(e);if(a(t,d))return t[d];var o=t.constructor;return l(o)&&t instanceof o?o.prototype:t instanceof c?s:null}},4588:function(e,t,o){var a=o(2585);e.exports=a({}.isPrototypeOf)},6911:function(e,t,o){var a=o(2585),l=o(8609),r=o(3286),n=o(3132).indexOf,i=o(4132),d=a([].push);e.exports=function(e,t){var o,a=r(e),c=0,s=[];for(o in a)!l(i,o)&&l(a,o)&&d(s,o);for(;t.length>c;)l(a,o=t[c++])&&(~n(s,o)||d(s,o));return s}},3417:function(e,t,o){var a=o(6911),l=o(7054);e.exports=Object.keys||function(e){return a(e,l)}},6755:function(e,t){"use strict";var o={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,l=a&&!o.call({1:2},1);t.f=l?function(e){var t=a(this,e);return!!t&&t.enumerable}:o},9778:function(e,t,o){var a=o(1739),l=o(5792),r=o(4079),n=TypeError;e.exports=function(e,t){var o,i;if("string"===t&&l(o=e.toString)&&!r(i=a(o,e)))return i;if(l(o=e.valueOf)&&!r(i=a(o,e)))return i;if("string"!==t&&l(o=e.toString)&&!r(i=a(o,e)))return i;throw n("Can't convert object to primitive value")}},8466:function(e,t,o){var a=o(3661),l=o(2585),r=o(127),n=o(6075),i=o(3987),d=l([].concat);e.exports=a("Reflect","ownKeys")||function(e){var t=r.f(i(e)),o=n.f;return o?d(t,o(e)):t}},9658:function(e,t,o){var a=o(6989),l=TypeError;e.exports=function(e){if(a(e))throw l("Can't call method on "+e);return e}},5550:function(e,t,o){var a=o(4221),l=o(9609),r=a("keys");e.exports=function(e){return r[e]||(r[e]=l(e))}},6222:function(e,t,o){var a=o(2087),l=o(5032),r="__core-js_shared__",n=a[r]||l(r,{});e.exports=n},4221:function(e,t,o){var a=o(2077),l=o(6222);(e.exports=function(e,t){return l[e]||(l[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.29.0",mode:a?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE",source:"https://github.com/zloirock/core-js"})},7446:function(e,t,o){var a=o(6797),l=o(1128);e.exports=!!Object.getOwnPropertySymbols&&!l((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&a&&a<41}))},2212:function(e,t,o){var a=o(4585),l=Math.max,r=Math.min;e.exports=function(e,t){var o=a(e);return o<0?l(o+t,0):r(o,t)}},3286:function(e,t,o){var a=o(3502),l=o(9658);e.exports=function(e){return a(l(e))}},4585:function(e,t,o){var a=o(2504);e.exports=function(e){var t=+e;return t!=t||0===t?0:a(t)}},3122:function(e,t,o){var a=o(4585),l=Math.min;e.exports=function(e){return e>0?l(a(e),9007199254740991):0}},4546:function(e,t,o){var a=o(9658),l=Object;e.exports=function(e){return l(a(e))}},1517:function(e,t,o){var a=o(1739),l=o(4079),r=o(77),n=o(7839),i=o(9778),d=o(3823),c=TypeError,s=d("toPrimitive");e.exports=function(e,t){if(!l(e)||r(e))return e;var o,d=n(e,s);if(d){if(void 0===t&&(t="default"),o=a(d,e,t),!l(o)||r(o))return o;throw c("Can't convert object to primitive value")}return void 0===t&&(t="number"),i(e,t)}},3750:function(e,t,o){var a=o(1517),l=o(77);e.exports=function(e){var t=a(e,"string");return l(t)?t:t+""}},4345:function(e,t,o){var a={};a[o(3823)("toStringTag")]="z",e.exports="[object z]"===String(a)},6825:function(e){var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},9609:function(e,t,o){var a=o(2585),l=0,r=Math.random(),n=a(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+n(++l+r,36)}},8605:function(e,t,o){var a=o(7446);e.exports=a&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},2055:function(e,t,o){var a=o(3950),l=o(1128);e.exports=a&&l((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},740:function(e,t,o){var a=o(2087),l=o(5792),r=a.WeakMap;e.exports=l(r)&&/native code/.test(String(r))},3823:function(e,t,o){var a=o(2087),l=o(4221),r=o(8609),n=o(9609),i=o(7446),d=o(8605),c=a.Symbol,s=l("wks"),u=d?c.for||c:c&&c.withoutSetter||n;e.exports=function(e){return r(s,e)||(s[e]=i&&r(c,e)?c[e]:u("Symbol."+e)),s[e]}},3789:function(e,t,o){"use strict";var a=o(8982),l=o(4546),r=o(4818),n=o(5054),i=o(7435);a({target:"Array",proto:!0,arity:1,forced:o(1128)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=l(this),o=r(t),a=arguments.length;i(o+a);for(var d=0;d<a;d++)t[o]=arguments[d],o++;return n(t,o),o}})},6087:function(e,t,o){"use strict";var a=o(8982),l=o(2087),r=o(7829),n=o(5792),i=o(4575),d=o(1128),c=o(8609),s=o(3823),u=o(2155).IteratorPrototype,m=o(2077),p=s("toStringTag"),h=l.Iterator,f=m||!n(h)||h.prototype!==u||!d((function(){h({})})),V=function(){r(this,u)};c(u,p)||i(u,p,"Iterator"),!f&&c(u,"constructor")&&u.constructor!==Object||i(u,"constructor",V),V.prototype=u,a({global:!0,constructor:!0,forced:f},{Iterator:V})},4816:function(e,t,o){"use strict";var a=o(8982),l=o(1739),r=o(2786),n=o(3987),i=o(4180),d=o(7537),c=o(3406),s=d((function(){for(var e,t,o=this.iterator,a=this.predicate,r=this.next;;){if(e=n(l(r,o)),this.done=!!e.done)return;if(t=e.value,c(o,a,[t,this.counter++],!0))return t}}));a({target:"Iterator",proto:!0,real:!0},{filter:function(e){return new s(i(this),{predicate:r(e)})}})},8602:function(e,t,o){"use strict";var a=o(8982),l=o(7240),r=o(2786),n=o(4180);a({target:"Iterator",proto:!0,real:!0},{forEach:function(e){var t=n(this),o=0;r(e),l(t,(function(t){e(t,o++)}),{IS_RECORD:!0})}})},5311:function(e,t,o){o(8982)({target:"Iterator",proto:!0,real:!0},{map:o(7445)})},2653:function(e,t){"use strict";t.Z=(e,t)=>{const o=e.__vccOpts||e;for(const[e,a]of t)o[e]=a;return o}},1811:function(e,t,o){"use strict";o.d(t,{BO:function(){return n},EO:function(){return s},M5:function(){return c},M8:function(){return i},d0:function(){return r},hm:function(){return u},ok:function(){return l},zH:function(){return d}});var a=o(2310);const l=e=>(0,a.WY)({url:"/gateway-manage/balanced/add",method:"post",data:e}),r=e=>(0,a.WY)({url:"/gateway-manage/balanced/delete",method:"get",data:e}),n=e=>(0,a.WY)({url:"/gateway-manage/balanced/update",method:"post",data:e}),i=e=>(0,a.WY)({url:"/gateway-manage/balanced/pageList",method:"post",data:e}),d=e=>(0,a.WY)({url:"/gateway-manage/balanced/start",method:"get",data:e}),c=e=>(0,a.WY)({url:"/gateway-manage/balanced/stop",method:"get",data:e}),s=e=>(0,a.WY)({url:"/gateway-manage/loadServer/regList",method:"post",data:e}),u=e=>(0,a.WY)({url:"/gateway-manage/loadServer/notRegPageList",method:"post",data:e})},6328:function(e,t,o){"use strict";o.d(t,{Nu:function(){return c},Qu:function(){return r},SH:function(){return d},ZF:function(){return l},gu:function(){return n},tn:function(){return i}});var a=o(2310);const l=e=>(0,a.WY)({url:"/gateway-manage/client/add",method:"post",data:e}),r=e=>(0,a.WY)({url:"/gateway-manage/client/update",method:"post",data:e}),n=e=>(0,a.WY)({url:"/gateway-manage/client/pageList",method:"post",data:e}),i=e=>(0,a.WY)({url:"/gateway-manage/client/start",method:"get",data:e}),d=e=>(0,a.WY)({url:"/gateway-manage/client/stop",method:"get",data:e}),c=e=>(0,a.WY)({url:"/gateway-manage/client/delete",method:"get",data:e})},9517:function(e,t,o){"use strict";o.d(t,{QW:function(){return l},Ub:function(){return i},Vs:function(){return r},h1:function(){return n}});var a=o(2310);const l=e=>(0,a.WY)({url:"/gateway-manage/count/balanced/request",method:"post",loading:!1,data:e}),r=e=>(0,a.WY)({url:"/gateway-manage/count/route/pageList",method:"post",loading:!1,data:e}),n=e=>(0,a.WY)({url:"/gateway-manage/count/request/total",method:"post",loading:!1,data:e}),i=e=>(0,a.WY)({url:"/gateway-manage/count/request/app/total",method:"get",loading:!1,data:e})},7985:function(e,t,o){"use strict";o.d(t,{CN:function(){return n},OV:function(){return i},am:function(){return d},fq:function(){return r},qP:function(){return l},qW:function(){return c}});var a=o(2310);const l=e=>(0,a.WY)({url:"/gateway-manage/route/add",method:"post",data:e}),r=e=>(0,a.WY)({url:"/gateway-manage/route/update",method:"post",data:e}),n=e=>(0,a.WY)({url:"/gateway-manage/route/pageList",method:"post",data:e}),i=e=>(0,a.WY)({url:"/gateway-manage/route/start",method:"post",data:e}),d=e=>(0,a.WY)({url:"/gateway-manage/route/stop",method:"post",data:e}),c=e=>(0,a.WY)({url:"/gateway-manage/route/delete",method:"post",data:e})},6483:function(e,t,o){"use strict";o.d(t,{$b:function(){return x},B6:function(){return r},BU:function(){return f},EU:function(){return l},Ec:function(){return u},Ge:function(){return V},L7:function(){return w},LP:function(){return N},Nw:function(){return d},OP:function(){return c},Sm:function(){return s},Sy:function(){return h},bf:function(){return n},f4:function(){return i},iS:function(){return m},kI:function(){return C},sA:function(){return g},yO:function(){return v},zE:function(){return p}});var a=o(2310);const l=e=>(0,a.WY)({url:"/gateway-manage/regServer/add",method:"post",data:e}),r=e=>(0,a.WY)({url:"/gateway-manage/regServer/serverPageList",method:"post",data:e}),n=e=>(0,a.WY)({url:"/gateway-manage/regServer/clientPageList",method:"post",data:e}),i=e=>(0,a.WY)({url:"/gateway-manage/regServer/start",method:"post",data:e}),d=e=>(0,a.WY)({url:"/gateway-manage/regServer/stop",method:"post",data:e}),c=e=>(0,a.WY)({url:"/gateway-manage/regServer/startClientAllRoute",method:"post",data:e}),s=e=>(0,a.WY)({url:"/gateway-manage/regServer/stopClientAllRoute",method:"post",data:e}),u=e=>(0,a.WY)({url:"/gateway-manage/regServer/delete",method:"post",data:e}),m=e=>(0,a.WY)({url:"/gateway-manage/regServer/notRegServerPageList",method:"post",data:e}),p=e=>(0,a.WY)({url:"/gateway-manage/regServer/add",method:"post",data:e}),h=e=>(0,a.WY)({url:"/gateway-manage/regServer/startRouteAllClient",method:"post",data:e}),f=e=>(0,a.WY)({url:"/gateway-manage/regServer/stopRouteAllClient",method:"post",data:e}),V=e=>(0,a.WY)({url:"/gateway-manage/regServer/start",method:"post",data:e}),g=e=>(0,a.WY)({url:"/gateway-manage/regServer/stop",method:"post",data:e}),N=e=>(0,a.WY)({url:"/gateway-manage/regServer/delete",method:"post",data:e}),w=e=>(0,a.WY)({url:"/gateway-manage/regServer/notRegClientPageList",method:"post",data:e}),C=e=>(0,a.WY)({url:"/gateway-manage/regServer/regClientList",method:"post",data:e}),x=e=>(0,a.WY)({url:"/gateway-manage/regServer/createToken",method:"post",data:e}),v=e=>(0,a.WY)({url:"/gateway-manage/regServer/removeToken",method:"post",data:e})},2310:function(e,t,o){"use strict";o.d(t,{UD:function(){return y},WY:function(){return u}});const a=(0,o(8655).exposeLib)("@arkxos/arkos-core"),{system:l,installPlugin:r,access:n,accessPlugin:i,router:d,store:c,systemStore:s,request:u,http:m,globalHeaders:p,config:h,api:f,getToken:V,setToken:g,removeToken:N,LanguageEnum:w,i18n:C,i18nBuilder:x,emitter:v,useMessage:y,useMessageBox:b}=a},2227:function(e,t,o){"use strict";o.r(t),o.d(t,{comps:function(){return h},default:function(){return f}}),o(3789),o(2072),o(625),o(901),o(6105),o(2955),o(4516),o(3453),o(2512),o(385),o(1840),o(9334),o(9461),o(5340);var a=[{path:"/createGateway",name:"创建网关服务",hidden:!0,meta:{title:"创建网关服务"},component:()=>o.e(834).then(o.bind(o,8893))},{path:"/gatewayTopology",name:"网关路由拓扑结构",hidden:!0,meta:{title:"网关路由拓扑结构"},component:()=>o.e(834).then(o.bind(o,4980))},{path:"/createClient",name:"创建客户端",hidden:!0,meta:{title:"创建客户端"},component:()=>Promise.resolve().then(o.bind(o,2955))},{path:"/addGatewayClient",name:"添加网关客户端",hidden:!0,meta:{title:"添加网关客户端"},component:()=>Promise.resolve().then(o.bind(o,3453))},{path:"/addClientGateway",name:"添加客户端网关",hidden:!0,meta:{title:"添加客户端网关"},component:()=>Promise.resolve().then(o.bind(o,2512))},{path:"/addGroovyScript",name:"添加规则组件",hidden:!0,meta:{title:"添加规则组件"},component:()=>Promise.resolve().then(o.bind(o,901))},{path:"/createBalanced",name:"创建负载均衡",hidden:!0,meta:{title:"创建负载均衡"},component:()=>Promise.resolve().then(o.bind(o,1840))}],l={baseURL:"/",gatewayRoutesURL:"",contentType:"application/json;charset=UTF-8",systemVersion:"snapshot-nacos.v.3.4",errMsg:"操作失败",successMsg:"操作成功",groups:[{value:"public_api",label:"公共API"},{value:"external_api",label:"第三方API"},{value:"interior_api",label:"内网API"},{value:"pay_api",label:"支付API"},{value:"other_api",label:"其它API"}]},r=(o(6087),o(8602),o(6842),o(2310));function n(e,t){e=e||"操作成功",(0,r.UD)().success(e)}function i(e){return window.sessionStorage.removeItem(e)}function d(e,t){if(!window.localStorage)return alert("浏览器不支持localstorage"),!1;s(e),window.localStorage.setItem(e,t)}function c(e){return window.localStorage.getItem(e)}function s(e){return window.localStorage.removeItem(e)}function u(e,t){if(e.code==t.pcode){if(e.children)return e.children[e.children.length]=t,1}else{if(e.pcode==t.code)return t.children[t.children.length]=e,2;if(e.children&&e.children.length>0){let o;for(let a=0;a<e.children.length&&(o=u(e.children[a],t),1!=o);a++);return o}}}var m={errorMsg:function(e,t){e=e||"操作失败",(0,r.UD)().error(e)},successMsg:n,startLoading:function(){},endLoading:function(){},openNewTab:function(e,t,o,a){e.$root.$children[0].$children[0].addTab(t,o,a)},getOpenTab:function(e,t){return e.$root.$children[0].$children[0].getTab(t)},getToken:function(){return c("token")},setToken:function(e){d("token",e)},removeToken:function(){return s("token")},initTree:function(e){let t=[];e.forEach(((e,o)=>{let a,l={id:e.id,code:e.code,pcode:e.pcode,label:e.name,children:[]};for(let e=0;e<t.length&&(a=u(t[e],l),1!=a);e++)2==a&&(t[e]={},a=void 0);null==a&&t.push(l)}));let o=[];return t.forEach((e=>{null!=e&&e.id&&o.push(e)})),console.log(o),o},appendTree:function e(t,o){let a=[],l=o;return o.forEach(((o,r)=>{if(t==o.pcode){let t={id:o.id,code:o.code,pcode:o.pcode,label:o.name,children:e(o.code,l)};a.push(t)}})),a},getLocalStorage:c,setLocalStorage:d,removeLocalStorage:s,getSessionStorage:function(e){return window.sessionStorage.getItem(e)},setSessionStorage:function(e,t){if(!window.sessionStorage)return alert("浏览器不支持localstorage"),!1;i(e),window.sessionStorage.setItem(e,t)},removeSessionStorage:i,copy:function(e){let t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("Copy"),n("复制成功"),t.remove()}};const p=[];p.push(...a);const h={staticRoutes:p,loadComponent:function(e,t){return console.log("pre load component: ",e),()=>o(588)(`./views${e.component}`)},install:function(e){e.config.globalProperties.GLOBAL_VAR=l,e.config.globalProperties.GLOBAL_FUN=m}};var f=h},3648:function(e,t,o){"use strict";o.d(t,{Z:function(){return s}});var a=o(2740);const l={slot:"title"},r={slot:"title"},n={slot:"title"},i={slot:"title"},d={slot:"title"};var c={data(){return{name:"routeInfo"}},created:function(){this.init()},props:["infoForm"],methods:{init(){console.log("infoForm",this.infoForm)}}},s=(0,o(2653).Z)(c,[["render",function(e,t,o,c,s,u){const m=(0,a.resolveComponent)("el-col"),p=(0,a.resolveComponent)("el-tag"),h=(0,a.resolveComponent)("el-row"),f=(0,a.resolveComponent)("el-collapse-item"),V=(0,a.resolveComponent)("el-collapse");return(0,a.openBlock)(),(0,a.createElementBlock)("div",null,[t[30]||(t[30]=(0,a.createElementVNode)("div",{style:{height:"42px","background-color":"#2A2E32","font-size":"14pt","font-weight":"bold",color:"#F0F0F0","padding-top":"18px","padding-left":"20px"}},[(0,a.createElementVNode)("i",{class:"el-icon-connection"}),(0,a.createTextVNode)(" 服务详情 ")],-1)),(0,a.createVNode)(h,{gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[0]||(t[0]=[(0,a.createTextVNode)("服务ID:")]))),_:1}),(0,a.createVNode)(m,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(p,{size:"small"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(o.infoForm.id),1)])),_:1})])),_:1})])),_:1}),(0,a.createVNode)(h,{gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[1]||(t[1]=[(0,a.createTextVNode)("服务名称:")]))),_:1}),(0,a.createVNode)(m,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(p,{size:"small"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(o.infoForm.name),1)])),_:1})])),_:1})])),_:1}),(0,a.createVNode)(h,{gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[2]||(t[2]=[(0,a.createTextVNode)("服务地址:")]))),_:1}),(0,a.createVNode)(m,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(p,{size:"small",type:"success"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(o.infoForm.uri),1)])),_:1})])),_:1})])),_:1}),null!=o.infoForm.method&&""!=o.infoForm.method?((0,a.openBlock)(),(0,a.createBlock)(h,{key:0,gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[3]||(t[3]=[(0,a.createTextVNode)("请求模式:")]))),_:1}),(0,a.createVNode)(m,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(p,{size:"small",type:"success"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(o.infoForm.method),1)])),_:1})])),_:1})])),_:1})):(0,a.createCommentVNode)("",!0),(0,a.createVNode)(h,{gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[4]||(t[4]=[(0,a.createTextVNode)("断言路径:")]))),_:1}),(0,a.createVNode)(m,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(p,{size:"small",type:"success"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(o.infoForm.path),1)])),_:1})])),_:1})])),_:1}),null!=o.infoForm.host&&""!=o.infoForm.host?((0,a.openBlock)(),(0,a.createBlock)(h,{key:1,gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[5]||(t[5]=[(0,a.createTextVNode)("断言Host:")]))),_:1}),(0,a.createVNode)(m,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(p,{size:"small",type:"success"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(o.infoForm.host),1)])),_:1})])),_:1})])),_:1})):(0,a.createCommentVNode)("",!0),null!=o.infoForm.remoteAddr&&""!=o.infoForm.remoteAddr?((0,a.openBlock)(),(0,a.createBlock)(h,{key:2,gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[6]||(t[6]=[(0,a.createTextVNode)("断言远程地址:")]))),_:1}),(0,a.createVNode)(m,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(p,{size:"small",type:"success"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(o.infoForm.remoteAddr),1)])),_:1})])),_:1})])),_:1})):(0,a.createCommentVNode)("",!0),null!=o.infoForm.header&&""!=o.infoForm.header?((0,a.openBlock)(),(0,a.createBlock)(h,{key:3,gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[7]||(t[7]=[(0,a.createTextVNode)("断言Header:")]))),_:1}),(0,a.createVNode)(m,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(p,{size:"small",type:"success"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(o.infoForm.header),1)])),_:1})])),_:1})])),_:1})):(0,a.createCommentVNode)("",!0),(0,a.createVNode)(h,{gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[8]||(t[8]=[(0,a.createTextVNode)("断言截取:")]))),_:1}),(0,a.createVNode)(m,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(p,{size:"small",type:"success"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)("StripPrefix="+(0,a.toDisplayString)(o.infoForm.stripPrefix),1)])),_:1})])),_:1})])),_:1}),(0,a.createVNode)(h,{gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[9]||(t[9]=[(0,a.createTextVNode)("请求参数:")]))),_:1}),(0,a.createVNode)(m,{span:18,class:"gateway-info-value",title:o.infoForm.requestParameter},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(p,{size:"small",type:"success"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)("RequestParameter="+(0,a.toDisplayString)(o.infoForm.requestParameter),1)])),_:1})])),_:1},8,["title"])])),_:1}),null!=o.infoForm.rewritePath&&""!=o.infoForm.rewritePath?((0,a.openBlock)(),(0,a.createBlock)(h,{key:4,gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[10]||(t[10]=[(0,a.createTextVNode)("重定向:")]))),_:1}),(0,a.createVNode)(m,{span:18,class:"gateway-info-value",title:o.infoForm.rewritePath},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(p,{size:"small",type:"success"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(o.infoForm.rewritePath),1)])),_:1})])),_:1},8,["title"])])),_:1})):(0,a.createCommentVNode)("",!0),null!=o.infoForm.filterGatewayName&&""!=o.infoForm.filterGatewayName?((0,a.openBlock)(),(0,a.createBlock)(h,{key:5,gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[11]||(t[11]=[(0,a.createTextVNode)("过滤器:")]))),_:1}),(0,a.createVNode)(m,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>[-1!=o.infoForm.filterGatewayName.indexOf("ip")?((0,a.openBlock)(),(0,a.createBlock)(p,{key:0,size:"small",type:"warning"},{default:(0,a.withCtx)((()=>t[12]||(t[12]=[(0,a.createTextVNode)("IP")]))),_:1})):(0,a.createCommentVNode)("",!0),-1!=o.infoForm.filterGatewayName.indexOf("token")?((0,a.openBlock)(),(0,a.createBlock)(p,{key:1,size:"small",type:"warning"},{default:(0,a.withCtx)((()=>t[13]||(t[13]=[(0,a.createTextVNode)("TOKEN")]))),_:1})):(0,a.createCommentVNode)("",!0),-1!=o.infoForm.filterGatewayName.indexOf("id")?((0,a.openBlock)(),(0,a.createBlock)(p,{key:2,size:"small",type:"warning"},{default:(0,a.withCtx)((()=>t[14]||(t[14]=[(0,a.createTextVNode)("ID")]))),_:1})):(0,a.createCommentVNode)("",!0)])),_:1})])),_:1})):(0,a.createCommentVNode)("",!0),null!=o.infoForm.degradeRuleName&&"default"==o.infoForm.degradeRuleName?((0,a.openBlock)(),(0,a.createBlock)(h,{key:6,gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[15]||(t[15]=[(0,a.createTextVNode)("熔断器:")]))),_:1}),(0,a.createVNode)(m,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(p,{size:"small",type:"warning"},{default:(0,a.withCtx)((()=>t[16]||(t[16]=[(0,a.createTextVNode)("启用")]))),_:1})])),_:1})])),_:1})):(0,a.createCommentVNode)("",!0),null!=o.infoForm.flowRuleName&&""!=o.infoForm.flowRuleName?((0,a.openBlock)(),(0,a.createBlock)(h,{key:7,gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[17]||(t[17]=[(0,a.createTextVNode)("限流器:")]))),_:1}),(0,a.createVNode)(m,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>["default"===o.infoForm.flowRuleName?((0,a.openBlock)(),(0,a.createBlock)(p,{key:0,size:"small",type:"warning"},{default:(0,a.withCtx)((()=>t[18]||(t[18]=[(0,a.createTextVNode)("直接拒绝")]))),_:1})):(0,a.createCommentVNode)("",!0),"warmUp"===o.infoForm.flowRuleName?((0,a.openBlock)(),(0,a.createBlock)(p,{key:1,size:"small",type:"warning"},{default:(0,a.withCtx)((()=>t[19]||(t[19]=[(0,a.createTextVNode)("冷启动")]))),_:1})):(0,a.createCommentVNode)("",!0),"rateLimiter"===o.infoForm.flowRuleName?((0,a.openBlock)(),(0,a.createBlock)(p,{key:2,size:"small",type:"warning"},{default:(0,a.withCtx)((()=>t[20]||(t[20]=[(0,a.createTextVNode)("匀速器")]))),_:1})):(0,a.createCommentVNode)("",!0)])),_:1})])),_:1})):(0,a.createCommentVNode)("",!0),null!=o.infoForm.filterAuthorizeName&&""!=o.infoForm.filterAuthorizeName?((0,a.openBlock)(),(0,a.createBlock)(h,{key:8,gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[21]||(t[21]=[(0,a.createTextVNode)("鉴权器:")]))),_:1}),(0,a.createVNode)(m,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(V,{accordion:""},{default:(0,a.withCtx)((()=>[-1!=o.infoForm.filterAuthorizeName.indexOf("header")?((0,a.openBlock)(),(0,a.createBlock)(f,{key:0},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("template",l,[(0,a.createVNode)(p,{size:"small",type:"warning"},{default:(0,a.withCtx)((()=>t[22]||(t[22]=[(0,a.createTextVNode)("HEADER验证")]))),_:1})]),(0,a.createElementVNode)("div",null,[(0,a.createVNode)(p,{size:"mini",type:""},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(o.infoForm.accessHeader),1)])),_:1})])])),_:1})):(0,a.createCommentVNode)("",!0),-1!=o.infoForm.filterAuthorizeName.indexOf("ip")?((0,a.openBlock)(),(0,a.createBlock)(f,{key:1},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("template",r,[(0,a.createVNode)(p,{size:"small",type:"warning"},{default:(0,a.withCtx)((()=>t[23]||(t[23]=[(0,a.createTextVNode)("IP验证")]))),_:1})]),(0,a.createElementVNode)("div",null,[(0,a.createVNode)(p,{size:"mini",type:""},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)("ip="+(0,a.toDisplayString)(o.infoForm.accessIp),1)])),_:1})])])),_:1})):(0,a.createCommentVNode)("",!0),-1!=o.infoForm.filterAuthorizeName.indexOf("parm")?((0,a.openBlock)(),(0,a.createBlock)(f,{key:2},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("template",n,[(0,a.createVNode)(p,{size:"small",type:"warning"},{default:(0,a.withCtx)((()=>t[24]||(t[24]=[(0,a.createTextVNode)("参数验证")]))),_:1})]),(0,a.createElementVNode)("div",null,[(0,a.createVNode)(p,{size:"mini",type:""},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(o.infoForm.accessParameter),1)])),_:1})])])),_:1})):(0,a.createCommentVNode)("",!0),-1!=o.infoForm.filterAuthorizeName.indexOf("time")?((0,a.openBlock)(),(0,a.createBlock)(f,{key:3},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("template",i,[(0,a.createVNode)(p,{size:"small",type:"warning"},{default:(0,a.withCtx)((()=>t[25]||(t[25]=[(0,a.createTextVNode)("时间验证")]))),_:1})]),(0,a.createElementVNode)("div",null,[(0,a.createVNode)(p,{size:"mini",type:""},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)("时间区间:"+(0,a.toDisplayString)(o.infoForm.accessTime),1)])),_:1})])])),_:1})):(0,a.createCommentVNode)("",!0),-1!=o.infoForm.filterAuthorizeName.indexOf("cookie")?((0,a.openBlock)(),(0,a.createBlock)(f,{key:4},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("template",d,[(0,a.createVNode)(p,{size:"small",type:"warning"},{default:(0,a.withCtx)((()=>t[26]||(t[26]=[(0,a.createTextVNode)("Cookie验证")]))),_:1})]),(0,a.createElementVNode)("div",null,[(0,a.createVNode)(p,{size:"mini",type:""},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(o.infoForm.accessCookie),1)])),_:1})])])),_:1})):(0,a.createCommentVNode)("",!0)])),_:1})])),_:1})])),_:1})):(0,a.createCommentVNode)("",!0),null!=o.infoForm.cacheTtl&&""!=o.infoForm.cacheTtl?((0,a.openBlock)(),(0,a.createBlock)(h,{key:9,gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[27]||(t[27]=[(0,a.createTextVNode)("缓存时间:")]))),_:1}),(0,a.createVNode)(m,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(p,{size:"small",type:"warning"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(o.infoForm.cacheTtl)+"s",1)])),_:1})])),_:1})])),_:1})):(0,a.createCommentVNode)("",!0),(0,a.createVNode)(h,{gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[28]||(t[28]=[(0,a.createTextVNode)("创建时间:")]))),_:1}),(0,a.createVNode)(m,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(p,{size:"small",type:"danger"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(o.infoForm.createTime),1)])),_:1})])),_:1})])),_:1}),(0,a.createVNode)(h,{gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[29]||(t[29]=[(0,a.createTextVNode)("服务状态:")]))),_:1}),(0,a.createVNode)(m,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(p,{size:"small",type:"danger"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)("0"===o.infoForm.status?"启用":"禁用"),1)])),_:1})])),_:1})])),_:1})])}]])},2512:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return g}});var a=o(2740);const l={class:"block",style:{"margin-top":"20px"}},r={slot:"footer",class:"dialog-footer"},n={slot:"header",class:"clearfix"},i={style:{"margin-left":"50px"}},d={style:{"font-size":"11pt"}},c={style:{float:"right","margin-left":"10px"}},s={style:{float:"right","margin-left":"10px"}},u={style:{float:"right","margin-left":"10px"}},m={key:0},p={key:1},h={class:"block",style:{"margin-top":"20px"}};o(3789);var f=o(6483),V={data(){return{dialogFormVisible:!1,formLabelWidth:"100px",form:{},tableData:[],currentPage:1,pageSize:10,totalNum:1,routeTableData:[],routeCurrentPage:1,routePageSize:10,routeTotalNum:1}},created:function(){let e=this.$route.query;if(e){let t=e.client;console.log("client",t),this.init(t)}},mounted:function(){},beforeDestroy:function(){},methods:{init(e){e&&(this.form=e,this.regServerList())},goBack(){console.log("go back"),this.$router.push({path:"/clientList",query:{}})},handleSizeChange(e){this.pageSize=e,this.regServerList()},handleCurrentChange(e){this.currentPage=e,this.regServerList()},handleRouteSizeChange(e){this.routePageSize=e,this.routeList()},handleRouteCurrentChange(e){this.routeCurrentPage=e,this.routeList()},handleCommandRegServer(e){console.log("command",e);let t=this;"start"===e.command?this.$confirm('确认允许当前客户端访问"'+e.row.name+'"该注册服务?').then((o=>{(0,f.f4)({id:e.row.regServerId}).then((function(e){t.GLOBAL_FUN.successMsg(),t.regServerList()}))})).catch((e=>{})):"stop"===e.command?this.$confirm('确认禁止当前客户端访问"'+e.row.name+'"该注册服务?').then((o=>{(0,f.Nw)({id:e.row.regServerId}).then((function(e){t.GLOBAL_FUN.successMsg(),t.regServerList()}))})).catch((e=>{})):"delete"===e.command&&this.$confirm('确认删除"'+e.row.name+'"该注册服务?').then((o=>{(0,f.Ec)({id:e.row.regServerId}).then((function(e){t.GLOBAL_FUN.successMsg(),t.regServerList()}))})).catch((e=>{}))},handleAddRegServer(e){let t=this;(0,f.EU)({clientId:this.form.id,routeId:e.id}).then((function(e){t.GLOBAL_FUN.successMsg(),t.regServerList(),t.routeList()}))},startAll(){let e=this;this.$confirm("确认要允许当前客户端访问所有已注册服务?").then((t=>{(0,f.OP)({clientId:e.form.id}).then((function(t){e.GLOBAL_FUN.successMsg(),e.regServerList()}))})).catch((e=>{}))},stopAll(){let e=this;this.$confirm("确认要禁止当前客户端访问所有已注册服务?").then((t=>{(0,f.Sm)({clientId:e.form.id}).then((function(t){e.GLOBAL_FUN.successMsg(),e.regServerList()}))})).catch((e=>{}))},regServerList(){let e=this;(0,f.B6)({clientId:this.form.id,currentPage:this.currentPage,pageSize:this.pageSize}).then((function(t){t.data&&(e.tableData=t.data.records,e.totalNum=t.data.total)}))},routeList(){let e=this;(0,f.iS)({clientId:this.form.id,currentPage:this.routeCurrentPage,pageSize:this.routePageSize}).then((function(t){console.log(t),t.data&&t.data.records&&(e.routeTableData=t.data.records,e.routeTotalNum=t.data.total)}))},search(){this.dialogFormVisible=!0,this.routeList()}}},g=(0,o(2653).Z)(V,[["render",function(e,t,o,f,V,g){const N=(0,a.resolveComponent)("el-page-header"),w=(0,a.resolveComponent)("el-table-column"),C=(0,a.resolveComponent)("el-button"),x=(0,a.resolveComponent)("el-table"),v=(0,a.resolveComponent)("el-pagination"),y=(0,a.resolveComponent)("el-dialog"),b=(0,a.resolveComponent)("el-popover"),k=(0,a.resolveComponent)("el-tag"),_=(0,a.resolveComponent)("el-dropdown-item"),E=(0,a.resolveComponent)("el-dropdown-menu"),T=(0,a.resolveComponent)("el-dropdown"),S=(0,a.resolveComponent)("el-card"),z=(0,a.resolveComponent)("el-col"),B=(0,a.resolveComponent)("el-row");return(0,a.openBlock)(),(0,a.createElementBlock)("div",null,[(0,a.createVNode)(N,{onBack:g.goBack,content:"已注册服务端管理"},null,8,["onBack"]),(0,a.createVNode)(y,{title:"添加服务端",modelValue:V.dialogFormVisible,"onUpdate:modelValue":t[1]||(t[1]=e=>V.dialogFormVisible=e),width:"40%","close-on-click-modal":!1},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(x,{size:"mini",data:V.routeTableData,style:{width:"100%"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(w,{label:"服务ID",prop:"id"}),(0,a.createVNode)(w,{label:"服务名称",prop:"name"}),(0,a.createVNode)(w,{label:"服务地址",prop:"uri"}),(0,a.createVNode)(w,{label:"操作",width:"60"},{default:(0,a.withCtx)((({row:t})=>[(0,a.createVNode)(C,{size:"mini",circle:"",icon:"el-icon-plus",type:"success",title:"添加",onClick:t=>g.handleAddRegServer(e.scope.row)},null,8,["onClick"])])),_:1})])),_:1},8,["data"]),(0,a.createElementVNode)("div",l,[(0,a.createVNode)(v,{onSizeChange:g.handleRouteSizeChange,onCurrentChange:g.handleRouteCurrentChange,"current-page":V.routeCurrentPage,"page-sizes":[10,30,50],"page-size":V.routePageSize,layout:"total, sizes, prev, pager, next, jumper",total:V.routeTotalNum},null,8,["onSizeChange","onCurrentChange","current-page","page-size","total"])]),(0,a.createElementVNode)("div",r,[(0,a.createVNode)(C,{onClick:t[0]||(t[0]=e=>V.dialogFormVisible=!1),size:"small"},{default:(0,a.withCtx)((()=>t[2]||(t[2]=[(0,a.createTextVNode)("关 闭")]))),_:1})])])),_:1},8,["modelValue"]),(0,a.createVNode)(B,{gutter:20,style:{"margin-top":"20px"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(z,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)(S,{class:"box-card"},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",n,[t[9]||(t[9]=(0,a.createElementVNode)("span",null,"网关服务端",-1)),(0,a.createVNode)(b,{trigger:"click",placement:"bottom"},{default:(0,a.withCtx)((()=>[t[3]||(t[3]=(0,a.createElementVNode)("div",{style:{"font-size":"10pt"}},[(0,a.createElementVNode)("span",null,"添加服务端说明:"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,'1. 开启路由服务ID过滤后,只有请求参数或Header中带有clientId="当前客户端ID(注册KEY)"才能访问指定服务端。'),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"2. 开启路由服务ID过滤后,此功能主要适用于对第三方开放服务,提供简单认证访问。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"3. 新添加的路由服务端后,默认为禁止访问路由服务,请手动开启允许访问,才能生效。"),(0,a.createElementVNode)("br")],-1)),(0,a.createVNode)(C,{slot:"reference",style:{padding:"3px 0"},icon:"el-icon-question",type:"text",title:"说明"})])),_:1}),(0,a.createElementVNode)("span",i,[t[5]||(t[5]=(0,a.createElementVNode)("i",{class:"el-icon-monitor"},null,-1)),(0,a.createElementVNode)("span",d,[(0,a.createVNode)(k,{size:"mini",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(V.form.name),1)])),_:1}),t[4]||(t[4]=(0,a.createTextVNode)(" - ")),(0,a.createVNode)(k,{size:"mini",type:"success",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(V.form.ip),1)])),_:1})])]),(0,a.createElementVNode)("div",c,[(0,a.createVNode)(C,{icon:"el-icon-circle-plus-outline",size:"small",type:"success",onClick:g.search,title:"查找服务端"},{default:(0,a.withCtx)((()=>t[6]||(t[6]=[(0,a.createTextVNode)(" 添加服务 ")]))),_:1},8,["onClick"])]),(0,a.createElementVNode)("div",s,[(0,a.createVNode)(C,{icon:"el-icon-s-claim",size:"small",type:"primary",onClick:g.startAll,title:"启用所有客户端通行"},{default:(0,a.withCtx)((()=>t[7]||(t[7]=[(0,a.createTextVNode)(" 全部允许 ")]))),_:1},8,["onClick"])]),(0,a.createElementVNode)("div",u,[(0,a.createVNode)(C,{icon:"el-icon-circle-close",size:"small",type:"danger",onClick:g.stopAll,title:"禁用所有客户端通行"},{default:(0,a.withCtx)((()=>t[8]||(t[8]=[(0,a.createTextVNode)(" 全部禁止 ")]))),_:1},8,["onClick"])])]),(0,a.createVNode)(x,{size:"small",data:V.tableData,style:{width:"100%"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(w,{label:"服务ID",prop:"id"}),(0,a.createVNode)(w,{label:"服务名称",prop:"name"}),(0,a.createVNode)(w,{label:"服务地址",prop:"uri"}),(0,a.createVNode)(w,{label:"断言路径",prop:"path"}),(0,a.createVNode)(w,{label:"注册时间",prop:"regServerTime",width:"200"}),(0,a.createVNode)(w,{label:"状态",prop:"regServerStatus"},{default:(0,a.withCtx)((({row:o})=>["0"===e.scope.row.regServerStatus?((0,a.openBlock)(),(0,a.createElementBlock)("div",m,[t[11]||(t[11]=(0,a.createElementVNode)("i",{class:"el-icon-success",style:{color:"#409EFF"}},null,-1)),t[12]||(t[12]=(0,a.createTextVNode)(" ")),(0,a.createVNode)(k,{size:"mini"},{default:(0,a.withCtx)((()=>t[10]||(t[10]=[(0,a.createTextVNode)((0,a.toDisplayString)("允许通行"))]))),_:1})])):(0,a.createCommentVNode)("",!0),"1"===e.scope.row.regServerStatus?((0,a.openBlock)(),(0,a.createElementBlock)("div",p,[t[14]||(t[14]=(0,a.createElementVNode)("i",{class:"el-icon-error",style:{color:"#f00000"}},null,-1)),t[15]||(t[15]=(0,a.createTextVNode)(" ")),(0,a.createVNode)(k,{size:"mini",type:"danger"},{default:(0,a.withCtx)((()=>t[13]||(t[13]=[(0,a.createTextVNode)((0,a.toDisplayString)("禁止通行"))]))),_:1})])):(0,a.createCommentVNode)("",!0)])),_:1}),(0,a.createVNode)(w,{label:"操作",width:"80"},{default:(0,a.withCtx)((({row:o})=>[(0,a.createVNode)(T,{trigger:"click",onCommand:g.handleCommandRegServer},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(C,{size:"mini",circle:"",icon:"el-icon-setting",title:"设置",style:{border:"0px"}}),(0,a.createVNode)(E,{slot:"dropdown"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(_,{command:{command:"start",row:e.scope.row}},{default:(0,a.withCtx)((()=>t[16]||(t[16]=[(0,a.createElementVNode)("i",{class:"el-icon-success",style:{color:"#409EFF"}},null,-1),(0,a.createTextVNode)("允许通行")]))),_:2},1032,["command"]),(0,a.createVNode)(_,{command:{command:"stop",row:e.scope.row}},{default:(0,a.withCtx)((()=>t[17]||(t[17]=[(0,a.createElementVNode)("i",{class:"el-icon-error",style:{color:"red"}},null,-1),(0,a.createTextVNode)("禁止通行")]))),_:2},1032,["command"]),(0,a.createVNode)(_,{command:{command:"delete",row:e.scope.row},divided:""},{default:(0,a.withCtx)((()=>t[18]||(t[18]=[(0,a.createElementVNode)("i",{class:"el-icon-delete"},null,-1),(0,a.createTextVNode)("移除")]))),_:2},1032,["command"])])),_:2},1024)])),_:2},1032,["onCommand"])])),_:1})])),_:1},8,["data"]),(0,a.createElementVNode)("div",h,[(0,a.createVNode)(v,{onSizeChange:g.handleSizeChange,onCurrentChange:g.handleCurrentChange,"current-page":V.currentPage,"page-sizes":[10,30,50],"page-size":V.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:V.totalNum},null,8,["onSizeChange","onCurrentChange","current-page","page-size","total"])])])),_:1})])),_:1})])),_:1})])}]])},3453:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return w}});var a=o(2740);const l={class:"block",style:{"margin-top":"20px"}},r={slot:"footer",class:"dialog-footer"},n={slot:"header",class:"clearfix"},i={style:{"margin-left":"50px"}},d={style:{"font-size":"11pt"}},c={style:{float:"right","margin-left":"10px"}},s={style:{float:"right","margin-left":"10px"}},u={style:{float:"right","margin-left":"10px"}},m={style:{"font-size":"10pt",width:"500px"}},p={style:{float:"right","margin-left":"10px"}},h={key:0},f={key:1},V={class:"block",style:{"margin-top":"20px"}};o(3789),o(6087),o(8602);var g=o(6483),N={data(){return{dialogFormVisible:!1,secretKey:null,token:null,tokenEffectiveTime:null,tokenIsTrue:!0,form:{},tableData:[{}],currentPage:1,pageSize:10,totalNum:0,clientTableData:[{}],clientCurrentPage:1,clientPageSize:10,clientTotalNum:0,groupOptions:this.GLOBAL_VAR.groups}},created:function(){let e=this.$route.query;if(e){let t=e.route;t=JSON.parse(t),console.log("route",t),this.init(t)}},mounted:function(){},beforeDestroy:function(){},methods:{init(e){this.form=e.form,this.regClientList()},goBack(){console.log("go back"),this.$router.push({path:"/gatewayList",query:{}})},handleSizeChange(e){this.pageSize=e},handleCurrentChange(e){this.currentPage=e},handleShowInfo(e,t){this.infoForm=e},formatterStatus(e,t){return"允许通行"},handleCommandRegClient(e){console.log("command",e);let t=this;"start"===e.command?this.$confirm('确认允许当前客户端"'+e.row.name+'"访问该注册服务?').then((o=>{(0,g.Ge)({id:e.row.regServerId}).then((function(e){t.GLOBAL_FUN.successMsg(),t.regClientList()}))})).catch((e=>{})):"stop"===e.command?this.$confirm('确认禁止当前客户端"'+e.row.name+'"访问该注册服务?').then((o=>{(0,g.sA)({id:e.row.regServerId}).then((function(e){t.GLOBAL_FUN.successMsg(),t.regClientList()}))})).catch((e=>{})):"delete"===e.command&&this.$confirm('确认删除客户端"'+e.row.name+'"注册该服务?').then((o=>{(0,g.LP)({id:e.row.regServerId}).then((function(e){t.GLOBAL_FUN.successMsg(),t.regClientList()}))})).catch((e=>{}))},handleAddRegClient(e){let t=this;(0,g.zE)({clientId:e.id,routeId:this.form.id}).then((function(e){t.GLOBAL_FUN.successMsg(),t.regClientList(),t.clientList()}))},startAll(){let e=this;this.$confirm("确认要允许当前服务下所有已注册的客户端访问?").then((t=>{(0,g.Sy)({routeId:e.form.id}).then((function(t){e.GLOBAL_FUN.successMsg(),e.regClientList()}))})).catch((e=>{}))},stopAll(){let e=this;this.$confirm("确认要禁止当前服务下所有已注册客户端访问?").then((t=>{(0,g.BU)({routeId:e.form.id}).then((function(t){e.GLOBAL_FUN.successMsg(),e.regClientList()}))})).catch((e=>{}))},regClientList(){let e=this;(0,g.bf)({routeId:this.form.id,currentPage:this.currentPage,pageSize:this.pageSize}).then((function(t){t.data&&(e.tableData=t.data.records,e.totalNum=t.data.total)}))},clientList(){let e=this;(0,g.L7)({routeId:this.form.id,currentPage:this.clientCurrentPage,pageSize:this.clientPageSize}).then((function(t){console.log(t),t.data&&t.data.records&&(e.clientTableData=t.data.records,e.clientTotalNum=t.data.total)}))},handleCreateToken(e){let t=this;if(console.log(this.tokenEffectiveTime),null==this.tokenEffectiveTime||null==this.tokenEffectiveTime||""==this.tokenEffectiveTime)return this.GLOBAL_FUN.errorMsg("JWT通行令牌过期时间不能为空"),!1;(0,g.$b)({regServerId:e.regServerId,secretKey:this.secretKey,tokenEffectiveTime:this.tokenEffectiveTime}).then((function(o){o.data&&(t.token=o.data,t.GLOBAL_FUN.successMsg("创建成功"),t.tableData.forEach(((o,a)=>{o.regServerId==e.regServerId&&(o.secretKey=t.secretKey,o.tokenEffectiveTime=t.tokenEffectiveTime,o.token=t.token)})))}))},handleRemoveToken(e){let t=this;(0,g.yO)({regServerId:e.regServerId}).then((function(o){t.token=null,t.secretKey=null,t.tokenEffectiveTime=null,t.GLOBAL_FUN.successMsg("清除成功"),t.tableData.forEach(((o,a)=>{o.regServerId==e.regServerId&&(o.secretKey=t.secretKey,o.tokenEffectiveTime=t.tokenEffectiveTime,o.token=t.token)}))}))},handleCopyToken(){if(null==this.token||null==this.token||""==this.token)return this.GLOBAL_FUN.errorMsg("JWT通行令牌内容不能为空"),!1;this.GLOBAL_FUN.copy(this.token)},queryRegClientTokenInfo(e,t){this.token=e.token,this.secretKey=e.secretKey,this.tokenEffectiveTime=e.tokenEffectiveTime},search(){this.dialogFormVisible=!0,this.clientList()}}},w=(0,o(2653).Z)(N,[["render",function(e,t,o,g,N,w){const C=(0,a.resolveComponent)("el-tag"),x=(0,a.resolveComponent)("el-table-column"),v=(0,a.resolveComponent)("el-button"),y=(0,a.resolveComponent)("el-table"),b=(0,a.resolveComponent)("el-pagination"),k=(0,a.resolveComponent)("el-dialog"),_=(0,a.resolveComponent)("el-popover"),E=(0,a.resolveComponent)("el-date-picker"),T=(0,a.resolveComponent)("el-input"),S=(0,a.resolveComponent)("el-dropdown-item"),z=(0,a.resolveComponent)("el-dropdown-menu"),B=(0,a.resolveComponent)("el-dropdown"),F=(0,a.resolveComponent)("el-card"),L=(0,a.resolveComponent)("el-col"),D=(0,a.resolveComponent)("el-row");return(0,a.openBlock)(),(0,a.createElementBlock)("div",null,[(0,a.createVNode)(k,{title:"添加客户端",modelValue:N.dialogFormVisible,"onUpdate:modelValue":t[1]||(t[1]=e=>N.dialogFormVisible=e),width:"40%","close-on-click-modal":!1},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(y,{size:"mini",data:N.clientTableData,style:{width:"100%"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(x,{label:"客户端ID",width:"280"},{default:(0,a.withCtx)((({row:e})=>[(0,a.createVNode)(C,{size:"small",type:"warning",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.id),1)])),_:2},1024)])),_:1}),(0,a.createVNode)(x,{label:"分组",width:"120"},{default:(0,a.withCtx)((({row:e})=>[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(N.groupOptions,(t=>(0,a.withDirectives)(((0,a.openBlock)(),(0,a.createBlock)(C,{key:t.value,size:"small",type:""},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(t.label),1)])),_:2},1024)),[[a.vShow,t.value===e.groupCode]]))),128))])),_:1}),(0,a.createVNode)(x,{label:"名称",prop:"name"}),(0,a.createVNode)(x,{label:"IP地址",prop:"ip"}),(0,a.createVNode)(x,{label:"操作",width:"60"},{default:(0,a.withCtx)((({row:e})=>[(0,a.createVNode)(v,{circle:"",icon:"el-icon-plus",type:"success",title:"添加",onClick:t=>w.handleAddRegClient(e)},null,8,["onClick"])])),_:1})])),_:1},8,["data"]),(0,a.createElementVNode)("div",l,[(0,a.createVNode)(b,{onSizeChange:w.handleSizeChange,onCurrentChange:w.handleCurrentChange,"current-page":N.clientCurrentPage,"page-sizes":[10,30,50],"page-size":N.clientPageSize,layout:"total, sizes, prev, pager, next, jumper",total:N.clientTotalNum},null,8,["onSizeChange","onCurrentChange","current-page","page-size","total"])]),(0,a.createElementVNode)("div",r,[(0,a.createVNode)(v,{onClick:t[0]||(t[0]=e=>N.dialogFormVisible=!1),size:"small"},{default:(0,a.withCtx)((()=>t[6]||(t[6]=[(0,a.createTextVNode)("关 闭")]))),_:1})])])),_:1},8,["modelValue"]),(0,a.createVNode)(D,{gutter:20,style:{"margin-top":"20px"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(L,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)(F,{class:"box-card"},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",n,[t[14]||(t[14]=(0,a.createElementVNode)("span",null,"网关客户端",-1)),(0,a.createVNode)(_,{trigger:"click",placement:"bottom"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(v,{style:{padding:"3px 0"},icon:"el-icon-question",type:"text",title:"说明"})])),default:(0,a.withCtx)((()=>[t[7]||(t[7]=(0,a.createElementVNode)("div",{style:{"font-size":"10pt"}},[(0,a.createElementVNode)("span",null,"添加客户端说明:"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"1. 开启路由服务IP过滤后,默认只有已注册到当前服务的客户端才有权限访问。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"2. 新添加的客户端,默认为禁止访问路由服务,请手动开启允许访问,才能生效。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,[(0,a.createTextVNode)("3. 点击"),(0,a.createElementVNode)("i"),(0,a.createTextVNode)("查看与创建客户端JWT通行令牌。")])],-1))])),_:1}),(0,a.createElementVNode)("span",i,[t[10]||(t[10]=(0,a.createElementVNode)("i",{class:"el-icon-connection"},null,-1)),(0,a.createElementVNode)("span",d,[(0,a.createVNode)(C,{size:"mini",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(N.form.name),1)])),_:1}),t[8]||(t[8]=(0,a.createTextVNode)(" - ")),(0,a.createVNode)(C,{size:"mini",type:"warning",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(N.form.id),1)])),_:1}),t[9]||(t[9]=(0,a.createTextVNode)(" - ")),(0,a.createVNode)(C,{size:"mini",type:"success",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(N.form.uri),1)])),_:1})])]),(0,a.createElementVNode)("div",c,[(0,a.createVNode)(v,{icon:"el-icon-circle-plus-outline",size:"small",type:"success",onClick:w.search,title:"查找客户端"},{default:(0,a.withCtx)((()=>t[11]||(t[11]=[(0,a.createTextVNode)("添加客户端")]))),_:1},8,["onClick"])]),(0,a.createElementVNode)("div",s,[(0,a.createVNode)(v,{icon:"el-icon-s-claim",size:"small",type:"primary",onClick:w.startAll,title:"启用所有客户端通行"},{default:(0,a.withCtx)((()=>t[12]||(t[12]=[(0,a.createTextVNode)("全部允许")]))),_:1},8,["onClick"])]),(0,a.createElementVNode)("div",u,[(0,a.createVNode)(v,{icon:"el-icon-circle-close",size:"small",type:"danger",onClick:w.stopAll,title:"禁用所有客户端通行"},{default:(0,a.withCtx)((()=>t[13]||(t[13]=[(0,a.createTextVNode)("全部禁止")]))),_:1},8,["onClick"])])]),(0,a.createVNode)(y,{size:"small",data:N.tableData,style:{width:"100%"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(x,{label:"客户端ID(系统生成)",width:"290"},{default:(0,a.withCtx)((({row:e})=>[(0,a.createVNode)(C,{size:"small",type:"warning",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.id),1)])),_:2},1024)])),_:1}),(0,a.createVNode)(x,{label:"分组"},{default:(0,a.withCtx)((({row:e})=>[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(N.groupOptions,(t=>(0,a.withDirectives)(((0,a.openBlock)(),(0,a.createBlock)(C,{key:t.value,size:"small",type:""},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(t.label),1)])),_:2},1024)),[[a.vShow,t.value===e.groupCode]]))),128))])),_:1}),(0,a.createVNode)(x,{label:"名称",prop:"name"}),(0,a.createVNode)(x,{label:"IP地址",prop:"ip"}),(0,a.createVNode)(x,{label:"TOKEN"},{default:(0,a.withCtx)((({row:o})=>[null!=o.token&&""!=o.token?((0,a.openBlock)(),(0,a.createBlock)(C,{key:0,size:"small",type:"success",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>t[15]||(t[15]=[(0,a.createTextVNode)("JWT通行令牌")]))),_:1})):(0,a.createCommentVNode)("",!0),null==o.token||""==o.token?((0,a.openBlock)(),(0,a.createBlock)(C,{key:1,size:"small",type:"",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>t[16]||(t[16]=[(0,a.createTextVNode)("无通行令牌")]))),_:1})):(0,a.createCommentVNode)("",!0),"1"==o.isTimeout?((0,a.openBlock)(),(0,a.createBlock)(C,{key:2,size:"small",type:"danger",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>t[17]||(t[17]=[(0,a.createTextVNode)("已过期")]))),_:1})):(0,a.createCommentVNode)("",!0),null!=o.token&&""!=o.token&&"1"!=o.isTimeout?((0,a.openBlock)(),(0,a.createBlock)(C,{key:3,size:"small",type:"primary",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>t[18]||(t[18]=[(0,a.createTextVNode)("未过期")]))),_:1})):(0,a.createCommentVNode)("",!0),(0,a.createVNode)(_,{trigger:"click",placement:"bottom","v-model":!0},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(v,{type:"text",onClick:t=>w.queryRegClientTokenInfo(o,e.scope.$index),title:"点击查看JWT通行令牌"},null,8,["onClick"])])),default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",m,[t[30]||(t[30]=(0,a.createElementVNode)("div",{style:{"margin-bottom":"8px"}},[(0,a.createElementVNode)("span",{class:"route-title"},"JWT通行令牌")],-1)),(0,a.createElementVNode)("div",null,[t[22]||(t[22]=(0,a.createTextVNode)(" 过期时间:")),(0,a.createVNode)(E,{modelValue:N.tokenEffectiveTime,"onUpdate:modelValue":t[2]||(t[2]=e=>N.tokenEffectiveTime=e),type:"datetime",placeholder:"选择截止过期时间",style:{width:"300px"},"value-format":"yyyy-MM-dd HH:mm:ss"},null,8,["modelValue"]),t[23]||(t[23]=(0,a.createElementVNode)("br",null,null,-1)),t[24]||(t[24]=(0,a.createElementVNode)("br",null,null,-1)),t[25]||(t[25]=(0,a.createTextVNode)(" 加密密钥:")),(0,a.createVNode)(T,{placeholder:"请输入加密密钥(最长200个字符,为空则默认取客户端ID)",modelValue:N.secretKey,"onUpdate:modelValue":t[3]||(t[3]=e=>N.secretKey=e),maxlength:"200",style:{width:"430px"},clearable:""},null,8,["modelValue"]),t[26]||(t[26]=(0,a.createElementVNode)("br",null,null,-1)),t[27]||(t[27]=(0,a.createElementVNode)("br",null,null,-1)),(0,a.createVNode)(T,{size:"small",type:"textarea",rows:8,placeholder:"JWT通行令牌内容",modelValue:N.token,"onUpdate:modelValue":t[4]||(t[4]=e=>N.token=e),disabled:N.tokenIsTrue},null,8,["modelValue","disabled"]),t[28]||(t[28]=(0,a.createElementVNode)("br",null,null,-1)),t[29]||(t[29]=(0,a.createElementVNode)("br",null,null,-1)),(0,a.createElementVNode)("div",p,[(0,a.createVNode)(v,{icon:"el-icon-delete",size:"small",type:"danger",onClick:e=>w.handleRemoveToken(o)},{default:(0,a.withCtx)((()=>t[19]||(t[19]=[(0,a.createTextVNode)("清空令牌")]))),_:2},1032,["onClick"]),(0,a.createVNode)(v,{icon:"el-icon-refresh",size:"small",type:"primary",onClick:e=>w.handleCreateToken(o)},{default:(0,a.withCtx)((()=>t[20]||(t[20]=[(0,a.createTextVNode)("生成令牌")]))),_:2},1032,["onClick"]),(0,a.createVNode)(v,{icon:"el-icon-document-copy",size:"small",type:"success",onClick:t[5]||(t[5]=e=>w.handleCopyToken())},{default:(0,a.withCtx)((()=>t[21]||(t[21]=[(0,a.createTextVNode)("复制令牌")]))),_:1})])])])])),_:2},1024)])),_:1}),(0,a.createVNode)(x,{label:"TOKEN过期时间",prop:"tokenEffectiveTime"}),(0,a.createVNode)(x,{label:"状态",prop:"status",formatter:w.formatterStatus},{default:(0,a.withCtx)((({row:e})=>["0"===e.regServerStatus?((0,a.openBlock)(),(0,a.createElementBlock)("div",h,[t[32]||(t[32]=(0,a.createElementVNode)("i",{class:"el-icon-success",style:{color:"#409EFF"}},null,-1)),t[33]||(t[33]=(0,a.createTextVNode)(" ")),(0,a.createVNode)(C,{size:"mini"},{default:(0,a.withCtx)((()=>t[31]||(t[31]=[(0,a.createTextVNode)((0,a.toDisplayString)("允许通行"))]))),_:1})])):(0,a.createCommentVNode)("",!0),"1"===e.regServerStatus?((0,a.openBlock)(),(0,a.createElementBlock)("div",f,[t[35]||(t[35]=(0,a.createElementVNode)("i",{class:"el-icon-error",style:{color:"#f00000"}},null,-1)),t[36]||(t[36]=(0,a.createTextVNode)(" ")),(0,a.createVNode)(C,{size:"mini",type:"danger"},{default:(0,a.withCtx)((()=>t[34]||(t[34]=[(0,a.createTextVNode)((0,a.toDisplayString)("禁止通行"))]))),_:1})])):(0,a.createCommentVNode)("",!0)])),_:1},8,["formatter"]),(0,a.createVNode)(x,{label:"注册时间",prop:"regServerTime"}),(0,a.createVNode)(x,{label:"操作",width:"60"},{default:(0,a.withCtx)((({row:e})=>[(0,a.createVNode)(B,{trigger:"click",onCommand:w.handleCommandRegClient},{dropdown:(0,a.withCtx)((()=>[(0,a.createVNode)(z,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)(S,{command:{command:"start",row:e}},{default:(0,a.withCtx)((()=>t[37]||(t[37]=[(0,a.createElementVNode)("i",{class:"el-icon-success",style:{color:"#409EFF"}},null,-1),(0,a.createTextVNode)("允许通行")]))),_:2},1032,["command"]),(0,a.createVNode)(S,{command:{command:"stop",row:e}},{default:(0,a.withCtx)((()=>t[38]||(t[38]=[(0,a.createElementVNode)("i",{class:"el-icon-error",style:{color:"red"}},null,-1),(0,a.createTextVNode)("禁止通行")]))),_:2},1032,["command"]),(0,a.createVNode)(S,{command:{command:"delete",row:e},divided:""},{default:(0,a.withCtx)((()=>t[39]||(t[39]=[(0,a.createElementVNode)("i",{class:"el-icon-delete"},null,-1),(0,a.createTextVNode)("移除")]))),_:2},1032,["command"])])),_:2},1024)])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(v,{circle:"",icon:"el-icon-setting",title:"设置",style:{border:"0px"}})])),_:2},1032,["onCommand"])])),_:1})])),_:1},8,["data"]),(0,a.createElementVNode)("div",V,[(0,a.createVNode)(b,{onSizeChange:w.handleSizeChange,onCurrentChange:w.handleCurrentChange,"current-page":N.currentPage,"page-sizes":[10,30,50],"page-size":N.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:N.totalNum},null,8,["onSizeChange","onCurrentChange","current-page","page-size","total"])])])),_:1})])),_:1})])),_:1})])}]])},901:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return k}});var a=o(2740);const l={class:"language-java line-numbers",style:{height:"500px"}},r={slot:"footer",class:"dialog-footer"},n={slot:"footer",class:"dialog-footer"},i={class:"language-java line-numbers",style:{height:"700px"}},d=["innerHTML"],c={slot:"footer",class:"dialog-footer"},s={slot:"header",class:"clearfix"},u={style:{"margin-left":"50px"}},m={style:{"font-size":"11pt"}},p={style:{float:"right","margin-left":"10px"}};o(3789),o(6087),o(8602);const h={"slot-scope":"scope"},f={"slot-scope":"scope"},V={"slot-scope":"scope"},g={key:0},N={key:1},w={"slot-scope":"scope"};var C={data(){return{name:"groovyScriptTable"}},props:["tableData"],created:function(){this.init()},methods:{init(){console.log("tableData",this.tableData)},queryCode(e){console.log(this.$parent),this.$emit("queryCode",e)},handleCommandRegServer(e){this.$emit("handleCommandRegServer",e)}}},x=o(2653),v=(0,x.Z)(C,[["render",function(e,t,o,l,r,n){const i=(0,a.resolveComponent)("el-table-column"),d=(0,a.resolveComponent)("el-link"),c=(0,a.resolveComponent)("el-tag"),s=(0,a.resolveComponent)("el-button"),u=(0,a.resolveComponent)("el-dropdown-item"),m=(0,a.resolveComponent)("el-dropdown-menu"),p=(0,a.resolveComponent)("el-dropdown"),C=(0,a.resolveComponent)("el-table");return(0,a.openBlock)(),(0,a.createElementBlock)("div",null,[(0,a.createVNode)(C,{size:"small",data:o.tableData,style:{width:"100%"},height:"600"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(i,{label:"组件名称",prop:"name",width:"250"}),(0,a.createVNode)(i,{label:"组件参数",prop:"extendInfo"}),(0,a.createVNode)(i,{label:"组件代码",prop:"content",width:"200"},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("template",h,[(0,a.createVNode)(d,{icon:"el-icon-view",type:"primary",onClick:t[0]||(t[0]=t=>n.queryCode(e.scope.row)),style:{"font-size":"12px"}},{default:(0,a.withCtx)((()=>t[1]||(t[1]=[(0,a.createTextVNode)((0,a.toDisplayString)("查看组件代码..."))]))),_:1})])])),_:1}),(0,a.createVNode)(i,{label:"组件说明",prop:"remarks"}),(0,a.createVNode)(i,{label:"排序",prop:"orderNum",width:"100"}),(0,a.createVNode)(i,{label:"执行事件",prop:"event",width:"160"},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("template",f,["request"===e.scope.row.event?((0,a.openBlock)(),(0,a.createBlock)(c,{key:0,size:"small",effect:"plain"},{default:(0,a.withCtx)((()=>t[2]||(t[2]=[(0,a.createTextVNode)("REQUEST")]))),_:1})):(0,a.createCommentVNode)("",!0),"response"===e.scope.row.event?((0,a.openBlock)(),(0,a.createBlock)(c,{key:1,size:"small",type:"success",effect:"plain"},{default:(0,a.withCtx)((()=>t[3]||(t[3]=[(0,a.createTextVNode)("RESPONSE")]))),_:1})):(0,a.createCommentVNode)("",!0)])])),_:1}),(0,a.createVNode)(i,{label:"创建时间",prop:"createTime",width:"200"}),(0,a.createVNode)(i,{label:"状态",prop:"status",width:"120"},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("template",V,["0"===e.scope.row.status?((0,a.openBlock)(),(0,a.createElementBlock)("div",g,[t[5]||(t[5]=(0,a.createElementVNode)("i",{class:"el-icon-success",style:{color:"#409EFF"}},null,-1)),t[6]||(t[6]=(0,a.createTextVNode)(" ")),(0,a.createVNode)(c,{size:"mini"},{default:(0,a.withCtx)((()=>t[4]||(t[4]=[(0,a.createTextVNode)((0,a.toDisplayString)("开启"))]))),_:1})])):(0,a.createCommentVNode)("",!0),"1"===e.scope.row.status?((0,a.openBlock)(),(0,a.createElementBlock)("div",N,[t[8]||(t[8]=(0,a.createElementVNode)("i",{class:"el-icon-error",style:{color:"#f00000"}},null,-1)),t[9]||(t[9]=(0,a.createTextVNode)(" ")),(0,a.createVNode)(c,{size:"mini",type:"danger"},{default:(0,a.withCtx)((()=>t[7]||(t[7]=[(0,a.createTextVNode)((0,a.toDisplayString)("关闭"))]))),_:1})])):(0,a.createCommentVNode)("",!0)])])),_:1}),(0,a.createVNode)(i,{label:"操作",width:"80"},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("template",w,[(0,a.createVNode)(p,{trigger:"click",onCommand:n.handleCommandRegServer},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(s,{size:"mini",circle:"",icon:"el-icon-setting",title:"设置",style:{border:"0px"}}),(0,a.createVNode)(m,{slot:"dropdown"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(u,{command:{command:"edit",row:e.scope.row}},{default:(0,a.withCtx)((()=>t[10]||(t[10]=[(0,a.createElementVNode)("i",{class:"el-icon-edit"},null,-1),(0,a.createTextVNode)("编辑")]))),_:1},8,["command"]),(0,a.createVNode)(u,{command:{command:"start",row:e.scope.row},divided:""},{default:(0,a.withCtx)((()=>t[11]||(t[11]=[(0,a.createElementVNode)("i",{class:"el-icon-success",style:{color:"#409EFF"}},null,-1),(0,a.createTextVNode)("开启")]))),_:1},8,["command"]),(0,a.createVNode)(u,{command:{command:"stop",row:e.scope.row}},{default:(0,a.withCtx)((()=>t[12]||(t[12]=[(0,a.createElementVNode)("i",{class:"el-icon-error",style:{color:"red"}},null,-1),(0,a.createTextVNode)("关闭")]))),_:1},8,["command"]),(0,a.createVNode)(u,{command:{command:"up",row:e.scope.row},divided:""},{default:(0,a.withCtx)((()=>t[13]||(t[13]=[(0,a.createElementVNode)("i",{class:"el-icon-upload2"},null,-1),(0,a.createTextVNode)("上移")]))),_:1},8,["command"]),(0,a.createVNode)(u,{command:{command:"down",row:e.scope.row}},{default:(0,a.withCtx)((()=>t[14]||(t[14]=[(0,a.createElementVNode)("i",{class:"el-icon-download"},null,-1),(0,a.createTextVNode)("下移")]))),_:1},8,["command"]),(0,a.createVNode)(u,{command:{command:"delete",row:e.scope.row,index:e.scope.index},divided:""},{default:(0,a.withCtx)((()=>t[15]||(t[15]=[(0,a.createElementVNode)("i",{class:"el-icon-delete"},null,-1),(0,a.createTextVNode)("移除")]))),_:1},8,["command"])])),_:1})])),_:1},8,["onCommand"])])])),_:1})])),_:1},8,["data"])])}]]),y=o(2310),b={data(){return{innerVisible:!1,dialogCodeVisible:!1,dialogFormVisible:!1,formLabelWidth:"100px",handleType:null,routeForm:{},groovyForm:{name:"",extendInfo:"",event:"request",content:"",remarks:""},rules:{name:[{required:!0,message:"请输入组件名称",trigger:"blur"},{min:3,max:40,message:"长度在 3 到 40 个字符",trigger:"blur"}],content:[{required:!0,message:"请输入组件代码",trigger:"blur"}]},tableData:[],requestTableData:[],responseTableData:[],submitVisible:!1,successVisible:!1,failVisible:!1,groovScriptCode:"",codeErrorMsg:"",activeName:"request"}},components:{groovyScriptTableComponent:v},created:function(){let e=this.$route.query;if(e){let t=e.route;console.log("route",t),this.init(t)}},mounted:function(){},beforeDestroy:function(){},methods:{init(e){e&&(this.routeForm=e.form,this.groovyScriptList())},goBack(){console.log("go back"),this.$router.push({path:"/gatewayList",query:{}})},handleCommandRegServer(e){console.log("command",e);let t=this;if(this.handleType=e.command,"edit"===e.command)this.groovyForm=JSON.parse(JSON.stringify(e.row)),this.resetVisible(),this.dialogFormVisible=!0;else if("start"===e.command)this.$confirm('确认开启"'+e.row.name+'"规则引擎动态脚本组件?').then((o=>{var a;(a={id:e.row.id},(0,y.WY)({url:"/gateway-manage/groovyScript/start",method:"get",data:a})).then((function(o){t.GLOBAL_FUN.successMsg(),e.row.status="0"}))})).catch((e=>{}));else if("stop"===e.command)this.$confirm('确认关闭"'+e.row.name+'"规则引擎动态脚本组件?').then((o=>{var a;(a={id:e.row.id},(0,y.WY)({url:"/gateway-manage/groovyScript/stop",method:"get",data:a})).then((function(o){t.GLOBAL_FUN.successMsg(),e.row.status="1"}))})).catch((e=>{}));else if("up"===e.command){let o=e.row;if(o&&1===o.orderNum)return t.GLOBAL_FUN.successMsg("已经是排序第一位"),!1;this.$confirm('确认上移"'+o.name+'"规则引擎动态脚本组件?').then((e=>{var a;(a={id:o.id},(0,y.WY)({url:"/gateway-manage/groovyScript/up",method:"get",data:a})).then((function(e){t.GLOBAL_FUN.successMsg(),t.groovyScriptList()}))})).catch((e=>{}))}else if("down"===e.command){let o=e.row,a=this.tableData[this.tableData.length-1];if(o&&a&&o.id===a.id)return t.GLOBAL_FUN.successMsg("已经是排序最后一位"),!1;this.$confirm('确认下移"'+o.name+'"规则引擎动态脚本组件?').then((e=>{var a;(a={id:o.id},(0,y.WY)({url:"/gateway-manage/groovyScript/down",method:"get",data:a})).then((function(e){t.GLOBAL_FUN.successMsg(),t.groovyScriptList()}))})).catch((e=>{}))}else"delete"===e.command&&this.$confirm('确认删除"'+e.row.name+'"规则引擎动态脚本组件?').then((o=>{var a;(a={id:e.row.id},(0,y.WY)({url:"/gateway-manage/groovyScript/delete",method:"get",data:a})).then((function(e){t.GLOBAL_FUN.successMsg(),t.groovyScriptList()}))})).catch((e=>{}))},queryCode(e){this.groovScriptCode=e.content,this.dialogCodeVisible=!0,setTimeout((()=>Prism.highlightAll()),50)},addRule(){this.resetVisible(),this.$refs.groovyForm&&this.$refs.groovyForm.resetFields(),this.handleType="add",this.groovyForm=this.$options.data().groovyForm,this.dialogFormVisible=!0},submitForm(){console.log("handleType",this.handleType);let e=this;this.$refs.groovyForm.validate((t=>{if(t){this.submitVisible=!0,this.failVisible=!1,this.successVisible=!1,this.groovyForm.routeId=this.routeForm.id;let t="add"==this.handleType?"/groovyScript/add":"/groovyScript/update";this.$ajax.post(this.GLOBAL_VAR.baseURL+t,this.groovyForm).then((t=>{t&&t.data&&"1"==t.data.code&&(e.successVisible=!0,e.GLOBAL_FUN.successMsg(),e.groovyScriptList())})).catch((t=>{t&&t.response&&(e.failVisible=!0,t.response.data?(e.codeErrorMsg=t.response.data.msg,e.GLOBAL_FUN.errorMsg("操作失败,请查看失败日志!")):e.GLOBAL_FUN.errorMsg("操作失败!"))}))}}))},showLog(){this.innerVisible=!0,setTimeout((()=>Prism.highlightAll()),50)},resetVisible(){this.submitVisible=!1,this.successVisible=!1,this.failVisible=!1},handleClickTabs(e,t){console.log(e,t),"0"===e.index?this.tableData=this.requestTableData:this.tableData=this.responseTableData},showGroovyScriptCode(){this.groovyForm.content=(()=>{let e="package com.flying.fish.gateway.component.groovy;\n";return e+=" \n",e+="import com.flying.fish.formwork.base.BaseGroovyService;\n",e+="import com.flying.fish.formwork.util.NetworkIpUtils;\n",e+="import org.apache.commons.lang3.*;\n",e+="import org.slf4j.*;\n",e+="import org.springframework.http.HttpHeaders;\n",e+="import org.springframework.http.server.reactive.ServerHttpRequest;\n",e+="import org.springframework.web.server.ServerWebExchange;\n",e+="import java.util.Map;\n",e+="/**\n",e+=" * @Description\n",e+=" * @Author admin\n",e+=" * @Version V1.0\n",e+="*/\n",e+="public class ParameterGroovyService extends BaseGroovyService {\n",e+=' private Logger log = LoggerFactory.getLogger("ParameterGroovyService");\n',e+=" @Override\n",e+=" public void apply(ServerWebExchange exchange) throws Exception {\n",e+=" ServerHttpRequest request = exchange.getRequest();\n",e+=" HttpHeaders headers = exchange.getRequest().getHeaders();\n",e+=" String remoteAddr = NetworkIpUtils.getIpAddress(request);\n",e+=" \n",e+=" //routeId, ruleName, extednInfo从继承父类BaseGroovyService中获取\n",e+=' log.info("网关路由【{}】执行GroovySrcipt规则引擎动态脚本组件名称【{}】,扩展参数【{}】", routeId, ruleName, extednInfo);\n',e+=" \n",e+=" Map<String,String> valueMap = request.getQueryParams().toSingleValueMap();\n",e+=' String userId = valueMap.get("userId");\n',e+=" if (StringUtils.isBlank(userId)){\n",e+=' throw new IllegalArgumentException("缺少userId参数");\n',e+=" }\n",e+=" }\n",e+="}",'package com.flying.fish.gateway.component.groovy;\n \nimport com.flying.fish.formwork.base.BaseGroovyService;\nimport com.flying.fish.formwork.util.NetworkIpUtils;\nimport org.apache.commons.lang3.*;\nimport org.slf4j.*;\nimport org.springframework.http.HttpHeaders;\nimport org.springframework.http.server.reactive.ServerHttpRequest;\nimport org.springframework.web.server.ServerWebExchange;\nimport java.util.Map;\n/**\n * @Description\n * @Author admin\n * @Version V1.0\n*/\npublic class ParameterGroovyService extends BaseGroovyService {\n private Logger log = LoggerFactory.getLogger("ParameterGroovyService");\n @Override\n public void apply(ServerWebExchange exchange) throws Exception {\n ServerHttpRequest request = exchange.getRequest();\n HttpHeaders headers = exchange.getRequest().getHeaders();\n String remoteAddr = NetworkIpUtils.getIpAddress(request);\n \n //routeId, ruleName, extednInfo从继承父类BaseGroovyService中获取\n log.info("网关路由【{}】执行GroovySrcipt规则引擎动态脚本组件名称【{}】,扩展参数【{}】", routeId, ruleName, extednInfo);\n \n Map<String,String> valueMap = request.getQueryParams().toSingleValueMap();\n String userId = valueMap.get("userId");\n if (StringUtils.isBlank(userId)){\n throw new IllegalArgumentException("缺少userId参数");\n }\n }\n}'})()},groovyScriptList(){let e=this;var t;(t={routeId:this.routeForm.id},(0,y.WY)({url:"/gateway-manage/groovyScript/list",method:"get",data:t})).then((t=>{t.data&&(e.requestTableData=[],e.responseTableData=[],t.data.forEach(((t,o)=>{"request"==t.event?e.requestTableData.push(t):e.responseTableData.push(t)})))}))}}},k=(0,x.Z)(b,[["render",function(e,t,o,h,f,V){const g=(0,a.resolveComponent)("el-page-header"),N=(0,a.resolveComponent)("el-input"),w=(0,a.resolveComponent)("el-form-item"),C=(0,a.resolveComponent)("el-tag"),x=(0,a.resolveComponent)("el-radio"),v=(0,a.resolveComponent)("el-link"),y=(0,a.resolveComponent)("el-form"),b=(0,a.resolveComponent)("el-button"),k=(0,a.resolveComponent)("el-dialog"),_=(0,a.resolveComponent)("el-popover"),E=(0,a.resolveComponent)("groovyScriptTableComponent"),T=(0,a.resolveComponent)("el-tab-pane"),S=(0,a.resolveComponent)("el-tabs"),z=(0,a.resolveComponent)("el-card"),B=(0,a.resolveComponent)("el-col"),F=(0,a.resolveComponent)("el-row");return(0,a.openBlock)(),(0,a.createElementBlock)("div",null,[(0,a.createVNode)(g,{onBack:V.goBack,content:"网关路由规则组件"},null,8,["onBack"]),(0,a.createVNode)(k,{title:"添加规则组件",modelValue:f.dialogFormVisible,"onUpdate:modelValue":t[9]||(t[9]=e=>f.dialogFormVisible=e),width:"70%","close-on-click-modal":!1},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(y,{model:f.groovyForm,"status-icon":"",rules:f.rules,ref:"groovyForm","label-width":"100px",size:"mini"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(w,{label:"组件名称",prop:"name"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(N,{modelValue:f.groovyForm.name,"onUpdate:modelValue":t[0]||(t[0]=e=>f.groovyForm.name=e),autocomplete:"off",placeholder:"请输入组件名称"},null,8,["modelValue"])])),_:1}),(0,a.createVNode)(w,{label:"扩展参数",prop:"extendInfo"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(N,{modelValue:f.groovyForm.extendInfo,"onUpdate:modelValue":t[1]||(t[1]=e=>f.groovyForm.extendInfo=e),autocomplete:"off",placeholder:"请输入组件参数,建议使用json格式"},null,8,["modelValue"])])),_:1}),(0,a.createVNode)(w,{label:"执行事件",prop:"event"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(x,{modelValue:f.groovyForm.event,"onUpdate:modelValue":t[2]||(t[2]=e=>f.groovyForm.event=e),label:"request"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(C,{size:"small",effect:"plain"},{default:(0,a.withCtx)((()=>t[13]||(t[13]=[(0,a.createTextVNode)("REQUEST")]))),_:1})])),_:1},8,["modelValue"]),(0,a.createVNode)(x,{modelValue:f.groovyForm.event,"onUpdate:modelValue":t[3]||(t[3]=e=>f.groovyForm.event=e),label:"response"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(C,{size:"small",type:"success",effect:"plain"},{default:(0,a.withCtx)((()=>t[14]||(t[14]=[(0,a.createTextVNode)("RESPONSE")]))),_:1})])),_:1},8,["modelValue"])])),_:1}),(0,a.createVNode)(w,{label:"组件代码",prop:"content"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(N,{type:"textarea",rows:25,modelValue:f.groovyForm.content,"onUpdate:modelValue":t[4]||(t[4]=e=>f.groovyForm.content=e),placeholder:"请输入内容"},null,8,["modelValue"])])),_:1}),(0,a.createVNode)(w,{label:"备注",prop:"remarks"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(N,{modelValue:f.groovyForm.remarks,"onUpdate:modelValue":t[5]||(t[5]=e=>f.groovyForm.remarks=e),autocomplete:"off"},null,8,["modelValue"])])),_:1}),(0,a.createVNode)(w,{label:"编译说明"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(C,{type:"warning"},{default:(0,a.withCtx)((()=>t[15]||(t[15]=[(0,a.createTextVNode)("组件代码采用GroovyScipt动态脚本语言,无缝支持java语法和包")]))),_:1}),t[21]||(t[21]=(0,a.createTextVNode)("    ")),(0,a.createVNode)(v,{type:"primary",onClick:V.showGroovyScriptCode},{default:(0,a.withCtx)((()=>t[16]||(t[16]=[(0,a.createTextVNode)("导入GroovyScipt示例代码")]))),_:1},8,["onClick"]),t[22]||(t[22]=(0,a.createTextVNode)("      ")),(0,a.withDirectives)((0,a.createVNode)(v,{icon:"el-icon-upload2",type:"primary"},{default:(0,a.withCtx)((()=>t[17]||(t[17]=[(0,a.createTextVNode)(" 提交中 > ")]))),_:1},512),[[a.vShow,f.submitVisible]]),(0,a.withDirectives)((0,a.createVNode)(v,{icon:"el-icon-loading",type:"primary"},{default:(0,a.withCtx)((()=>t[18]||(t[18]=[(0,a.createTextVNode)(" 编译中 > ")]))),_:1},512),[[a.vShow,f.submitVisible]]),(0,a.withDirectives)((0,a.createVNode)(v,{icon:"el-icon-finished",type:"success"},{default:(0,a.withCtx)((()=>t[19]||(t[19]=[(0,a.createTextVNode)(" 编译成功 ")]))),_:1},512),[[a.vShow,f.successVisible]]),(0,a.withDirectives)((0,a.createVNode)(v,{icon:"el-icon-close",type:"danger",onClick:V.showLog},{default:(0,a.withCtx)((()=>t[20]||(t[20]=[(0,a.createTextVNode)(" 编译失败 查看失败日志 ")]))),_:1},8,["onClick"]),[[a.vShow,f.failVisible]])])),_:1})])),_:1},8,["model","rules"]),(0,a.createVNode)(k,{width:"65%",title:"编译失败日志",modelValue:f.innerVisible,"onUpdate:modelValue":t[7]||(t[7]=e=>f.innerVisible=e),"append-to-body":""},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("pre",l,[(0,a.createElementVNode)("code",null,(0,a.toDisplayString)(f.codeErrorMsg),1)]),(0,a.createElementVNode)("div",r,[(0,a.createVNode)(b,{icon:"el-icon-s-release",size:"mini",type:"warning",onClick:t[6]||(t[6]=e=>f.innerVisible=!1)},{default:(0,a.withCtx)((()=>t[23]||(t[23]=[(0,a.createTextVNode)("关 闭")]))),_:1})])])),_:1},8,["modelValue"]),(0,a.createElementVNode)("div",n,[(0,a.createVNode)(b,{icon:"el-icon-s-claim",size:"mini",type:"success",onClick:V.submitForm},{default:(0,a.withCtx)((()=>t[24]||(t[24]=[(0,a.createTextVNode)("提 交")]))),_:1},8,["onClick"]),(0,a.createVNode)(b,{icon:"el-icon-s-release",size:"mini",type:"warning",onClick:t[8]||(t[8]=e=>f.dialogFormVisible=!1)},{default:(0,a.withCtx)((()=>t[25]||(t[25]=[(0,a.createTextVNode)("关 闭")]))),_:1})])])),_:1},8,["modelValue"]),(0,a.createVNode)(k,{title:"查看组件代码",modelValue:f.dialogCodeVisible,"onUpdate:modelValue":t[11]||(t[11]=e=>f.dialogCodeVisible=e),width:"60%","close-on-click-modal":!1},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",null,[(0,a.createElementVNode)("pre",i,[(0,a.createElementVNode)("code",{innerHTML:f.groovScriptCode},null,8,d)])]),(0,a.createElementVNode)("div",c,[(0,a.createVNode)(b,{icon:"el-icon-s-release",size:"mini",type:"warning",onClick:t[10]||(t[10]=e=>f.dialogCodeVisible=!1)},{default:(0,a.withCtx)((()=>t[26]||(t[26]=[(0,a.createTextVNode)("关 闭")]))),_:1})])])),_:1},8,["modelValue"]),(0,a.createVNode)(F,{gutter:20,style:{"margin-top":"20px"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(B,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)(z,{class:"box-card"},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",s,[t[30]||(t[30]=(0,a.createElementVNode)("span",null,"规则组件",-1)),(0,a.createVNode)(_,{trigger:"click",placement:"bottom"},{default:(0,a.withCtx)((()=>[t[27]||(t[27]=(0,a.createElementVNode)("div",{style:{"font-size":"10pt"}},[(0,a.createElementVNode)("span",null,"添加规则组件说明:"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"1. 开启路由服务端规则组件后,客户端请求到网关路由后,会进入规则组件过滤器。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"2. 规则组件过滤器根据添加的GroovyScript组件排序一一触发执行,当顺序执行组件过程抛出任意异常,则打断请求进程,直接返回客户端提示。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"3. 新添加的路由服务端规则组件后,默认为关闭状态,请手动开启后,立即生效。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"4. 路由服务端规则组件代码采用GroovyScipt动态脚本语言,无缝支持java语法和包。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"5. 路由服务端规则组件适用场景为,解决网关代理调用路由服务端之前,增加业务规则较验,如:签名较验、数据加签、参数验证、格式化处理、权限判断等。"),(0,a.createElementVNode)("br")],-1)),(0,a.createVNode)(b,{slot:"reference",style:{padding:"3px 0"},icon:"el-icon-question",type:"text",title:"说明"})])),_:1}),(0,a.createElementVNode)("span",u,[t[28]||(t[28]=(0,a.createElementVNode)("i",{class:"el-icon-monitor"},null,-1)),(0,a.createElementVNode)("span",m,[(0,a.createVNode)(C,{size:"mini",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(f.routeForm.name),1)])),_:1})])]),(0,a.createElementVNode)("div",p,[(0,a.createVNode)(b,{icon:"el-icon-circle-plus-outline",size:"small",type:"success",onClick:V.addRule,title:"查找服务端"},{default:(0,a.withCtx)((()=>t[29]||(t[29]=[(0,a.createTextVNode)(" 添加组件脚本 ")]))),_:1},8,["onClick"])])]),(0,a.createVNode)(S,{modelValue:f.activeName,"onUpdate:modelValue":t[12]||(t[12]=e=>f.activeName=e),"tab-position":"left",onTabClick:V.handleClickTabs,style:{height:"600px"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(T,{name:"request"},{default:(0,a.withCtx)((()=>[t[31]||(t[31]=(0,a.createElementVNode)("span",{slot:"label"},[(0,a.createElementVNode)("i",{class:"el-icon-position",style:{color:"#409EFF"}}),(0,a.createTextVNode)(" REQUEST")],-1)),(0,a.createVNode)(E,{ref:"groovyScriptTable",tableData:f.requestTableData,onQueryCode:V.queryCode,onHandleCommandRegServer:V.handleCommandRegServer},null,8,["tableData","onQueryCode","onHandleCommandRegServer"])])),_:1}),(0,a.createVNode)(T,{name:"response"},{default:(0,a.withCtx)((()=>[t[32]||(t[32]=(0,a.createElementVNode)("span",{slot:"label"},[(0,a.createElementVNode)("i",{class:"el-icon-s-promotion",style:{color:"#67C23A"}}),(0,a.createTextVNode)(" RESPONSE")],-1)),(0,a.createVNode)(E,{ref:"groovyScriptTable",tableData:f.responseTableData,onQueryCode:V.queryCode,onHandleCommandRegServer:V.handleCommandRegServer},null,8,["tableData","onQueryCode","onHandleCommandRegServer"])])),_:1})])),_:1},8,["modelValue","onTabClick"])])),_:1})])),_:1})])),_:1})])}]])},9461:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return V}});var a=o(2740);const l={class:"layout-padding"},r={class:"layout-padding-auto layout-padding-view"},n={class:"box-flex-between"},i={style:{float:"right"}},d={class:"block",style:{"margin-top":"20px"}};var c=o(550);const s={slot:"footer",class:"dialog-footer"};var u=o(9517),m={data(){return{name:"routeRequestCount",dialogFormVisible:!1,dialogTitle:"统计详情"}},created:function(){},methods:{count(e){this.dialogTitle=e.name+"统计详情";let t=this;(0,u.Ub)({id:e.id}).then((function(e){console.log(e),e.data&&(t.drawLine("route7dayAccessChart",e.data.dayCounts,"#37A2FF","rgba(128, 255, 165)","rgba(1, 191, 236)"),t.drawLine("route24HourAccessChart",e.data.hourCounts,"#FFBF00","rgba(55, 162, 255)","rgba(116, 21, 219)"),t.drawLine("route60MinAccessChart",e.data.minCounts,"#00DDFF","rgba(0, 221, 255)","rgba(77, 119, 255)"))}))},drawLine(e,t,o,a,l){let r=[],n=[];null!=t&&t.dates&&t.counts&&(r=t.dates,n=t.counts);let i=c.init(document.getElementById(e));var d={color:[o],tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},grid:{top:"5%",left:"1%",right:"2%",bottom:"1%",containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,data:r}],yAxis:{type:"value"},series:[{type:"line",smooth:!0,showSymbol:!0,areaStyle:{opacity:.8,color:c.graphic.LinearGradient(0,0,0,1,[{offset:0,color:a},{offset:1,color:l}])},emphasis:{focus:"series"},data:n}]};i.setOption(d,!0)}}},p=o(2653),h=(0,p.Z)(m,[["render",function(e,t,o,l,r,n){const i=(0,a.resolveComponent)("el-divider"),d=(0,a.resolveComponent)("el-button"),c=(0,a.resolveComponent)("el-dialog");return(0,a.openBlock)(),(0,a.createElementBlock)("div",null,[(0,a.createVNode)(c,{title:r.dialogTitle,modelValue:r.dialogFormVisible,"onUpdate:modelValue":t[1]||(t[1]=e=>r.dialogFormVisible=e),width:"55%","close-on-click-modal":!1},{default:(0,a.withCtx)((()=>[t[3]||(t[3]=(0,a.createElementVNode)("i",{class:"iconfont icon-icon_renwujincheng",style:{"font-size":"16pt",color:"#90A0A5"}},null,-1)),t[4]||(t[4]=(0,a.createElementVNode)("span",{class:"span_14"},"7日请求总量",-1)),(0,a.createVNode)(i,{style:{width:"80%"}}),t[5]||(t[5]=(0,a.createElementVNode)("div",{id:"route7dayAccessChart",class:"chart_line_2"},null,-1)),t[6]||(t[6]=(0,a.createElementVNode)("br",null,null,-1)),t[7]||(t[7]=(0,a.createElementVNode)("i",{class:"iconfont icon-yibiaopan",style:{"font-size":"16pt",color:"#90A0A5"}},null,-1)),t[8]||(t[8]=(0,a.createElementVNode)("span",{class:"span_14"},"24小时请求总量",-1)),(0,a.createVNode)(i,{style:{width:"80%"}}),t[9]||(t[9]=(0,a.createElementVNode)("div",{id:"route24HourAccessChart",class:"chart_line_2"},null,-1)),t[10]||(t[10]=(0,a.createElementVNode)("br",null,null,-1)),t[11]||(t[11]=(0,a.createElementVNode)("i",{class:"iconfont icon-yibiaopan",style:{"font-size":"16pt",color:"#90A0A5"}},null,-1)),t[12]||(t[12]=(0,a.createElementVNode)("span",{class:"span_14"},"60分钟请求总量",-1)),(0,a.createVNode)(i,{style:{width:"80%"}}),t[13]||(t[13]=(0,a.createElementVNode)("div",{id:"route60MinAccessChart",class:"chart_line_2"},null,-1)),(0,a.createElementVNode)("div",s,[(0,a.createVNode)(d,{icon:"el-icon-s-release",size:"mini",type:"warning",onClick:t[0]||(t[0]=e=>r.dialogFormVisible=!1)},{default:(0,a.withCtx)((()=>t[2]||(t[2]=[(0,a.createTextVNode)("关 闭")]))),_:1})])])),_:1},8,["title","modelValue"])])}]]),f={data(){return{form:{name:null,groupCode:null},direction:"rtl",dayCounts:[],hourCounts:[],tableData:[],currentPage:1,pageSize:10,totalNum:0,statusOptions:[{value:null,label:"所有"},{value:"0",label:"启用"},{value:"1",label:"禁用"}],groupOptions:this.GLOBAL_VAR.groups}},components:{routeRequestCountComponent:h},created:function(){this.init()},mounted:function(){},beforeDestroy:function(){},methods:{init(){this.search(),this.count()},handleSizeChange(e){this.pageSize=e,this.search()},handleCurrentChange(e){this.currentPage=e,this.search()},handleShowRouteCount(e){this.$refs.routeRequestCount.dialogFormVisible=!0,this.$refs.routeRequestCount.count(e)},count(){let e=this;(0,u.h1)().then((function(t){console.log(t),t.data&&(e.drawLine("apiAccessChart",t.data.dayCounts),e.drawLine("requestAccessChart",t.data.hourCounts))}))},search(){let e=this;(0,u.Vs)({name:this.form.name,groupCode:this.form.groupCode,currentPage:this.currentPage,pageSize:this.pageSize}).then((function(t){t.data&&(e.tableData=t.data.records,e.totalNum=t.data.total)}))},drawLine(e,t){let o=[],a=[];null!=t&&(o=t.dates,a=t.counts),console.log("chart data",a);var l={color:"#1890FF",tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},grid:{top:"5%",left:"1%",right:"2%",bottom:"1%",containLabel:!0},yAxis:{type:"value"},xAxis:{type:"category",data:o},series:[{data:a,type:"line",smooth:!0}]};c.init(document.getElementById(e)).setOption(l,!0)}}},V=(0,p.Z)(f,[["render",function(e,t,o,c,s,u){const m=(0,a.resolveComponent)("el-button"),p=(0,a.resolveComponent)("el-divider"),h=(0,a.resolveComponent)("el-col"),f=(0,a.resolveComponent)("el-row"),V=(0,a.resolveComponent)("el-option"),g=(0,a.resolveComponent)("el-select"),N=(0,a.resolveComponent)("el-input"),w=(0,a.resolveComponent)("el-tag"),C=(0,a.resolveComponent)("el-table-column"),x=(0,a.resolveComponent)("el-table"),v=(0,a.resolveComponent)("el-pagination"),y=(0,a.resolveComponent)("routeRequestCountComponent");return(0,a.openBlock)(),(0,a.createElementBlock)("div",l,[(0,a.createElementVNode)("div",r,[(0,a.createElementVNode)("div",n,[(0,a.createVNode)(m,{size:"small",icon:"el-icon-refresh",style:{"font-size":"16px",padding:"6px 12px"},onClick:u.count,title:"刷新统计图表"},null,8,["onClick"])]),(0,a.createVNode)(f,{gutter:24,style:{"margin-top":"16px"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(h,{span:12},{default:(0,a.withCtx)((()=>[t[2]||(t[2]=(0,a.createElementVNode)("div",{style:{"margin-left":"20px"}},[(0,a.createElementVNode)("i",{class:"iconfont icon-icon_renwujincheng",style:{"font-size":"16pt",color:"#90a0a5"}}),(0,a.createElementVNode)("span",{class:"span_14"},"7日请求总量")],-1)),(0,a.createVNode)(p,{style:{width:"80%"}}),t[3]||(t[3]=(0,a.createElementVNode)("div",{id:"apiAccessChart",class:"chart_line_1"},null,-1))])),_:1}),(0,a.createVNode)(h,{span:12},{default:(0,a.withCtx)((()=>[t[4]||(t[4]=(0,a.createElementVNode)("div",{style:{"margin-left":"20px"}},[(0,a.createElementVNode)("i",{class:"iconfont icon-yibiaopan",style:{"font-size":"16pt",color:"#90a0a5"}}),(0,a.createElementVNode)("span",{class:"span_14"},"24小时请求总量")],-1)),(0,a.createVNode)(p,{style:{width:"80%"}}),t[5]||(t[5]=(0,a.createElementVNode)("div",{id:"requestAccessChart",class:"chart_line_1"},null,-1))])),_:1})])),_:1}),(0,a.createVNode)(f,{style:{"margin-top":"18px"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(h,{span:10},{default:(0,a.withCtx)((()=>t[6]||(t[6]=[(0,a.createTextVNode)(" ")]))),_:1}),(0,a.createVNode)(h,{span:14},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",i,[(0,a.createVNode)(N,{placeholder:"请输入服务端名称",modelValue:s.form.name,"onUpdate:modelValue":t[1]||(t[1]=e=>s.form.name=e),class:"input-with-select",style:{width:"520px"}},{prepend:(0,a.withCtx)((()=>[(0,a.createVNode)(g,{modelValue:s.form.groupCode,"onUpdate:modelValue":t[0]||(t[0]=e=>s.form.groupCode=e),placeholder:"请选择分组",style:{width:"140px","margin-right":"10px"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(V,{label:"所有",value:""}),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(s.groupOptions,(e=>((0,a.openBlock)(),(0,a.createBlock)(V,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),append:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{icon:"el-icon-search",onClick:u.search},null,8,["onClick"])])),_:1},8,["modelValue"])])])),_:1})])),_:1}),(0,a.createVNode)(x,{size:"small",data:s.tableData,style:{"margin-top":"18px"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(C,{label:"服务ID",width:"300"},{default:(0,a.withCtx)((({row:e})=>[(0,a.createVNode)(w,{size:"small",type:"warning"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.id),1)])),_:2},1024)])),_:1}),(0,a.createVNode)(C,{label:"分组"},{default:(0,a.withCtx)((({row:e})=>[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(s.groupOptions,(t=>(0,a.withDirectives)(((0,a.openBlock)(),(0,a.createBlock)(w,{key:t.value,size:"small",type:""},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(t.label),1)])),_:2},1024)),[[a.vShow,t.value===e.groupCode]]))),128))])),_:1}),(0,a.createVNode)(C,{label:"服务名称"},{default:(0,a.withCtx)((({row:e})=>[(0,a.createVNode)(w,{size:"small",type:"success"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.name),1)])),_:2},1024)])),_:1}),(0,a.createVNode)(C,{label:"服务地址",prop:"uri"}),(0,a.createVNode)(C,{label:"断言路径",prop:"path"}),(0,a.createVNode)(C,{label:"今日请求总次数",prop:"count",width:"140",style:{"font-weight":"bold"}}),(0,a.createVNode)(C,{label:"查看",width:"80"},{default:(0,a.withCtx)((({row:e})=>[(0,a.createVNode)(m,{size:"mini",onClick:t=>u.handleShowRouteCount(e),circle:"",title:"请点击选中查看",class:"el-icon-s-data"},null,8,["onClick"])])),_:1})])),_:1},8,["data"]),(0,a.createElementVNode)("div",d,[(0,a.createVNode)(v,{onSizeChange:u.handleSizeChange,onCurrentChange:u.handleCurrentChange,"current-page":s.currentPage,"page-sizes":[10,30,50],"page-size":s.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:s.totalNum},null,8,["onSizeChange","onCurrentChange","current-page","page-size","total"])])]),(0,a.createVNode)(y,{ref:"routeRequestCount"},null,512)])}],["__scopeId","data-v-3bb2258c"]])},9334:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return g}});var a=o(2740);const l={"slot-scope":"{ node, data }"},r={style:{"font-size":"10pt"}},n={class:"clearfix"},i={style:{"font-weight":"bold"}},d={style:{"margin-left":"50px"}},c={style:{"font-size":"11pt"}},s={style:{"margin-left":"30px"}},u={style:{"font-size":"11pt"}},m={style:{"margin-left":"30px"}},p={style:{"font-size":"11pt"}};o(6087),o(8602),o(3789);var h=o(2310),f=o(3648),V={data(){return{id:"",handleType:"",isEdit:!1,drawer:!1,direction:"rtl",infoForm:{name:"API接口"},tableData:[],content:"",toolbars:{bold:!0,italic:!0,header:!0,underline:!0,mark:!0,superscript:!0,quote:!0,ol:!0,link:!0,imagelink:!0,help:!0,code:!0,table:!0,subfield:!0,fullscreen:!0,readmodel:!0,undo:!0,trash:!0,save:!0,navigation:!0,editable:!0,preview:!0,defaultOpen:"preview"},apiTreeData:[],defaultProps:{children:"children",label:"label"}}},created:function(){this.id="",this.handleType="",this.init()},components:{routeInfoComponent:f.Z},mounted:function(){},beforeDestroy:function(){},methods:{init(){this.list()},list(){let e=this;(0,h.WY)({url:"/gateway-manage/apiDoc/list",method:"get",data:undefined}).then((function(t){let o=t.data;if(e.tableData=o,o){let t=[],a=1;e.GLOBAL_VAR.groups.forEach(((e,o)=>{t.push({id:""+a,code:e.value,pcode:"",name:e.label}),a++})),o.forEach(((e,o)=>{t.push({id:e.id,code:e.id,pcode:e.groupCode,name:e.name})})),e.apiTreeData=e.GLOBAL_FUN.initTree(t)}}))},isNotGroups(e){let t=this.GLOBAL_VAR.groups,o=t.length;for(var a=0;a<o;a++)if(t[a].value===e)return!1;return!0},handleNodeClick(e){let t=this.handleType;if(!0===this.isEdit&&(this.handleType="edit"),"edit"===this.handleType)if("edit"===t){if(this.id==e.id)return!0;let t=this;this.$confirm("当前正在编辑文档内容,如未保存将会丢失已编辑内容,请确认是否切换?").then((o=>{1!=this.isEdit&&(t.handleType=""),t.info(e)})).catch((e=>{}))}else this.info(e);else{if(this.id==e.id)return!0;this.handleType="",this.info(e)}this.isEdit=!1},info(e){this.isNotGroups(e.code)?(this.infoForm=this.getTableDataItem(e.id),this.infoForm.isItem=!0):this.infoForm={id:e.id,name:e.label,isItem:!1},this.getApiDoc(e.id)},handleNodeEdit(e){this.isEdit=!0},handleNodeView(e){this.drawer=!0,this.infoForm=this.getTableDataItem(e.id)},handleClose(e){e()},handleSave(){let e=!0;null==this.content||null==this.content||""==this.content||this.content.length<=0?(!1,this.$confirm("文档内空是空的,请确认是否提交?").then((e=>{this.save()})).catch((e=>{}))):this.save()},getTableDataItem(e){let t={},o=this.tableData.length;for(var a=0;a<o;a++){let o=this.tableData[a];if(e===o.id){t=o;break}}return t},save(){let e=this;var t;(t={id:this.infoForm.id,content:this.content},(0,h.WY)({url:"/gateway-manage/apiDoc/save",method:"post",data:t})).then((function(t){console.log(t),e.handleType="",e.GLOBAL_FUN.successMsg()}))},getApiDoc(e){this.content="",this.id=e;let t=this;var o;(o={id:e},(0,h.WY)({url:"/gateway-manage/apiDoc/findById",method:"get",data:o})).then((function(e){e.data&&(t.content=e.data.content)}))}}},g=(0,o(2653).Z)(V,[["render",function(e,t,o,h,f,V){const g=(0,a.resolveComponent)("el-button"),N=(0,a.resolveComponent)("el-tree"),w=(0,a.resolveComponent)("el-card"),C=(0,a.resolveComponent)("el-col"),x=(0,a.resolveComponent)("el-tag"),v=(0,a.resolveComponent)("mavon-editor"),y=(0,a.resolveComponent)("el-row"),b=(0,a.resolveComponent)("routeInfoComponent"),k=(0,a.resolveComponent)("el-drawer");return(0,a.openBlock)(),(0,a.createElementBlock)("div",null,[(0,a.createVNode)(y,{gutter:18},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(C,{span:4},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(w,{shadow:"always"},{default:(0,a.withCtx)((()=>[t[5]||(t[5]=(0,a.createElementVNode)("span",{style:{"font-size":"18pt","font-weight":"bold"}},"接口文档",-1)),(0,a.createVNode)(N,{data:f.apiTreeData,props:f.defaultProps,onNodeClick:V.handleNodeClick,"expand-on-click-node":!1,style:{"margin-top":"20px"}},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("span",l,[(0,a.createElementVNode)("span",r,(0,a.toDisplayString)(e.node.label),1),(0,a.createElementVNode)("span",null,[(0,a.createVNode)(g,{size:"mini",circle:"",icon:"el-icon-edit",title:"编辑",style:{border:"0px","margin-left":"0px","font-size":"10pt",padding:"2px"},onClick:t[0]||(t[0]=()=>V.handleNodeEdit(e.data)),disabled:"edit"==f.handleType&&f.id!=e.data.id},null,8,["disabled"]),(0,a.withDirectives)((0,a.createVNode)(g,{size:"mini",circle:"",icon:"el-icon-view",title:"详情",style:{border:"0px","margin-left":"0px","font-size":"10pt",padding:"2px"},onClick:t[1]||(t[1]=()=>V.handleNodeView(e.data))},null,512),[[a.vShow,V.isNotGroups(e.node.data.code)]])])])])),_:1},8,["data","props","onNodeClick"])])),_:1})])),_:1}),(0,a.createVNode)(C,{span:20},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(w,{shadow:"always"},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",n,[t[9]||(t[9]=(0,a.createElementVNode)("i",{class:"el-icon-monitor"},null,-1)),(0,a.createElementVNode)("span",i,(0,a.toDisplayString)(f.infoForm.name),1),(0,a.withDirectives)((0,a.createElementVNode)("span",d,[t[6]||(t[6]=(0,a.createElementVNode)("i",{class:"el-icon-position"},null,-1)),(0,a.createElementVNode)("span",c,[(0,a.createVNode)(x,{size:"mini",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(f.infoForm.id),1)])),_:1})])],512),[[a.vShow,f.infoForm.isItem]]),(0,a.withDirectives)((0,a.createElementVNode)("span",s,[t[7]||(t[7]=(0,a.createElementVNode)("i",{class:"el-icon-link"},null,-1)),(0,a.createElementVNode)("span",u,[(0,a.createVNode)(x,{size:"mini",type:"success",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(f.infoForm.path),1)])),_:1})])],512),[[a.vShow,f.infoForm.isItem]]),(0,a.withDirectives)((0,a.createElementVNode)("span",m,[t[8]||(t[8]=(0,a.createElementVNode)("i",{class:"el-icon-connection"},null,-1)),(0,a.createElementVNode)("span",p,[(0,a.createVNode)(x,{size:"mini",type:"success",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(f.infoForm.uri),1)])),_:1})])],512),[[a.vShow,f.infoForm.isItem]])])])),_:1}),(0,a.withDirectives)((0,a.createElementVNode)("span",null,[(0,a.withDirectives)((0,a.createVNode)(v,{modelValue:f.content,"onUpdate:modelValue":t[2]||(t[2]=e=>f.content=e),toolbars:f.toolbars,onSave:V.handleSave,style:{height:"700px","margin-top":"18px"}},null,8,["modelValue","toolbars","onSave"]),[[a.vShow,"edit"==f.handleType]]),(0,a.withDirectives)((0,a.createVNode)(g,{type:"primary",style:{"margin-left":"47%","margin-top":"20px"},onClick:V.handleSave},{default:(0,a.withCtx)((()=>t[10]||(t[10]=[(0,a.createTextVNode)("保存")]))),_:1},8,["onClick"]),[[a.vShow,"edit"==f.handleType]])],512),[[a.vShow,"edit"==f.handleType]]),(0,a.withDirectives)((0,a.createElementVNode)("span",null,[(0,a.withDirectives)((0,a.createVNode)(v,{modelValue:f.content,"onUpdate:modelValue":t[3]||(t[3]=e=>f.content=e),subfield:!1,defaultOpen:"preview",toolbarsFlag:!1,editable:!1,scrollStyle:!0,ishljs:!0,style:{"margin-top":"18px"}},null,8,["modelValue"]),[[a.vShow,""==f.handleType]])],512),[[a.vShow,""==f.handleType]])])),_:1})])),_:1}),(0,a.createVNode)(k,{modelValue:f.drawer,"onUpdate:modelValue":t[4]||(t[4]=e=>f.drawer=e),direction:f.direction,"before-close":V.handleClose,"with-header":!1,size:"24%"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(b,{ref:"routeInfo",infoForm:f.infoForm},null,8,["infoForm"])])),_:1},8,["modelValue","direction","before-close"])])}]])},5340:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return m}});var a=o(2740);const l={class:"layout-padding"},r={class:"layout-padding-auto layout-padding-view"},n={class:"box-flex-between",style:{padding:"20px"}},i=["title","onClick"],d={class:"item-name-style"},c={class:"dialog-footer"};var s=o(2310),u={data(){return{infoForm:{},dialogFormVisible:!1,formLabelWidth:"100px",status:"",taskList:[],taskTopic:{icon:{0:"el-icon-loading",1:"el-icon-circle-close",2:"el-icon-bell"},class:{0:"breathe-run breathe-style breathe-keyframes-run breathe-div-border",1:"breathe-stop breathe-style breathe-div-border",2:"breathe-urgent breathe-style breathe-keyframes-urgent breathe-div-border"},title:{0:",服务正常运行",1:",服务已停止",2:",30分钟内发生告警"},des:{0:"服务运行中...",1:"服务已停止...",2:"服务告警..."}},monitorOptions:[{value:"30m",label:"30分钟一次"},{value:"1h",label:"1小时一次"},{value:"5h",label:"5小时一次"},{value:"12h",label:"12小时一次"},{value:"24h",label:"24小时一次"}]}},created:function(){this.search()},mounted:function(){},beforeDestroy:function(){},methods:{search(){let e=this;var t;(t={status:""===this.status?null:this.status},(0,s.WY)({url:"/gateway-manage/monitor/list",method:"post",data:t})).then((function(t){t.data&&(e.taskList=t.data)}))},close(){if("0"==this.infoForm.status)return!1;let e=this;var t;(t={id:this.infoForm.id},(0,s.WY)({url:"/gateway-manage/monitor/close",method:"get",data:t})).then((function(t){e.infoForm.status="0",e.GLOBAL_FUN.successMsg(),e.setTableMonitorStatus()}))},handleClickMonitorInfo(e){console.log(e),this.dialogFormVisible=!0,this.infoForm={id:e.id,name:e.name,uri:e.uri,path:e.path,method:e.method,status:e.status,alarmTime:e.monitor.alarmTime,recover:e.monitor.recover,frequency:e.monitor.frequency,sendTime:e.monitor.sendTime,emails:e.monitor.emails}},setTableMonitorStatus(){let e=this.taskList.length;for(var t=0;t<e;t++)if(this.taskList[t].id==this.infoForm.id){this.taskList[t].status=this.infoForm.status;break}}}},m=(0,o(2653).Z)(u,[["render",function(e,t,o,s,u,m){const p=(0,a.resolveComponent)("el-radio-button"),h=(0,a.resolveComponent)("el-radio-group"),f=(0,a.resolveComponent)("el-tag"),V=(0,a.resolveComponent)("el-form-item"),g=(0,a.resolveComponent)("el-form"),N=(0,a.resolveComponent)("el-button"),w=(0,a.resolveComponent)("el-dialog");return(0,a.openBlock)(),(0,a.createElementBlock)("div",l,[(0,a.createElementVNode)("div",r,[(0,a.createElementVNode)("div",n,[(0,a.createVNode)(h,{modelValue:u.status,"onUpdate:modelValue":t[0]||(t[0]=e=>u.status=e),size:"mini",onChange:m.search},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(p,{label:""},{default:(0,a.withCtx)((()=>t[3]||(t[3]=[(0,a.createElementVNode)("i",{class:"el-icon-menu",style:{"font-weight":"bold"}},null,-1),(0,a.createTextVNode)(" 所有")]))),_:1}),(0,a.createVNode)(p,{label:"0"},{default:(0,a.withCtx)((()=>t[4]||(t[4]=[(0,a.createElementVNode)("i",{class:"el-icon-loading",style:{"font-weight":"bold"}},null,-1),(0,a.createTextVNode)(" 运行")]))),_:1}),(0,a.createVNode)(p,{label:"1"},{default:(0,a.withCtx)((()=>t[5]||(t[5]=[(0,a.createElementVNode)("i",{class:"el-icon-circle-close",style:{"font-weight":"bold"}},null,-1),(0,a.createTextVNode)(" 停止")]))),_:1}),(0,a.createVNode)(p,{label:"2"},{default:(0,a.withCtx)((()=>t[6]||(t[6]=[(0,a.createElementVNode)("i",{class:"el-icon-bell",style:{"font-weight":"bold"}},null,-1),(0,a.createTextVNode)(" 告警")]))),_:1})])),_:1},8,["modelValue","onChange"])]),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(u.taskList,((e,o)=>((0,a.openBlock)(),(0,a.createElementBlock)("div",{key:o},[(0,a.createElementVNode)("div",{class:(0,a.normalizeClass)(u.taskTopic.class[e.status]),title:e.name+u.taskTopic.title[e.status],onClick:t=>m.handleClickMonitorInfo(e)},[(0,a.createElementVNode)("i",{class:(0,a.normalizeClass)(u.taskTopic.icon[e.status]),style:{"font-weight":"bold"}},null,2),t[7]||(t[7]=(0,a.createTextVNode)(" ")),(0,a.createElementVNode)("span",null,(0,a.toDisplayString)(u.taskTopic.des[e.status]),1),(0,a.createElementVNode)("div",null,[(0,a.createElementVNode)("span",null,(0,a.toDisplayString)(e.id),1)]),(0,a.createElementVNode)("div",d,[(0,a.createElementVNode)("span",null,(0,a.toDisplayString)(e.name),1)])],10,i)])))),128))]),(0,a.createVNode)(w,{title:"监控告警信息",modelValue:u.dialogFormVisible,"onUpdate:modelValue":t[2]||(t[2]=e=>u.dialogFormVisible=e),width:"25%","close-on-click-modal":!1},{footer:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",c,[(0,a.withDirectives)((0,a.createVNode)(N,{icon:"el-icon-document-delete",size:"mini",type:"success",onClick:m.close},{default:(0,a.withCtx)((()=>t[12]||(t[12]=[(0,a.createTextVNode)("关闭本次告警")]))),_:1},8,["onClick"]),[[a.vShow,"2"==u.infoForm.status]]),(0,a.createVNode)(N,{icon:"el-icon-document-delete",size:"mini",type:"warning",onClick:t[1]||(t[1]=e=>u.dialogFormVisible=!1)},{default:(0,a.withCtx)((()=>t[13]||(t[13]=[(0,a.createTextVNode)("关 闭")]))),_:1})])])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(g,{model:u.infoForm,ref:"infoForm","label-width":u.formLabelWidth},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(V,{label:"服务ID:",size:"mini"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(f,{size:"small"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(u.infoForm.id),1)])),_:1})])),_:1}),(0,a.createVNode)(V,{label:"服务ID:",size:"mini"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(f,{size:"small"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(u.infoForm.name),1)])),_:1})])),_:1}),(0,a.createVNode)(V,{label:"服务地址:",size:"mini"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(f,{size:"small",type:"success"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(u.infoForm.uri),1)])),_:1})])),_:1}),(0,a.createVNode)(V,{label:"断言路径:",size:"mini"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(f,{size:"small",type:"success"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(u.infoForm.path),1)])),_:1})])),_:1}),(0,a.withDirectives)((0,a.createVNode)(V,{label:"请求模式:",size:"mini"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(f,{size:"small",type:"success"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(u.infoForm.method),1)])),_:1})])),_:1},512),[[a.vShow,""!=u.infoForm.method]]),(0,a.createVNode)(V,{label:"告警状态:",size:"mini"},{default:(0,a.withCtx)((()=>[(0,a.withDirectives)((0,a.createVNode)(f,{size:"small",type:"",effect:"dark"},{default:(0,a.withCtx)((()=>t[8]||(t[8]=[(0,a.createTextVNode)("正常")]))),_:1},512),[[a.vShow,"2"!=u.infoForm.status]]),(0,a.withDirectives)((0,a.createVNode)(f,{size:"small",type:"danger",effect:"dark"},{default:(0,a.withCtx)((()=>t[9]||(t[9]=[(0,a.createTextVNode)("告警")]))),_:1},512),[[a.vShow,"2"==u.infoForm.status]])])),_:1}),(0,a.withDirectives)((0,a.createVNode)(V,{label:"告警时间:",size:"mini"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(f,{size:"small",type:"danger",effect:"dark"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(u.infoForm.alarmTime),1)])),_:1})])),_:1},512),[[a.vShow,"2"==u.infoForm.status]]),(0,a.createVNode)(V,{label:"告警重试:",size:"mini"},{default:(0,a.withCtx)((()=>[(0,a.withDirectives)((0,a.createVNode)(f,{size:"small",type:"",effect:"dark"},{default:(0,a.withCtx)((()=>t[10]||(t[10]=[(0,a.createTextVNode)("启用")]))),_:1},512),[[a.vShow,"0"==u.infoForm.recover]]),(0,a.withDirectives)((0,a.createVNode)(f,{size:"small",type:"danger",effect:"dark"},{default:(0,a.withCtx)((()=>t[11]||(t[11]=[(0,a.createTextVNode)("禁止")]))),_:1},512),[[a.vShow,"1"==u.infoForm.recover]])])),_:1}),(0,a.createVNode)(V,{label:"通知频率:",size:"mini"},{default:(0,a.withCtx)((()=>[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(u.monitorOptions,(e=>(0,a.withDirectives)(((0,a.openBlock)(),(0,a.createBlock)(f,{key:e.value,size:"small",type:"",effect:"dark"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.label),1)])),_:2},1024)),[[a.vShow,u.infoForm.frequency==e.value]]))),128))])),_:1}),(0,a.withDirectives)((0,a.createVNode)(V,{label:"通知邮箱:",size:"mini"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(f,{size:"small",type:"",effect:"dark"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(u.infoForm.emails),1)])),_:1})])),_:1},512),[[a.vShow,null!=u.infoForm.emails&&""!=u.infoForm.emails]]),(0,a.withDirectives)((0,a.createVNode)(V,{label:"通知时间:",size:"mini"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(f,{size:"small",type:"",effect:"dark"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(u.infoForm.sendTime),1)])),_:1})])),_:1},512),[[a.vShow,null!=u.infoForm.sendTime&&""!=u.infoForm.sendTime]])])),_:1},8,["model","label-width"])])),_:1},8,["modelValue"])])}],["__scopeId","data-v-31e0cb93"]])},6105:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return g}}),o(3789);var a=o(2740),l=o(8066),r=o(6328),n=o(6483),i={data(){return{name:"clientInfo",tableData:[{}],totalNum:0}},props:["infoForm"],created:function(){this.init()},mounted:function(){},beforeDestroy:function(){},methods:{init(){this.regServerList()},regServerList(){let e=this;(0,n.B6)({clientId:this.infoForm.id,currentPage:this.currentPage,pageSize:this.pageSize}).then((function(t){t.data&&(e.tableData=t.data.records,e.totalNum=t.data.total)}))}}},d=o(2653),c=(0,d.Z)(i,[["render",function(e,t,o,l,r,n){const i=(0,a.resolveComponent)("el-col"),d=(0,a.resolveComponent)("el-tag"),c=(0,a.resolveComponent)("el-row"),s=(0,a.resolveComponent)("el-divider"),u=(0,a.resolveComponent)("el-table-column"),m=(0,a.resolveComponent)("el-table");return(0,a.openBlock)(),(0,a.createElementBlock)("div",null,[t[7]||(t[7]=(0,a.createElementVNode)("div",{style:{height:"42px","background-color":"#2A2E32","font-size":"14pt","font-weight":"bold",color:"#F0F0F0","padding-top":"18px","padding-left":"20px"}},[(0,a.createElementVNode)("i",{class:"el-icon-s-custom"}),(0,a.createTextVNode)(" 客户端详情 ")],-1)),(0,a.createVNode)(c,{gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(i,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[0]||(t[0]=[(0,a.createTextVNode)("名称:")]))),_:1}),(0,a.createVNode)(i,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(d,{size:"small"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(o.infoForm.name),1)])),_:1})])),_:1})])),_:1}),(0,a.createVNode)(c,{gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(i,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[1]||(t[1]=[(0,a.createTextVNode)("地址:")]))),_:1}),(0,a.createVNode)(i,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(d,{size:"small",type:"success"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(o.infoForm.ip),1)])),_:1})])),_:1})])),_:1}),(0,a.createVNode)(c,{gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(i,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[2]||(t[2]=[(0,a.createTextVNode)("注册服务:")]))),_:1}),(0,a.createVNode)(i,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(d,{size:"small",type:"success"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(this.totalNum)+"个",1)])),_:1})])),_:1})])),_:1}),(0,a.createVNode)(c,{gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(i,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[3]||(t[3]=[(0,a.createTextVNode)("创建时间:")]))),_:1}),(0,a.createVNode)(i,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(d,{size:"small",type:"success"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(o.infoForm.createTime),1)])),_:1})])),_:1})])),_:1}),(0,a.createVNode)(c,{gutter:24,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(i,{span:6,class:"gateway-info-label"},{default:(0,a.withCtx)((()=>t[4]||(t[4]=[(0,a.createTextVNode)("服务状态:")]))),_:1}),(0,a.createVNode)(i,{span:18,class:"gateway-info-value"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(d,{size:"small",type:"danger"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)("0"===o.infoForm.status?"启用":"禁用"),1)])),_:1})])),_:1})])),_:1}),(0,a.createVNode)(s,{"content-position":"left"},{default:(0,a.withCtx)((()=>t[5]||(t[5]=[(0,a.createElementVNode)("span",{style:{color:"#606266"}},"已注册服务",-1)]))),_:1}),(0,a.createVNode)(m,{size:"small",data:r.tableData,style:{width:"100%"},height:"400"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(u,{label:"服务ID",prop:"id"}),(0,a.createVNode)(u,{label:"服务名称",prop:"name"}),(0,a.createVNode)(u,{label:"状态",width:"70",prop:"status"},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("template",null,[(0,a.createVNode)(d,{size:"mini"},{default:(0,a.withCtx)((()=>t[6]||(t[6]=[(0,a.createTextVNode)((0,a.toDisplayString)("允许通行"))]))),_:1})])])),_:1}),(0,a.createVNode)(u,{label:"注册时间",prop:"regServerTime"})])),_:1},8,["data"])])}]]);const s={class:"layout-padding"},u={class:"layout-padding-auto layout-padding-view"},m={class:"box-flex-between"},p={key:0,style:{"font-weight":"bold"}},h={class:"block"},f={data(){return{form:{name:null,groupCode:null,status:null},ip:null,drawer:!1,direction:"rtl",infoForm:{},tableData:[],currentPage:1,pageSize:10,totalNum:0,statusOptions:[{value:null,label:"所有"},{value:"0",label:"启用"},{value:"1",label:"禁用"}],groupOptions:(0,a.getCurrentInstance)().proxy.GLOBAL_VAR.groups}},created:function(){this.init()},components:{clientInfoComponent:c},mounted:function(){},beforeDestroy:function(){},methods:{init(){this.search()},handleSizeChange(e){this.pageSize=e,this.search()},handleCurrentChange(e){this.currentPage=e,this.search()},handleCreateClient(){this.$router.push({path:"/createClient",query:{handleType:"add"}})},handleOpenedClientInfo(){this.$refs.clientInfo.init()},handleCommandClient(e){console.log("command",e);let t=this;"addGateway"===e.command?this.$router.push({path:"/addClientGateway",query:{client:e.row}}):"info"===e.command?(this.drawer=!0,this.infoForm=e.row):"edit"===e.command?(this.infoForm=e.row,this.$router.push({path:"/createClient",query:{handleType:"edit",client:e.row}})):"start"===e.command?(0,r.tn)({id:e.row.id}).then((function(e){t.GLOBAL_FUN.successMsg(),t.search()})):"stop"===e.command?(0,r.SH)({id:e.row.id}).then((function(e){t.GLOBAL_FUN.successMsg(),t.search()})):"delete"===e.command&&this.$confirm('确认删除"'+e.row.name+'"客户端?').then((o=>{(0,r.Nu)({id:e.row.id}).then((function(e){t.GLOBAL_FUN.successMsg(),t.search()}))})).catch((e=>{}))},handleClose(e){e()},search(){let e=this;(0,r.gu)({name:this.form.name,status:this.form.status,groupCode:this.form.groupCode,ip:this.ip,currentPage:this.currentPage,pageSize:this.pageSize}).then((function(t){t.data&&(e.tableData=t.data.records,e.totalNum=t.data.total)}))}}};var V=Object.assign(f,{__name:"ClientList",setup(e){return(e,t)=>{const o=(0,a.resolveComponent)("el-button"),r=(0,a.resolveComponent)("el-option"),n=(0,a.resolveComponent)("el-select"),i=(0,a.resolveComponent)("el-radio"),d=(0,a.resolveComponent)("el-popover"),f=(0,a.resolveComponent)("el-input"),V=(0,a.resolveComponent)("el-tag"),g=(0,a.resolveComponent)("el-table-column"),N=(0,a.resolveComponent)("el-icon"),w=(0,a.resolveComponent)("el-dropdown-item"),C=(0,a.resolveComponent)("el-dropdown-menu"),x=(0,a.resolveComponent)("el-dropdown"),v=(0,a.resolveComponent)("el-table"),y=(0,a.resolveComponent)("el-pagination"),b=(0,a.resolveComponent)("el-drawer");return(0,a.openBlock)(),(0,a.createElementBlock)("div",s,[(0,a.createElementVNode)("div",u,[(0,a.createElementVNode)("div",m,[(0,a.createVNode)(o,{icon:"el-icon-folder-add",type:"primary",style:{"margin-left":"5px"},onClick:e.handleCreateClient},null,8,["onClick"]),(0,a.createVNode)(f,{placeholder:"请输入客户端名称",modelValue:e.form.name,"onUpdate:modelValue":t[2]||(t[2]=t=>e.form.name=t),class:"input-with-select",style:{width:"620px"},clearable:""},{prepend:(0,a.withCtx)((()=>[(0,a.createVNode)(n,{modelValue:e.form.groupCode,"onUpdate:modelValue":t[0]||(t[0]=t=>e.form.groupCode=t),placeholder:"请选择分组",style:{width:"140px","margin-right":"10px"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(r,{label:"所有",value:""}),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(e.groupOptions,(e=>((0,a.openBlock)(),(0,a.createBlock)(r,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"]),(0,a.createVNode)(d,{placement:"bottom",trigger:"click"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(o,null,{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)(" 服务状态:"+(0,a.toDisplayString)("0"===e.form.status?"启用":"1"===e.form.status?"禁用":"所有"),1),t[4]||(t[4]=(0,a.createElementVNode)("i",{class:"el-icon-caret-bottom el-icon--right"},null,-1))])),_:1})])),default:(0,a.withCtx)((()=>[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(e.statusOptions,(o=>((0,a.openBlock)(),(0,a.createBlock)(i,{modelValue:e.form.status,"onUpdate:modelValue":t[1]||(t[1]=t=>e.form.status=t),key:o.value,label:o.value},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(o.label),1)])),_:2},1032,["modelValue","label"])))),128))])),_:1})])),append:(0,a.withCtx)((()=>[(0,a.createVNode)(o,{icon:"el-icon-search",onClick:e.search},null,8,["onClick"])])),_:1},8,["modelValue"])]),(0,a.createVNode)(v,{size:"small",data:e.tableData,height:"100%"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(g,{label:"客户端ID(系统生成)",width:"300"},{default:(0,a.withCtx)((({row:e})=>[(0,a.createVNode)(V,{size:"small",type:"warning",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.id),1)])),_:2},1024)])),_:1}),(0,a.createVNode)(g,{label:"分组"},{default:(0,a.withCtx)((({row:t})=>[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(e.groupOptions,(e=>(0,a.withDirectives)(((0,a.openBlock)(),(0,a.createBlock)(V,{key:e.value,size:"small",type:""},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.label),1)])),_:2},1024)),[[a.vShow,e.value===t.groupCode]]))),128))])),_:1}),(0,a.createVNode)(g,{label:"系统代号>客户端名称"},{default:(0,a.withCtx)((({row:e})=>[null!=e.systemCode&&""!=e.systemCode?((0,a.openBlock)(),(0,a.createElementBlock)("span",p,(0,a.toDisplayString)(e.systemCode)+" >",1)):(0,a.createCommentVNode)("",!0),(0,a.createTextVNode)(" "+(0,a.toDisplayString)(e.name),1)])),_:1}),(0,a.createVNode)(g,{label:"IP地址"},{default:(0,a.withCtx)((({row:e})=>[(0,a.createVNode)(V,{size:"small",type:"success"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.ip),1)])),_:2},1024)])),_:1}),(0,a.createVNode)(g,{label:"创建时间",prop:"createTime",width:"220"}),(0,a.createVNode)(g,{label:"状态",prop:"status",width:"100"},{default:(0,a.withCtx)((({row:e})=>["0"===e.status?((0,a.openBlock)(),(0,a.createBlock)(V,{key:0,effect:"dark",size:"small",type:""},{default:(0,a.withCtx)((()=>t[5]||(t[5]=[(0,a.createTextVNode)("启用")]))),_:1})):(0,a.createCommentVNode)("",!0),"1"===e.status?((0,a.openBlock)(),(0,a.createBlock)(V,{key:1,effect:"dark",size:"small",type:"danger"},{default:(0,a.withCtx)((()=>t[6]||(t[6]=[(0,a.createTextVNode)("禁用")]))),_:1})):(0,a.createCommentVNode)("",!0)])),_:1}),(0,a.createVNode)(g,{label:"备注",prop:"remarks",width:"350"}),(0,a.createVNode)(g,{label:"操作",width:"120"},{default:(0,a.withCtx)((({row:r})=>[(0,a.createVNode)(x,{trigger:"click",onCommand:e.handleCommandClient},{dropdown:(0,a.withCtx)((()=>[(0,a.createVNode)(C,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)(w,{icon:"el-icon-connection",command:{command:"addGateway",row:r}},{default:(0,a.withCtx)((()=>t[8]||(t[8]=[(0,a.createTextVNode)("注册网关服务")]))),_:2},1032,["command"]),(0,a.createVNode)(w,{icon:"el-icon-tickets",command:{command:"info",row:r}},{default:(0,a.withCtx)((()=>t[9]||(t[9]=[(0,a.createTextVNode)("详情")]))),_:2},1032,["command"]),(0,a.createVNode)(w,{icon:"el-icon-edit",command:{command:"edit",row:r}},{default:(0,a.withCtx)((()=>t[10]||(t[10]=[(0,a.createTextVNode)("编辑")]))),_:2},1032,["command"]),(0,a.createVNode)(w,{command:{command:"start",row:r},divided:""},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(N,{color:"#409EFF"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.rV3))])),_:1}),t[11]||(t[11]=(0,a.createTextVNode)("启用"))])),_:2},1032,["command"]),(0,a.createVNode)(w,{command:{command:"stop",row:r}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(N,{color:"#ff0000"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.Tw$))])),_:1}),t[12]||(t[12]=(0,a.createTextVNode)("禁用"))])),_:2},1032,["command"]),(0,a.createVNode)(w,{icon:"el-icon-delete",command:{command:"delete",row:r},divided:""},{default:(0,a.withCtx)((()=>t[13]||(t[13]=[(0,a.createTextVNode)("删除")]))),_:2},1032,["command"])])),_:2},1024)])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(o,{size:"small",type:"warning"},{default:(0,a.withCtx)((()=>[t[7]||(t[7]=(0,a.createTextVNode)(" 管理 ")),(0,a.createVNode)(N,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.K5e))])),_:1})])),_:1})])),_:2},1032,["onCommand"])])),_:1})])),_:1},8,["data"]),(0,a.createElementVNode)("div",h,[(0,a.createVNode)(y,{onSizeChange:e.handleSizeChange,onCurrentChange:e.handleCurrentChange,"current-page":e.currentPage,"page-sizes":[10,30,50],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.totalNum},null,8,["onSizeChange","onCurrentChange","current-page","page-size","total"])])]),(0,a.createVNode)(b,{modelValue:e.drawer,"onUpdate:modelValue":t[3]||(t[3]=t=>e.drawer=t),direction:e.direction,"before-close":e.handleClose,"with-header":!1,size:"26%",onOpened:e.handleOpenedClientInfo},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(c,{ref:"clientInfo",infoForm:e.infoForm},null,8,["infoForm"])])),_:1},8,["modelValue","direction","before-close","onOpened"])])}}}),g=(0,d.Z)(V,[["__scopeId","data-v-d1082dfc"]])},1840:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return V}});var a=o(2740);const l={class:"createBalanced"},r={class:"clear-box"},n={lass:"clear-l"},i={class:"clear-r"},d={style:{"margin-left":"10px"}},c={style:{"margin-left":"10px"}},s={style:{"margin-left":"10px"}},u={class:"block",style:{"margin-top":"20px"}},m={class:"dialog-footer"},p={class:"block"};o(3789),o(6087),o(8602);var h=o(1811),f={data(){return{dialogFormVisible:!1,form:{id:null,name:null,groupCode:null,loadUri:null,status:"0",remarks:null},rules:{name:[{required:!0,message:"请输入负载名称",trigger:"blur"},{min:2,max:40,message:"长度在 2 到 40 个字符",trigger:"blur"}],groupCode:[{required:!0,message:"请选择分组",trigger:"change"}],loadUri:[{required:!0,message:"请输入负载地址",trigger:"blur"},{min:2,max:160,message:"长度在 2 到 160 个字符,如:/test.html",trigger:"blur"}],status:[{required:!0,message:"请选择状态",trigger:"change"}],remarks:[{required:!1,message:"请填写备注",trigger:"blur"},{min:2,max:200,message:"长度在 2 到 200 个字符",trigger:"blur"}]},parent:"/parent/",handleType:"add",uriDisabled:!1,groupOptions:this.GLOBAL_VAR.groups,currentPage:1,pageSize:10,totalNum:1,routeTableData:[],tableData:[]}},created:function(){let e=this.$route.query;if(e){let t=e.handleType;if("edit"===t){let o=e.balanced;console.log("balanced",o),this.form=o,this.handleType=t}}},mounted:function(){this.init()},beforeDestroy:function(){},methods:{init(e){this.serverRegList()},goBack(){this.$router.push({path:"/loadBalanced",query:{}})},handleRouteSizeChange(e){this.currentPage=e,this.addServerList()},handleRouteCurrentChange(e){this.currentPage=e,this.addServerList()},handleAddRegServer(e){let t=!1;if(this.tableData.forEach(((o,a)=>{o.routeId===e.id&&(t=!0)})),t)return!1;e.selected=!0,console.log(e);let o={id:null,balancedId:this.form.id,routeId:e.id,name:e.name,uri:e.uri,weight:0};this.tableData.push(o)},handleDeleteServer(e){let t=[];this.tableData.forEach(((o,a)=>{o.routeId!==e.routeId&&t.push(o)})),this.tableData=t},addServerList(){let e=this;(0,h.hm)({balancedId:this.form.id,currentPage:this.currentPage,pageSize:this.pageSize}).then((function(t){if(t.data&&t.data.records){let o=t.data.records;null!=o&&o.forEach(((t,o)=>{let a=!1;e.tableData.forEach(((e,o)=>{e.routeId==t.id&&(a=!0)})),t.selected=a})),e.routeTableData=o,e.totalNum=t.data.total}}))},serverRegList(){if(null==this.form.id||null==this.form.id)return this.tableData=[],!1;let e=this;(0,h.EO)({balancedId:this.form.id}).then((function(t){console.log(t),t&&t.data&&(e.tableData=t.data)}))},submit(){let e=this,t=this.form;t.serverList=this.tableData,console.log(t),this.$refs.form.validate((o=>{o&&("edit"===this.handleType?(0,h.BO)(t).then((function(t){e.GLOBAL_FUN.successMsg(),e.goBack()})):(0,h.ok)(t).then((function(t){e.GLOBAL_FUN.successMsg(),e.goBack()})))}))},search(){this.dialogFormVisible=!0,(null==this.routeTableData||this.routeTableData.length<=0)&&(this.addServerList(),this.handleDelete=!1)},resetForm(){"add"===this.handleType&&(this.form={id:null,name:null,groupCode:null,loadUri:null,status:"0",remarks:null})}}},V=(0,o(2653).Z)(f,[["render",function(e,t,o,h,f,V){const g=(0,a.resolveComponent)("el-button"),N=(0,a.resolveComponent)("el-popover"),w=(0,a.resolveComponent)("el-table-column"),C=(0,a.resolveComponent)("el-table"),x=(0,a.resolveComponent)("el-pagination"),v=(0,a.resolveComponent)("el-dialog"),y=(0,a.resolveComponent)("el-input"),b=(0,a.resolveComponent)("el-form-item"),k=(0,a.resolveComponent)("el-option"),_=(0,a.resolveComponent)("el-select"),E=(0,a.resolveComponent)("el-radio"),T=(0,a.resolveComponent)("el-radio-group"),S=(0,a.resolveComponent)("el-col"),z=(0,a.resolveComponent)("el-row"),B=(0,a.resolveComponent)("el-form"),F=(0,a.resolveComponent)("el-card"),L=(0,a.resolveComponent)("el-tag"),D=(0,a.resolveComponent)("el-slider");return(0,a.openBlock)(),(0,a.createElementBlock)("div",l,[(0,a.createVNode)(F,{class:"box-card",style:{"margin-top":"20px"}},{header:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",r,[(0,a.createElementVNode)("div",n,[t[9]||(t[9]=(0,a.createElementVNode)("span",{style:{"font-weight":"500"}},"负载管理配置",-1)),(0,a.createVNode)(N,{trigger:"click",placement:"bottom",width:"500"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(g,{style:{padding:"3px 0"},icon:"el-icon-questionFilled",type:"text",title:"说明"})])),default:(0,a.withCtx)((()=>[t[8]||(t[8]=(0,a.createElementVNode)("div",{style:{"font-size":"10pt"}},[(0,a.createElementVNode)("span",null,"配置说明:"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"1. 名称不能重复。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"2. 路径不能为空,路径规则需要满足gateway断言Path规则,请根据实际API调用路径设置。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"3. 路径/parent/为默认根路径,不可更改,只做网关路由规则识别,用于区分负载路由路径与普通路由路径。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"4. 实际转发到服务端不包含该/parent/根路径。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"5. 网关转发路由规则:http://gateway_host:gateway_port/server-id/api 或 http://gateway_host:gateway_port/api。"),(0,a.createElementVNode)("br")],-1))])),_:1})]),(0,a.createElementVNode)("div",i,[(0,a.createElementVNode)("div",d,[(0,a.createVNode)(g,{icon:"el-icon-delete",size:"default",type:"warning",onClick:V.resetForm},{default:(0,a.withCtx)((()=>t[10]||(t[10]=[(0,a.createTextVNode)("清 空")]))),_:1},8,["onClick"])]),(0,a.createElementVNode)("div",c,[(0,a.createVNode)(g,{icon:"el-icon-tickets",size:"default",type:"success",onClick:V.submit},{default:(0,a.withCtx)((()=>t[11]||(t[11]=[(0,a.createTextVNode)("发 布")]))),_:1},8,["onClick"])]),(0,a.createElementVNode)("div",s,[(0,a.createVNode)(g,{icon:"el-icon-connection",size:"default",type:"primary",onClick:V.search,title:"查找服务端"},{default:(0,a.withCtx)((()=>t[12]||(t[12]=[(0,a.createTextVNode)("添加服务")]))),_:1},8,["onClick"])])])])])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(v,{title:"添加服务端",modelValue:f.dialogFormVisible,"onUpdate:modelValue":t[1]||(t[1]=e=>f.dialogFormVisible=e),width:"40%","close-on-click-modal":!1},{footer:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",m,[(0,a.createVNode)(g,{onClick:t[0]||(t[0]=e=>f.dialogFormVisible=!1),size:"small"},{default:(0,a.withCtx)((()=>t[13]||(t[13]=[(0,a.createTextVNode)("关 闭")]))),_:1})])])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(C,{size:"mini",data:f.routeTableData,style:{width:"100%"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(w,{label:"服务ID",prop:"id"}),(0,a.createVNode)(w,{label:"服务名称",prop:"name"}),(0,a.createVNode)(w,{label:"服务地址",prop:"uri"}),(0,a.createVNode)(w,{label:"操作",width:"60"},{default:(0,a.withCtx)((({row:e})=>[!0!==e.selected?((0,a.openBlock)(),(0,a.createBlock)(g,{key:0,size:"mini",circle:"",icon:"el-icon-plus",type:"success",title:"点击添加",onClick:t=>V.handleAddRegServer(e)},null,8,["onClick"])):(0,a.createCommentVNode)("",!0),!0===e.selected?((0,a.openBlock)(),(0,a.createBlock)(g,{key:1,size:"mini",circle:"",icon:"el-icon-check",type:"primary",title:"已添加",onClick:t=>V.handleAddRegServer(e)},null,8,["onClick"])):(0,a.createCommentVNode)("",!0)])),_:1})])),_:1},8,["data"]),(0,a.createElementVNode)("div",u,[(0,a.createVNode)(x,{onSizeChange:V.handleRouteSizeChange,onCurrentChange:V.handleRouteCurrentChange,"current-page":f.currentPage,"page-sizes":[10,30,50],"page-size":f.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:f.totalNum},null,8,["onSizeChange","onCurrentChange","current-page","page-size","total"])])])),_:1},8,["modelValue"]),(0,a.createVNode)(z,{gutter:24},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(S,{span:8},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(F,{class:"box-card"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(B,{size:"small",rules:f.rules,ref:"form",model:f.form,"label-width":"70px"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(b,{label:"名称",prop:"name"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(y,{modelValue:f.form.name,"onUpdate:modelValue":t[2]||(t[2]=e=>f.form.name=e),style:{width:"60%"}},null,8,["modelValue"])])),_:1}),(0,a.createVNode)(b,{label:"分组",prop:"groupCode"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(_,{filterable:"",modelValue:f.form.groupCode,"onUpdate:modelValue":t[3]||(t[3]=e=>f.form.groupCode=e),placeholder:"请选择分组",style:{width:"60%"}},{default:(0,a.withCtx)((()=>[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(f.groupOptions,(e=>((0,a.openBlock)(),(0,a.createBlock)(k,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),(0,a.createVNode)(b,{label:"状态",prop:"status"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(T,{modelValue:f.form.status,"onUpdate:modelValue":t[4]||(t[4]=e=>f.form.status=e)},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(E,{label:"0"},{default:(0,a.withCtx)((()=>t[14]||(t[14]=[(0,a.createTextVNode)("启用")]))),_:1}),(0,a.createVNode)(E,{label:"1"},{default:(0,a.withCtx)((()=>t[15]||(t[15]=[(0,a.createTextVNode)("禁用")]))),_:1})])),_:1},8,["modelValue"])])),_:1}),(0,a.createVNode)(b,{label:"路径",prop:"loadUri"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(z,{gutter:20},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(S,{span:4,style:{border:"0px solid red",padding:"0"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(y,{modelValue:f.parent,"onUpdate:modelValue":t[5]||(t[5]=e=>f.parent=e),disabled:!0,title:"默认负载地址前缀'/parent/',请不要在自定义地址前加/"},null,8,["modelValue"])])),_:1}),(0,a.createVNode)(S,{span:19,style:{border:"0px solid red",padding:"0"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(y,{modelValue:f.form.loadUri,"onUpdate:modelValue":t[6]||(t[6]=e=>f.form.loadUri=e),disabled:f.uriDisabled,placeholder:"请输入网关Path,示例:producer/** 或 producer/api"},null,8,["modelValue","disabled"])])),_:1})])),_:1})])),_:1}),(0,a.createVNode)(b,{label:"备注",prop:"remarks"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(y,{type:"textarea",modelValue:f.form.remarks,"onUpdate:modelValue":t[7]||(t[7]=e=>f.form.remarks=e)},null,8,["modelValue"])])),_:1})])),_:1},8,["rules","model"])])),_:1})])),_:1}),(0,a.createVNode)(S,{span:16},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(F,{class:"box-card"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(C,{size:"small",data:f.tableData,style:{width:"100%"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(w,{prop:"routeId",label:"路由ID"}),(0,a.createVNode)(w,{prop:"name",label:"路由名称"}),(0,a.createVNode)(w,{prop:"uri",label:"路由地址"}),(0,a.createVNode)(w,{label:"路由权重",width:"80"},{default:(0,a.withCtx)((({row:e})=>[(0,a.createVNode)(L,{size:"small",type:"",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.weight),1)])),_:2},1024)])),_:1}),(0,a.createVNode)(w,{label:"配置比例"},{default:(0,a.withCtx)((({row:e})=>[(0,a.createElementVNode)("div",p,[(0,a.createVNode)(D,{modelValue:e.weight,"onUpdate:modelValue":t=>e.weight=t},null,8,["modelValue","onUpdate:modelValue"])])])),_:1}),(0,a.createVNode)(w,{label:"操作",width:"60"},{default:(0,a.withCtx)((({row:e})=>[(0,a.createVNode)(g,{size:"mini",circle:"",icon:"el-icon-delete",title:"删除",style:{border:"0px","font-size":"12pt"},onClick:t=>V.handleDeleteServer(e)},null,8,["onClick"])])),_:1})])),_:1},8,["data"])])),_:1})])),_:1})])),_:1})])),_:1})])}],["__scopeId","data-v-27ec23d2"]])},2955:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return c}});var a=o(2740);const l={class:"createClient"},r={class:"clearfix"},n={class:"clear-r"};o(3789);var i=o(6328),d={data(){return{form:{id:null,name:null,systemCode:null,groupCode:null,ip:null,status:null,remarks:null},rules:{name:[{required:!0,message:"请输入客户端名称",trigger:"blur"},{min:2,max:40,message:"长度在 2 到 40 个字符",trigger:"blur"}],systemCode:[{required:!0,message:"请输入客户端系统代号",trigger:"blur"},{min:2,max:40,message:"长度在 2 到 40 个字符",trigger:"blur"}],groupCode:[{required:!0,message:"请选择分组",trigger:"change"}],ip:[{required:!0,message:"请输入客户端IP",trigger:"blur"},{min:8,max:16,message:"长度在 8 到 16 个字符,如:0.0.0.0",trigger:"blur"}],status:[{required:!0,message:"请选择状态",trigger:"change"}],remarks:[{min:2,max:200,message:"长度在 2 到 200 个字符",trigger:"blur"}]},handleType:"add",nameDisabled:!1,groupOptions:this.GLOBAL_VAR.groups}},created:function(){let e=this.$route.query;if(e&&(this.handleType=e.handleType,"edit"===this.handleType)){let t=e.client;console.log("client",t),this.init(t)}},methods:{init(e){e&&(this.form=e)},goBack(){this.$router.push({path:"/clientList",query:{}})},submit(){let e=this;this.$refs.form.validate((t=>{if(!t)return console.log("error submit!!"),!1;console.log(e.form),"edit"===this.handleType?(0,i.Qu)(e.form).then((function(t){e.GLOBAL_FUN.successMsg()})):(0,i.ZF)(e.form).then((function(t){e.GLOBAL_FUN.successMsg()}))}))},resetForm(){this.form={id:"edit"===this.handleType?this.form.id:null,name:"edit"===this.handleType?this.form.name:null,groupCode:null,ip:null,status:null,remarks:null}}}},c=(0,o(2653).Z)(d,[["render",function(e,t,o,i,d,c){const s=(0,a.resolveComponent)("el-button"),u=(0,a.resolveComponent)("el-input"),m=(0,a.resolveComponent)("el-form-item"),p=(0,a.resolveComponent)("el-option"),h=(0,a.resolveComponent)("el-select"),f=(0,a.resolveComponent)("el-radio"),V=(0,a.resolveComponent)("el-radio-group"),g=(0,a.resolveComponent)("el-form"),N=(0,a.resolveComponent)("el-card");return(0,a.openBlock)(),(0,a.createElementBlock)("div",l,[(0,a.createVNode)(N,{class:"box-card"},{header:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",r,[t[8]||(t[8]=(0,a.createElementVNode)("div",{class:"clear-l"},[(0,a.createElementVNode)("span",null,"客户端配置")],-1)),(0,a.createElementVNode)("div",n,[(0,a.createVNode)(s,{icon:"el-icon-tickets",size:"mini",type:"success",onClick:c.submit},{default:(0,a.withCtx)((()=>t[6]||(t[6]=[(0,a.createTextVNode)("发 布")]))),_:1},8,["onClick"]),(0,a.createVNode)(s,{icon:"el-icon-delete",size:"mini",type:"warning",onClick:c.resetForm},{default:(0,a.withCtx)((()=>t[7]||(t[7]=[(0,a.createTextVNode)("清 空")]))),_:1},8,["onClick"])])])])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(g,{size:"default",rules:d.rules,ref:"form",model:d.form,"label-width":"100px"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{label:"名称",prop:"name"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(u,{modelValue:d.form.name,"onUpdate:modelValue":t[0]||(t[0]=e=>d.form.name=e),style:{width:"300px"},disabled:d.nameDisabled},null,8,["modelValue","disabled"])])),_:1}),(0,a.createVNode)(m,{label:"系统代号",prop:"systemCode"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(u,{modelValue:d.form.systemCode,"onUpdate:modelValue":t[1]||(t[1]=e=>d.form.systemCode=e),style:{width:"300px"},disabled:d.nameDisabled},null,8,["modelValue","disabled"])])),_:1}),(0,a.createVNode)(m,{label:"分组",prop:"groupCode"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(h,{filterable:"",modelValue:d.form.groupCode,"onUpdate:modelValue":t[2]||(t[2]=e=>d.form.groupCode=e),placeholder:"请选择分组",style:{width:"300px"}},{default:(0,a.withCtx)((()=>[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(d.groupOptions,(e=>((0,a.openBlock)(),(0,a.createBlock)(p,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),(0,a.createVNode)(m,{label:"IP",prop:"ip"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(u,{modelValue:d.form.ip,"onUpdate:modelValue":t[3]||(t[3]=e=>d.form.ip=e),style:{width:"300px"}},null,8,["modelValue"])])),_:1}),(0,a.createVNode)(m,{label:"状态",prop:"status"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(V,{modelValue:d.form.status,"onUpdate:modelValue":t[4]||(t[4]=e=>d.form.status=e)},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(f,{label:"0"},{default:(0,a.withCtx)((()=>t[9]||(t[9]=[(0,a.createTextVNode)("启用")]))),_:1}),(0,a.createVNode)(f,{label:"1"},{default:(0,a.withCtx)((()=>t[10]||(t[10]=[(0,a.createTextVNode)("禁用")]))),_:1})])),_:1},8,["modelValue"])])),_:1}),(0,a.createVNode)(m,{label:"备注",prop:"remarks"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(u,{type:"textarea",modelValue:d.form.remarks,"onUpdate:modelValue":t[5]||(t[5]=e=>d.form.remarks=e),style:{width:"500px"}},null,8,["modelValue"])])),_:1})])),_:1},8,["rules","model"])])),_:1})])}],["__scopeId","data-v-33f95ac6"]])},8893:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return ne}}),o(6087),o(4816),o(3789);var a=o(2740),l=o(8066),r=o(7985);const n={class:"greateGateway"},i={class:"clear-box"},d={lass:"clear-l"},c={class:"clear-r"},s={style:{float:"left"}},u={style:{float:"left","margin-left":"10px"}},m={style:{float:"left","margin-left":"10px"}},p={style:{float:"left","margin-left":"10px"}},h={style:{float:"left","margin-left":"10px"}},f={style:{float:"left"}},V={style:{float:"left","margin-left":"10px"}},g={style:{float:"left","margin-left":"10px"}},N={style:{float:"left","margin-left":"10px"}},w={style:{float:"left"}},C={style:{float:"left","margin-left":"10px"}},x={style:{float:"left","margin-left":"10px"}},v={style:{float:"left","margin-left":"10px"}},y={class:"clearfix"},b={class:"header-icon el-icon-success",style:{color:"#34bfa3","font-size":"12pt"}},k={style:{"margin-top":"10px"}},_={style:{"margin-top":"10px"}},E={style:{"margin-top":"10px"}},T={style:{"margin-top":"10px"}},S={style:{"margin-top":"10px"}},z={class:"clearfix"},B={class:"header-icon el-icon-success",style:{color:"#34bfa3","font-size":"12pt"}},F={style:{"margin-top":"10px"}},L={style:{"margin-top":"10px"}},D={style:{"margin-top":"10px"}},A={class:"clearfix"},R={class:"header-icon el-icon-success",style:{color:"#34bfa3","font-size":"12pt"}},I={class:"header-icon el-icon-success",style:{color:"#34bfa3","font-size":"12pt"}},O={class:"header-icon el-icon-success",style:{color:"#34bfa3","font-size":"12pt"}},P={class:"clearfix"},U={class:"header-icon el-icon-success",style:{color:"#34bfa3","font-size":"12pt"}},G={style:{"margin-top":"10px"}},q={class:"clearfix"},M={class:"header-icon el-icon-success",style:{color:"#34bfa3","font-size":"12pt"}},W={class:"header-icon el-icon-success",style:{color:"#34bfa3","font-size":"12pt"}},j={class:"header-icon el-icon-success",style:{color:"#34bfa3","font-size":"12pt"}},H={style:{"margin-top":"10px"}},$={class:"clearfix"},Y={class:"header-icon el-icon-success",style:{color:"#34bfa3","font-size":"12pt"}},Z={style:{"margin-top":"10px"}},K={class:"header-icon el-icon-success",style:{color:"#34bfa3","font-size":"12pt"}},Q={style:{"margin-top":"10px"}},X={class:"header-icon el-icon-success",style:{color:"#34bfa3","font-size":"12pt"}},J={style:{"margin-top":"10px"}},ee={class:"header-icon el-icon-success",style:{color:"#34bfa3","font-size":"12pt"}},te={style:{"margin-top":"10px"}},oe={class:"header-icon el-icon-success",style:{color:"#34bfa3","font-size":"12pt"}},ae={style:{"margin-top":"10px"}},le={data(){return{model3:"",form:{id:"",systemCode:"",name:"",stripPrefix:"",status:"1",uri:"",method:"",path:"",host:"",remoteAddr:"",header:"",rewritePath:"",requestParameter:"",accessHeader:"",accessIp:"",accessParameter:"",accessTime:"",accessCookie:"",fallbackMsg:"",fallbackTimeout:0,replenishRate:20,burstCapacity:100,groupCode:"",monitor:{recover:"0",frequency:"30m",emails:"",topic:""},flowRule:{grade:1,count:10,limitApp:"default",strategy:0,controlBehavior:0,maxQueueingTimeMs:500},degradeRule:{grade:0,count:0,timeWindow:3e3,minRequestAmount:5,statIntervalMs:1e3,slowRatioThreshold:1},cacheTtl:0},filter:{ipChecked:!1,tokenChecked:!1,idChecked:!1},access:{headerChecked:!1,ipChecked:!1,parameterChecked:!1,timeChecked:!1,cookieChecked:!1},monitor:{checked:!1},degradeRule:{checked:!1},flowRule:{defaultChecked:!1,warmUpChecked:!1,rateLimiterChecked:!1},handleType:"add",idDisabled:!1,methodOptions:[{value:null,label:"ALL"},{value:"POST",label:"POST"},{value:"GET",label:"GET"},{value:"PUT",label:"PUT"},{value:"DELETE",label:"DELETE"}],monitorFrequencyName:"",monitorOptions:[{value:"30m",label:"30分钟一次"},{value:"1h",label:"1小时一次"},{value:"5h",label:"5小时一次"},{value:"12h",label:"12小时一次"},{value:"24h",label:"24小时一次"}],degradeRuleGradeOptions:[{value:0,label:"慢调用比例"},{value:1,label:"异常比例"},{value:2,label:"异常数量"}],flowRuleGradeOptions:[{value:0,label:"---- 线程数 ---"},{value:1,label:"---- QPS ---"}],maxTime:60,groupName:"",groupOptions:this.GLOBAL_VAR.groups,cacheResult:{checked:!1}}},created:function(){let e=this.$route.query;if(e&&(this.handleType=e.handleType,"edit"===this.handleType)){let t=e.route;console.log("route",t),this.init(t)}},mounted:function(){},beforeDestroy:function(){},methods:{init(e){if(e&&e.form){let t=e.form.monitor?e.form.monitor:this.form.monitor,o=e.form.flowRule?e.form.flowRule:this.form.flowRule,a=e.form.degradeRule?e.form.degradeRule:this.form.degradeRule;console.log("flowRule",o),this.form=e.form,this.filter=e.filter,this.access=e.access,this.monitor=e.monitor,this.flowRule=e.flowRule,this.degradeRule=e.degradeRule,this.form.monitor=t,this.form.flowRule=o,this.form.degradeRule=a,this.cacheResult=e.cacheResult,console.log("this.form",this.form),this.idDisabled=!0,this.handleSelectedGroup(this.form.groupCode),this.handleSelectedMonitorFrequency(this.form.monitor?this.form.monitor.frequency:null)}},goBack(){this.$router.push({path:"/gatewayList",query:{}})},handleFlowRuleChecked(e){this.flowRule.defaultChecked=!(!this.flowRule.defaultChecked||"default"!==e),this.flowRule.warmUpChecked=!(!this.flowRule.warmUpChecked||"warmUp"!==e),this.flowRule.rateLimiterChecked=!(!this.flowRule.rateLimiterChecked||"rateLimiter"!==e),this.form.flowRule.controlBehavior="warmUp"===e?1:"rateLimiter"===e?2:0},handleSelectedGroup(e){let t=this.groupOptions.length;for(var o=0;o<t;o++)if(this.groupOptions[o].value===e){this.groupName=this.groupOptions[o].label;break}},handleSelectedMonitorFrequency(e){if(e){let o=this.monitorOptions.length;for(var t=0;t<o;t++)if(this.monitorOptions[t].value===e){this.monitorFrequencyName=this.monitorOptions[t].label;break}}},submit(){let e={form:this.form,filter:this.filter,access:this.access,monitor:this.monitor,flowRule:this.flowRule,degradeRule:this.degradeRule,cacheResult:this.cacheResult},t=this;"edit"===this.handleType?(0,r.fq)(e).then((function(e){console.log(e),t.GLOBAL_FUN.successMsg()})):(0,r.qP)(e).then((function(e){t.GLOBAL_FUN.successMsg()}))},resetForm(){this.form={id:"edit"===this.handleType?this.form.id:null,systemCode:null,name:null,stripPrefix:"",status:"1",uri:null,method:null,path:null,host:null,remoteAddr:null,header:null,rewritePath:null,requestParameter:null,accessHeader:null,accessIp:null,accessParameter:null,accessTime:"",accessCookie:null,fallbackMsg:null,fallbackTimeout:0,replenishRate:20,burstCapacity:100,cacheTtl:0,monitor:{},degradeRule:{},flowRule:{}},this.filter={},this.access={},this.monitor={},this.degradeRule={},this.flowRule={},this.cacheResult={}}}};var re=Object.assign(le,{__name:"CreateGateway",setup(e){return(e,t)=>{const o=(0,a.resolveComponent)("el-button"),r=(0,a.resolveComponent)("el-popover"),le=(0,a.resolveComponent)("el-input"),re=(0,a.resolveComponent)("el-radio"),ne=(0,a.resolveComponent)("el-icon"),ie=(0,a.resolveComponent)("el-radio-button"),de=(0,a.resolveComponent)("el-radio-group"),ce=(0,a.resolveComponent)("el-col"),se=(0,a.resolveComponent)("el-row"),ue=(0,a.resolveComponent)("el-option"),me=(0,a.resolveComponent)("el-select"),pe=(0,a.resolveComponent)("el-card"),he=(0,a.resolveComponent)("el-checkbox"),fe=(0,a.resolveComponent)("el-collapse-item"),Ve=(0,a.resolveComponent)("el-collapse"),ge=(0,a.resolveComponent)("el-input-number");return(0,a.openBlock)(),(0,a.createElementBlock)("div",n,[(0,a.createVNode)(se,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)(ce,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)(pe,{class:"box-card"},{header:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",i,[(0,a.createElementVNode)("div",d,[t[53]||(t[53]=(0,a.createElementVNode)("span",{style:{"font-weight":"500"}},"网关路由》服务配置",-1)),(0,a.createVNode)(r,{trigger:"click",placement:"bottom",width:"500"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(o,{style:{padding:"3px 0"},icon:"el-icon-questionFilledFilled",type:"text",title:"说明"})])),default:(0,a.withCtx)((()=>[t[52]||(t[52]=(0,a.createElementVNode)("div",{style:{"font-size":"10pt"}},[(0,a.createElementVNode)("span",null,"配置说明:"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"1.服务URL,支持http、https、server-id(lb://xxx)模式转发。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"2.断言Path,请根据实际API调用路径设置,不含服务host和port,可添加自定义前缀。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"3.过滤StripPrefix根据值,截取断言Path多节斜杠后内容,拼接到服务URL上。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"4.重定向RewritePath,会将原始请求Path指向新的Path路径,但网关路由地址不变,如:/foo/abc指向/abc。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"5.断言Header,会查找原始请求Header头部信息,获取匹配项。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"6.示例:"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"  a.服务URL示例:http://server:port、http://server.com、lb://xxx ,支持但不推荐:http://server:port/api.do。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"  b.断言Path示例:/route/producer/** 或 /producer/api。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"  c.断言Host示例:**.my.com 或 my.com 、127.0.0.1:8771。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"  d.断言RemoteAddr示例:192.168.1.1 或 192.168.1.1/100。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"  e.重定向RewritePath示例:/foo/(?<segment>.*),/$\\{segment},需满足java正则表达示或参见官方。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"  f.断言Header示例:Header=X-Request-Id, \\d+,其中\\d+表示正则匹配的任意值,需满足java正则表达示或参见官方。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"7.如配置多个断言项,则gateway网关采用断言组合匹配方式(and关系)转发到符合的路由服务中。")],-1))])),_:1})]),(0,a.createElementVNode)("div",c,[(0,a.createVNode)(o,{icon:"el-icon-delete",size:"mini",type:"warning",onClick:e.resetForm},{default:(0,a.withCtx)((()=>t[54]||(t[54]=[(0,a.createTextVNode)(" 清 空 ")]))),_:1},8,["onClick"]),(0,a.createVNode)(o,{icon:"el-icon-tickets",size:"mini",type:"success",onClick:e.submit},{default:(0,a.withCtx)((()=>t[55]||(t[55]=[(0,a.createTextVNode)(" 发 布 ")]))),_:1},8,["onClick"])])])])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(se,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)(ce,{span:24},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",s,[(0,a.createVNode)(le,{placeholder:"示例:project-method",modelValue:e.form.id,"onUpdate:modelValue":t[0]||(t[0]=t=>e.form.id=t),style:{width:"343px"},disabled:e.idDisabled},{prepend:(0,a.withCtx)((()=>t[56]||(t[56]=[(0,a.createTextVNode)("RouteId")]))),_:1},8,["modelValue","disabled"])]),(0,a.createElementVNode)("div",u,[(0,a.createVNode)(le,{placeholder:"示例:CRM",modelValue:e.form.systemCode,"onUpdate:modelValue":t[1]||(t[1]=t=>e.form.systemCode=t),style:{width:"343px"}},{prepend:(0,a.withCtx)((()=>t[57]||(t[57]=[(0,a.createTextVNode)("系统代号")]))),_:1},8,["modelValue"])]),(0,a.createElementVNode)("div",m,[(0,a.createVNode)(le,{placeholder:"示例:CRM-用户信息获取网关",modelValue:e.form.name,"onUpdate:modelValue":t[2]||(t[2]=t=>e.form.name=t),style:{width:"343px"}},{prepend:(0,a.withCtx)((()=>t[58]||(t[58]=[(0,a.createTextVNode)("名称")]))),_:1},8,["modelValue"])]),(0,a.createElementVNode)("div",p,[(0,a.createVNode)(r,{placement:"bottom",width:"170",trigger:"click"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(o,null,{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)("服务状态:"+(0,a.toDisplayString)("0"===e.form.status?"启用":"禁用"),1),(0,a.createVNode)(ne,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.HXv))])),_:1})])),_:1})])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(re,{modelValue:e.form.status,"onUpdate:modelValue":t[3]||(t[3]=t=>e.form.status=t),label:"0"},{default:(0,a.withCtx)((()=>t[59]||(t[59]=[(0,a.createTextVNode)("启用")]))),_:1},8,["modelValue"]),(0,a.createVNode)(re,{modelValue:e.form.status,"onUpdate:modelValue":t[4]||(t[4]=t=>e.form.status=t),label:"1"},{default:(0,a.withCtx)((()=>t[60]||(t[60]=[(0,a.createTextVNode)("禁用")]))),_:1},8,["modelValue"])])),_:1})]),(0,a.createElementVNode)("div",h,[(0,a.createVNode)(r,{placement:"bottom",trigger:"click",width:"420"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(o,null,{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)("分组:"+(0,a.toDisplayString)(e.groupName),1),(0,a.createVNode)(ne,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.HXv))])),_:1})])),_:1})])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(de,{modelValue:e.form.groupCode,"onUpdate:modelValue":t[5]||(t[5]=t=>e.form.groupCode=t),size:"mini",onChange:e.handleSelectedGroup},{default:(0,a.withCtx)((()=>[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(e.groupOptions,(e=>((0,a.openBlock)(),(0,a.createBlock)(ie,{key:e.value,label:e.value},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.label),1)])),_:2},1032,["label"])))),128))])),_:1},8,["modelValue","onChange"])])),_:1})])])),_:1})])),_:1}),(0,a.createVNode)(se,{style:{"margin-top":"20px"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(ce,{span:24},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",f,[(0,a.createVNode)(le,{placeholder:"请输入网关服务URL,示例:http://server:port、http://server.com、lb://xxx",modelValue:e.form.uri,"onUpdate:modelValue":t[7]||(t[7]=t=>e.form.uri=t),class:"input-with-select",style:{width:"696px"}},{prepend:(0,a.withCtx)((()=>[(0,a.createVNode)(me,{modelValue:e.form.method,"onUpdate:modelValue":t[6]||(t[6]=t=>e.form.method=t),placeholder:"请选择",style:{width:"90px"}},{default:(0,a.withCtx)((()=>[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(e.methodOptions,(e=>((0,a.openBlock)(),(0,a.createBlock)(ue,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1},8,["modelValue"])]),(0,a.createElementVNode)("div",V,[(0,a.createVNode)(r,{placement:"bottom",width:"550",trigger:"click"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(o,null,{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)("断言Path="+(0,a.toDisplayString)(e.form.path),1),(0,a.createVNode)(ne,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.HXv))])),_:1})])),_:1})])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(le,{placeholder:"示例:Path=/route/producer/** 或 /producer/api",modelValue:e.form.path,"onUpdate:modelValue":t[8]||(t[8]=t=>e.form.path=t),style:{width:"500px"}},{prepend:(0,a.withCtx)((()=>t[61]||(t[61]=[(0,a.createTextVNode)("Path=")]))),_:1},8,["modelValue"])])),_:1})]),(0,a.createElementVNode)("div",g,[(0,a.createVNode)(r,{placement:"bottom",width:"550",trigger:"click"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(o,null,{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)("断言Header="+(0,a.toDisplayString)(e.form.header),1),(0,a.createVNode)(ne,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.HXv))])),_:1})])),_:1})])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(le,{placeholder:"示例:Header=X-Request-Id, \\d+",modelValue:e.form.header,"onUpdate:modelValue":t[9]||(t[9]=t=>e.form.header=t)},{prepend:(0,a.withCtx)((()=>t[62]||(t[62]=[(0,a.createTextVNode)("Header=")]))),_:1},8,["modelValue"])])),_:1})]),(0,a.createElementVNode)("div",N,[(0,a.createVNode)(r,{placement:"bottom",width:"300",trigger:"click"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(o,null,{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)("过滤StripPrefix="+(0,a.toDisplayString)(e.form.stripPrefix),1),(0,a.createVNode)(ne,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.HXv))])),_:1})])),_:1})])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(le,{placeholder:"示例:StripPrefix=1",modelValue:e.form.stripPrefix,"onUpdate:modelValue":t[10]||(t[10]=t=>e.form.stripPrefix=t)},{prepend:(0,a.withCtx)((()=>t[63]||(t[63]=[(0,a.createTextVNode)("StripPrefix=")]))),_:1},8,["modelValue"])])),_:1})])])),_:1})])),_:1}),(0,a.createVNode)(se,{style:{"margin-top":"20px"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(ce,{span:24},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",w,[(0,a.createVNode)(r,{placement:"bottom",width:"400",trigger:"click"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(o,null,{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)("断言Host="+(0,a.toDisplayString)(e.form.host),1),(0,a.createVNode)(ne,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.HXv))])),_:1})])),_:1})])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(le,{placeholder:"示例:Host=**.my.com,my.com",modelValue:e.form.host,"onUpdate:modelValue":t[11]||(t[11]=t=>e.form.host=t)},{prepend:(0,a.withCtx)((()=>t[64]||(t[64]=[(0,a.createTextVNode)("Host=")]))),_:1},8,["modelValue"])])),_:1})]),(0,a.createElementVNode)("div",C,[(0,a.createVNode)(r,{placement:"bottom",width:"400",trigger:"click"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(o,null,{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)("断言RemoteAddr="+(0,a.toDisplayString)(e.form.remoteAddr),1),(0,a.createVNode)(ne,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.HXv))])),_:1})])),_:1})])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(le,{placeholder:"示例:RemoteAddr=192.168.1.1/100",modelValue:e.form.remoteAddr,"onUpdate:modelValue":t[12]||(t[12]=t=>e.form.remoteAddr=t)},{prepend:(0,a.withCtx)((()=>t[65]||(t[65]=[(0,a.createTextVNode)("RemoteAddr=")]))),_:1},8,["modelValue"])])),_:1})]),(0,a.createElementVNode)("div",x,[(0,a.createVNode)(r,{placement:"bottom",width:"450",trigger:"click"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(o,null,{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)("参数RequestParameter="+(0,a.toDisplayString)(e.form.requestParameter),1),(0,a.createVNode)(ne,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.HXv))])),_:1})])),_:1})])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(le,{placeholder:"示例:RequestParameter=version,v01",modelValue:e.form.requestParameter,"onUpdate:modelValue":t[13]||(t[13]=t=>e.form.requestParameter=t)},{prepend:(0,a.withCtx)((()=>t[66]||(t[66]=[(0,a.createTextVNode)("RequestParameter=")]))),_:1},8,["modelValue"])])),_:1})]),(0,a.createElementVNode)("div",v,[(0,a.createVNode)(r,{placement:"bottom",width:"500",trigger:"click"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(o,null,{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)("重写路径RewritePath="+(0,a.toDisplayString)(e.form.rewritePath),1),(0,a.createVNode)(ne,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.HXv))])),_:1})])),_:1})])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(le,{placeholder:"示例:RewritePath=/foo/(?<segment>.*), /$\\{segment}",modelValue:e.form.rewritePath,"onUpdate:modelValue":t[14]||(t[14]=t=>e.form.rewritePath=t)},{prepend:(0,a.withCtx)((()=>t[67]||(t[67]=[(0,a.createTextVNode)("RewritePath=")]))),_:1},8,["modelValue"])])),_:1})])])),_:1})])),_:1})])),_:1})])),_:1})])),_:1}),(0,a.createVNode)(se,{gutter:20,style:{"margin-top":"20px"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(ce,{span:6},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(pe,{class:"box-card"},{header:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",y,[t[70]||(t[70]=(0,a.createElementVNode)("span",null,"Sentinel熔断器",-1)),(0,a.createVNode)(r,{trigger:"click",placement:"bottom"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(o,{style:{float:"right",padding:"3px 0"},icon:"el-icon-questionFilled",type:"text",title:"说明"},{default:(0,a.withCtx)((()=>t[68]||(t[68]=[(0,a.createTextVNode)("说明")]))),_:1})])),default:(0,a.withCtx)((()=>[t[69]||(t[69]=(0,a.createElementVNode)("div",{style:{"font-size":"10pt"}},[(0,a.createElementVNode)("span",null,"配置说明:"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"1.对调用链路中不稳定的资源进行熔断降级也是保障高可用的重要措施之一。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"2.熔断策略:支持慢调用比例/异常比例/异常数策略(默认慢调用比例)。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"3.熔断时长:单位为秒(s)。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"4.触发数量:熔断触发的最小请求数,请求数小于该值时即使异常比率超出阈值也不会熔断(默认5)。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"5.统计时长:统计时长(单位为 ms),如 60*1000 代表分钟级(1000 ms)。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"6.慢请求比例:慢调用比例阈值,仅慢调用比例模式有效。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"7.参见官方文档:https://sentinelguard.io/zh-cn/docs/circuit-breaking.html"),(0,a.createElementVNode)("br")],-1))])),_:1})])])),default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",null,[(0,a.createVNode)(se,{gutter:24},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(ce,{span:5},{default:(0,a.withCtx)((()=>t[71]||(t[71]=[(0,a.createElementVNode)("span",{class:"text item",style:{"line-height":"38px"}},"熔断策略",-1)]))),_:1}),(0,a.createVNode)(ce,{span:19},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(de,{modelValue:e.form.degradeRule.grade,"onUpdate:modelValue":t[15]||(t[15]=t=>e.form.degradeRule.grade=t),size:"small"},{default:(0,a.withCtx)((()=>[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(e.degradeRuleGradeOptions,(e=>((0,a.openBlock)(),(0,a.createBlock)(ie,{key:e.value,label:e.value},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.label),1)])),_:2},1032,["label"])))),128))])),_:1},8,["modelValue"])])),_:1})])),_:1})]),(0,a.createVNode)(Ve,{accordion:"",style:{"margin-top":"10px"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(fe,null,{title:(0,a.withCtx)((()=>[t[72]||(t[72]=(0,a.createTextVNode)(" 熔断配置  ")),(0,a.withDirectives)((0,a.createElementVNode)("i",b,null,512),[[a.vShow,e.degradeRule.checked]])])),default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",null,[(0,a.createVNode)(he,{modelValue:e.degradeRule.checked,"onUpdate:modelValue":t[16]||(t[16]=t=>e.degradeRule.checked=t)},{default:(0,a.withCtx)((()=>t[73]||(t[73]=[(0,a.createTextVNode)("启用")]))),_:1},8,["modelValue"])]),t[79]||(t[79]=(0,a.createElementVNode)("div",null,"基于网关服务访问状态与阈值判断服务的可用性,当服务在指定时间内达到指定错误的次数或比例后,暂停路由服务访问。",-1)),(0,a.createElementVNode)("div",k,[(0,a.createVNode)(le,{size:"small",placeholder:"不同策略阈值,如:慢请求>=3000,异常比例0.6/异常数60",modelValue:e.form.degradeRule.count,"onUpdate:modelValue":t[17]||(t[17]=t=>e.form.degradeRule.count=t),title:"不同策略阈值,如:慢请求>=3000,异常比例0.6/异常数60"},{prepend:(0,a.withCtx)((()=>t[74]||(t[74]=[(0,a.createTextVNode)("计算阈值")]))),_:1},8,["modelValue"])]),(0,a.createElementVNode)("div",_,[(0,a.createVNode)(le,{size:"small",placeholder:"单位:毫秒,如:在3000ms内错误的次数或比例",modelValue:e.form.degradeRule.statIntervalMs,"onUpdate:modelValue":t[18]||(t[18]=t=>e.form.degradeRule.statIntervalMs=t),title:"单位:毫秒,如:在3000ms内错误的次数或比例"},{prepend:(0,a.withCtx)((()=>t[75]||(t[75]=[(0,a.createTextVNode)("统计时长")]))),_:1},8,["modelValue"])]),(0,a.createElementVNode)("div",E,[(0,a.createVNode)(le,{size:"small",placeholder:"触发熔断后的降级时长,单位:秒",modelValue:e.form.degradeRule.timeWindow,"onUpdate:modelValue":t[19]||(t[19]=t=>e.form.degradeRule.timeWindow=t),title:"触发熔断后的降级时长,单位:秒"},{prepend:(0,a.withCtx)((()=>t[76]||(t[76]=[(0,a.createTextVNode)("熔断时长")]))),_:1},8,["modelValue"])]),(0,a.createElementVNode)("div",T,[(0,a.createVNode)(le,{size:"small",placeholder:"触发熔断最少请求数量,低于该值不触发",modelValue:e.form.degradeRule.minRequestAmount,"onUpdate:modelValue":t[20]||(t[20]=t=>e.form.degradeRule.minRequestAmount=t),title:"触发熔断最少请求数量,低于该值不触发"},{prepend:(0,a.withCtx)((()=>t[77]||(t[77]=[(0,a.createTextVNode)("触发数量")]))),_:1},8,["modelValue"])]),(0,a.createElementVNode)("div",S,[(0,a.createVNode)(le,{size:"small",placeholder:"慢请求比例策略必配",modelValue:e.form.degradeRule.slowRatioThreshold,"onUpdate:modelValue":t[21]||(t[21]=t=>e.form.degradeRule.slowRatioThreshold=t),title:"慢请求比例策略必配"},{prepend:(0,a.withCtx)((()=>t[78]||(t[78]=[(0,a.createTextVNode)("慢请求比例")]))),_:1},8,["modelValue"])])])),_:1})])),_:1})])),_:1}),(0,a.createVNode)(pe,{class:"box-card",style:{"margin-top":"20px"}},{header:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",z,[t[82]||(t[82]=(0,a.createElementVNode)("span",null,"监控器",-1)),(0,a.createVNode)(r,{trigger:"click",placement:"bottom"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(o,{style:{float:"right",padding:"3px 0"},icon:"el-icon-questionFilled",type:"text",title:"说明"},{default:(0,a.withCtx)((()=>t[80]||(t[80]=[(0,a.createTextVNode)("说明")]))),_:1})])),default:(0,a.withCtx)((()=>[t[81]||(t[81]=(0,a.createElementVNode)("div",{style:{"font-size":"10pt"}},[(0,a.createElementVNode)("span",null,"配置说明:"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"1.只向网关服务发起http请求,只有服务host和port,不含请求路径和参数。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"2.未超时则认为服务存活,不考虑服务有效性。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,[(0,a.createTextVNode)("3.心跳检测请求Header中带"),(0,a.createElementVNode)("span",{style:{"font-weight":"bold"}},"Keepalive:flying-fish-gateway"),(0,a.createTextVNode)(",服务可做特殊性响应。")]),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"4.心跳检测服务URL示例:http://server:port、http://server.com、lb://xxx 。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"5.网关服务无客户端请求后,每30秒触发一次心跳检测。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"6.告警重试设置为禁用后,心跳检测失败后,将不再继续检测,并且网关将会拒绝所有客户端请求,直到网关服务状态为:启用。")],-1))])),_:1})])])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(Ve,{accordion:""},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(fe,null,{title:(0,a.withCtx)((()=>[t[83]||(t[83]=(0,a.createTextVNode)(" 监控告警  ")),(0,a.withDirectives)((0,a.createElementVNode)("i",B,null,512),[[a.vShow,e.monitor.checked]])])),default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",null,[(0,a.createVNode)(he,{modelValue:e.monitor.checked,"onUpdate:modelValue":t[22]||(t[22]=t=>e.monitor.checked=t)},{default:(0,a.withCtx)((()=>t[84]||(t[84]=[(0,a.createTextVNode)("启用")]))),_:1},8,["modelValue"])]),t[89]||(t[89]=(0,a.createElementVNode)("div",null,"基于网关服务心跳检测,当网关服务正常运行中,没有客户端请求后,开始每30秒一次心跳检测。",-1)),(0,a.createElementVNode)("div",F,[(0,a.createVNode)(r,{placement:"bottom",width:"170",trigger:"click"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(o,null,{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)("告警重试:"+(0,a.toDisplayString)("0"===e.form.monitor.recover?"启用":"禁用"),1),(0,a.createVNode)(ne,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.HXv))])),_:1})])),_:1})])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(re,{modelValue:e.form.monitor.recover,"onUpdate:modelValue":t[23]||(t[23]=t=>e.form.monitor.recover=t),label:"0"},{default:(0,a.withCtx)((()=>t[85]||(t[85]=[(0,a.createTextVNode)("启用")]))),_:1},8,["modelValue"]),(0,a.createVNode)(re,{modelValue:e.form.monitor.recover,"onUpdate:modelValue":t[24]||(t[24]=t=>e.form.monitor.recover=t),label:"1"},{default:(0,a.withCtx)((()=>t[86]||(t[86]=[(0,a.createTextVNode)("禁用")]))),_:1},8,["modelValue"])])),_:1}),(0,a.createVNode)(r,{placement:"bottom",width:"460",trigger:"click"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(o,null,{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)("告警通知频率:"+(0,a.toDisplayString)(e.monitorFrequencyName),1),(0,a.createVNode)(ne,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.HXv))])),_:1})])),_:1})])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(de,{modelValue:e.form.monitor.frequency,"onUpdate:modelValue":t[25]||(t[25]=t=>e.form.monitor.frequency=t),size:"mini",onChange:e.handleSelectedMonitorFrequency},{default:(0,a.withCtx)((()=>[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(e.monitorOptions,(e=>((0,a.openBlock)(),(0,a.createBlock)(ie,{key:e.value,label:e.value},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.label),1)])),_:2},1032,["label"])))),128))])),_:1},8,["modelValue","onChange"])])),_:1})]),(0,a.createElementVNode)("div",L,[(0,a.createVNode)(le,{size:"small",placeholder:"示例:user1@qq.com,user2@qq.com",modelValue:e.form.monitor.emails,"onUpdate:modelValue":t[26]||(t[26]=t=>e.form.monitor.emails=t),maxlength:"200","show-word-limit":""},{prepend:(0,a.withCtx)((()=>t[87]||(t[87]=[(0,a.createTextVNode)("通知邮箱")]))),_:1},8,["modelValue"])]),(0,a.createElementVNode)("div",D,[(0,a.createVNode)(le,{size:"small",placeholder:"示例:XXX网关服务发生告警,请及时处理",modelValue:e.form.monitor.topic,"onUpdate:modelValue":t[27]||(t[27]=t=>e.form.monitor.topic=t),maxlength:"200","show-word-limit":""},{prepend:(0,a.withCtx)((()=>t[88]||(t[88]=[(0,a.createTextVNode)("告警提示")]))),_:1},8,["modelValue"])])])),_:1})])),_:1})])),_:1})])),_:1}),(0,a.createVNode)(ce,{span:6},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(pe,{class:"box-card"},{header:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",A,[t[92]||(t[92]=(0,a.createElementVNode)("span",null,"过滤器",-1)),(0,a.createVNode)(r,{trigger:"click",placement:"bottom"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(o,{style:{float:"right",padding:"3px 0"},icon:"el-icon-questionFilled",type:"text",title:"说明"},{default:(0,a.withCtx)((()=>t[90]||(t[90]=[(0,a.createTextVNode)("说明")]))),_:1})])),default:(0,a.withCtx)((()=>[t[91]||(t[91]=(0,a.createElementVNode)("div",{style:{"font-size":"10pt"}},[(0,a.createElementVNode)("span",null,"配置说明:"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"1.IP过滤需要配置本网关路由的注册客户端,非注册客户端IP不可访问。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"2.IP名单管理中的禁止通行的IP不可访问本网关路由。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,[(0,a.createTextVNode)("3.TOKEN过滤目前只对请求Header中带"),(0,a.createElementVNode)("span",{style:{"font-weight":"bold"}},"TOKEN"),(0,a.createTextVNode)("做非空验证,暂无其它响应。")]),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,[(0,a.createTextVNode)("4.ID过滤对请求Header中带"),(0,a.createElementVNode)("span",{style:{"font-weight":"bold"}},"CLIENTID"),(0,a.createTextVNode)("做较验,非注册客户端ID不可访问。")]),(0,a.createElementVNode)("br")],-1))])),_:1})])])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(Ve,{accordion:""},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(fe,null,{title:(0,a.withCtx)((()=>[t[93]||(t[93]=(0,a.createTextVNode)(" IP过滤  ")),(0,a.withDirectives)((0,a.createElementVNode)("i",R,null,512),[[a.vShow,e.filter.ipChecked]])])),default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",null,[(0,a.createVNode)(he,{modelValue:e.filter.ipChecked,"onUpdate:modelValue":t[28]||(t[28]=t=>e.filter.ipChecked=t)},{default:(0,a.withCtx)((()=>t[94]||(t[94]=[(0,a.createTextVNode)("启用")]))),_:1},8,["modelValue"])]),t[95]||(t[95]=(0,a.createElementVNode)("div",null,"基于IP进行拦截,只有客户端管理中添加对本网关服务连接权限的指定IP才能访问本路由地址。",-1))])),_:1}),(0,a.createVNode)(fe,null,{title:(0,a.withCtx)((()=>[t[96]||(t[96]=(0,a.createTextVNode)(" TOKEN过滤  ")),(0,a.withDirectives)((0,a.createElementVNode)("i",I,null,512),[[a.vShow,e.filter.tokenChecked]])])),default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",null,[(0,a.createVNode)(he,{modelValue:e.filter.tokenChecked,"onUpdate:modelValue":t[29]||(t[29]=t=>e.filter.tokenChecked=t)},{default:(0,a.withCtx)((()=>t[97]||(t[97]=[(0,a.createTextVNode)("启用")]))),_:1},8,["modelValue"])]),t[98]||(t[98]=(0,a.createElementVNode)("div",null,"基于TOKEN进行拦截,只有符合指定TOKEN才能访问本路由地址。",-1))])),_:1}),(0,a.createVNode)(fe,null,{title:(0,a.withCtx)((()=>[t[99]||(t[99]=(0,a.createTextVNode)(" ID过滤  ")),(0,a.withDirectives)((0,a.createElementVNode)("i",O,null,512),[[a.vShow,e.filter.idChecked]])])),default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",null,[(0,a.createVNode)(he,{modelValue:e.filter.idChecked,"onUpdate:modelValue":t[30]||(t[30]=t=>e.filter.idChecked=t)},{default:(0,a.withCtx)((()=>t[100]||(t[100]=[(0,a.createTextVNode)("启用")]))),_:1},8,["modelValue"])]),t[101]||(t[101]=(0,a.createElementVNode)("div",null,"基于ID进行拦截,只有客户端管理中添加对本网关服务连接权限的指定ID才能访问本路由地址。",-1))])),_:1})])),_:1})])),_:1}),(0,a.createVNode)(pe,{class:"box-card",style:{"margin-top":"20px"}},{header:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",P,[t[104]||(t[104]=(0,a.createElementVNode)("span",null,"缓存策略",-1)),(0,a.createVNode)(r,{trigger:"click",placement:"bottom"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(o,{style:{float:"right",padding:"3px 0"},icon:"el-icon-questionFilled",type:"text",title:"说明"},{default:(0,a.withCtx)((()=>t[102]||(t[102]=[(0,a.createTextVNode)("说明")]))),_:1})])),default:(0,a.withCtx)((()=>[t[103]||(t[103]=(0,a.createElementVNode)("div",{style:{"font-size":"10pt"}},[(0,a.createElementVNode)("span",null,"配置说明:"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"1.基于Redis缓存路由服务端响应结果到网关,减少后端服务并发压力。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"2.适用于非高频更新数据请求(如:配置、字典等)。高频更新数据或实时数据请求不适用,会严重影响Gateway网关服务Redis资源平衡。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"3.基于请求参数和body值组合,计算其md5值为缓存key并缓存路由服务响应结果,之后每次相同传参请求不再路由到后端服务,直接取网关未过期缓存结果;"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"4.同一个路由服务不能超过100个不同请求参数缓存结果,否则缓存失效将直接路由到后端服务。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"5.缓存过期后,则下一次请求重新获取并缓存路由服务响应结果;"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"6.最大缓存时间为7天,缓存单位为秒(s),即:7 * 24 * 60 * 60 = 604800 。"),(0,a.createElementVNode)("br")],-1))])),_:1})])])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(Ve,{accordion:""},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(fe,null,{title:(0,a.withCtx)((()=>[t[105]||(t[105]=(0,a.createTextVNode)(" 数据缓存  ")),(0,a.withDirectives)((0,a.createElementVNode)("i",U,null,512),[[a.vShow,e.cacheResult.checked]])])),default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",null,[(0,a.createVNode)(he,{modelValue:e.cacheResult.checked,"onUpdate:modelValue":t[31]||(t[31]=t=>e.cacheResult.checked=t)},{default:(0,a.withCtx)((()=>t[106]||(t[106]=[(0,a.createTextVNode)("启用")]))),_:1},8,["modelValue"])]),t[108]||(t[108]=(0,a.createElementVNode)("div",null,"基于Redis缓存本网关路由后的响应结果,只对response状态为200的响应进行缓存。主要适用于非高频更新数据请求,如:系统配置,字典数据,常量数据等。最大缓存时间为7天=缓存单位为604800秒。",-1)),(0,a.createElementVNode)("div",G,[(0,a.createVNode)(le,{size:"small",placeholder:"响应结果缓存过期时长(秒)",modelValue:e.form.cacheTtl,"onUpdate:modelValue":t[32]||(t[32]=t=>e.form.cacheTtl=t)},{prepend:(0,a.withCtx)((()=>t[107]||(t[107]=[(0,a.createTextVNode)("最大缓存时间(秒/s)")]))),_:1},8,["modelValue"])])])),_:1})])),_:1})])),_:1})])),_:1}),(0,a.createVNode)(ce,{span:6},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(pe,{class:"box-card"},{header:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",q,[t[111]||(t[111]=(0,a.createElementVNode)("span",null,"Sentinel限流器",-1)),(0,a.createVNode)(r,{trigger:"click",placement:"bottom"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(o,{style:{float:"right",padding:"3px 0"},icon:"el-icon-questionFilled",type:"text",title:"说明"},{default:(0,a.withCtx)((()=>t[109]||(t[109]=[(0,a.createTextVNode)("说明")]))),_:1})])),default:(0,a.withCtx)((()=>[t[110]||(t[110]=(0,a.createElementVNode)("div",{style:{"font-size":"10pt"}},[(0,a.createElementVNode)("span",null,"配置说明:"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"1.线程数限流用于保护业务线程数不被耗尽。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"2.流量控制主要有两种统计类型,一种是统计线程数,另外一种则是统计 QPS。"),(0,a.createElementVNode)("br"),(0,a.createElementVNode)("span",null,"3.参见官方文档:https://sentinelguard.io/zh-cn/docs/flow-control.html"),(0,a.createElementVNode)("br")],-1))])),_:1})])])),default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",null,[(0,a.createVNode)(se,{gutter:24},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(ce,{span:5},{default:(0,a.withCtx)((()=>t[112]||(t[112]=[(0,a.createElementVNode)("span",{class:"text item",style:{"line-height":"38px"}},"每秒流量",-1)]))),_:1}),(0,a.createVNode)(ce,{span:19},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(ge,{size:"small",modelValue:e.form.flowRule.count,"onUpdate:modelValue":t[33]||(t[33]=t=>e.form.flowRule.count=t),step:1,min:0,max:1e4,style:{width:"60%"}},null,8,["modelValue"])])),_:1})])),_:1}),(0,a.createVNode)(se,{gutter:24},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(ce,{span:5},{default:(0,a.withCtx)((()=>t[113]||(t[113]=[(0,a.createElementVNode)("span",{class:"text item",style:{"line-height":"38px"}},"限流模式",-1)]))),_:1}),(0,a.createVNode)(ce,{span:19},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(de,{modelValue:e.form.flowRule.grade,"onUpdate:modelValue":t[34]||(t[34]=t=>e.form.flowRule.grade=t),size:"small"},{default:(0,a.withCtx)((()=>[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(e.flowRuleGradeOptions,(e=>((0,a.openBlock)(),(0,a.createBlock)(ie,{key:e.value,label:e.value},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.label),1)])),_:2},1032,["label"])))),128))])),_:1},8,["modelValue"])])),_:1})])),_:1})]),(0,a.createVNode)(Ve,{accordion:"",style:{"margin-top":"10px"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(fe,null,{title:(0,a.withCtx)((()=>[t[114]||(t[114]=(0,a.createTextVNode)(" 直接拒绝  ")),(0,a.withDirectives)((0,a.createElementVNode)("i",M,null,512),[[a.vShow,e.flowRule.defaultChecked]])])),default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",null,[(0,a.createVNode)(he,{modelValue:e.flowRule.defaultChecked,"onUpdate:modelValue":t[35]||(t[35]=t=>e.flowRule.defaultChecked=t),onChange:t[36]||(t[36]=t=>e.handleFlowRuleChecked("default"))},{default:(0,a.withCtx)((()=>t[115]||(t[115]=[(0,a.createTextVNode)("启用")]))),_:1},8,["modelValue"])]),t[116]||(t[116]=(0,a.createElementVNode)("div",null,"该方式是默认的流量控制方式,当QPS超过任意规则的阈值后,新的请求就会被立即拒绝,拒绝方式为抛出FlowException。",-1))])),_:1}),(0,a.createVNode)(fe,{title:"URI限流"},{title:(0,a.withCtx)((()=>[t[117]||(t[117]=(0,a.createTextVNode)(" 冷启动  ")),(0,a.withDirectives)((0,a.createElementVNode)("i",W,null,512),[[a.vShow,e.flowRule.warmUpChecked]])])),default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",null,[(0,a.createVNode)(he,{modelValue:e.flowRule.warmUpChecked,"onUpdate:modelValue":t[37]||(t[37]=t=>e.flowRule.warmUpChecked=t),onChange:t[38]||(t[38]=t=>e.handleFlowRuleChecked("warmUp"))},{default:(0,a.withCtx)((()=>t[118]||(t[118]=[(0,a.createTextVNode)("启用")]))),_:1},8,["modelValue"])]),t[119]||(t[119]=(0,a.createElementVNode)("div",null,'该方式主要用于系统长期处于低水位的情况下,当流量突然增加时,直接把系统拉升到高水位可能瞬间把系统压垮。通过"冷启动",让通过的流量缓慢增加,在一定时间内逐渐增加到阈值上限,给冷系统一个预热的时间,避免冷系统被压垮的情况。',-1))])),_:1}),(0,a.createVNode)(fe,null,{title:(0,a.withCtx)((()=>[t[120]||(t[120]=(0,a.createTextVNode)(" 匀速器  ")),(0,a.withDirectives)((0,a.createElementVNode)("i",j,null,512),[[a.vShow,e.flowRule.rateLimiterChecked]])])),default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",null,[(0,a.createVNode)(he,{modelValue:e.flowRule.rateLimiterChecked,"onUpdate:modelValue":t[39]||(t[39]=t=>e.flowRule.rateLimiterChecked=t),onChange:t[40]||(t[40]=t=>e.handleFlowRuleChecked("rateLimiter"))},{default:(0,a.withCtx)((()=>t[121]||(t[121]=[(0,a.createTextVNode)("启用")]))),_:1},8,["modelValue"])]),t[123]||(t[123]=(0,a.createElementVNode)("div",null,"该方式严格控制了请求通过的间隔时间,也即是让请求以均匀的速度通过,对应的是漏桶算法。主要用于处理间隔性突发的流量,例如消息队列。",-1)),(0,a.createElementVNode)("div",H,[(0,a.createVNode)(le,{size:"small",placeholder:"多余的请求在队列中等待时间(ms)",modelValue:e.form.flowRule.maxQueueingTimeMs,"onUpdate:modelValue":t[41]||(t[41]=t=>e.form.flowRule.maxQueueingTimeMs=t)},{prepend:(0,a.withCtx)((()=>t[122]||(t[122]=[(0,a.createTextVNode)("最大等待时间")]))),_:1},8,["modelValue"])])])),_:1})])),_:1})])),_:1})])),_:1}),(0,a.createVNode)(ce,{span:6},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(pe,{class:"box-card"},{header:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",$,[t[125]||(t[125]=(0,a.createElementVNode)("span",null,"鉴权器",-1)),(0,a.createVNode)(o,{style:{float:"right",padding:"3px 0"},icon:"el-icon-questionFilled",type:"text"},{default:(0,a.withCtx)((()=>t[124]||(t[124]=[(0,a.createTextVNode)("说明")]))),_:1})])])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(Ve,{accordion:""},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(fe,null,{title:(0,a.withCtx)((()=>[t[126]||(t[126]=(0,a.createTextVNode)(" HEADER验证  ")),(0,a.withDirectives)((0,a.createElementVNode)("i",Y,null,512),[[a.vShow,e.access.headerChecked]])])),default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",null,[(0,a.createVNode)(he,{modelValue:e.access.headerChecked,"onUpdate:modelValue":t[42]||(t[42]=t=>e.access.headerChecked=t)},{default:(0,a.withCtx)((()=>t[127]||(t[127]=[(0,a.createTextVNode)("启用")]))),_:1},8,["modelValue"])]),t[129]||(t[129]=(0,a.createElementVNode)("div",null,"获取客户端请求中的所带的HEADER头部信息,验证指定键值,不符合验证规则,则直接拒决请求。",-1)),(0,a.createElementVNode)("div",Z,[(0,a.createVNode)(le,{size:"small",placeholder:"示例:Accept-Language: zh-CN,zh;q=0.9",modelValue:e.form.accessHeader,"onUpdate:modelValue":t[43]||(t[43]=t=>e.form.accessHeader=t)},{prepend:(0,a.withCtx)((()=>t[128]||(t[128]=[(0,a.createTextVNode)("HEADER")]))),_:1},8,["modelValue"])])])),_:1}),(0,a.createVNode)(fe,null,{title:(0,a.withCtx)((()=>[t[130]||(t[130]=(0,a.createTextVNode)(" IP验证  ")),(0,a.withDirectives)((0,a.createElementVNode)("i",K,null,512),[[a.vShow,e.access.ipChecked]])])),default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",null,[(0,a.createVNode)(he,{modelValue:e.access.ipChecked,"onUpdate:modelValue":t[44]||(t[44]=t=>e.access.ipChecked=t)},{default:(0,a.withCtx)((()=>t[131]||(t[131]=[(0,a.createTextVNode)("启用")]))),_:1},8,["modelValue"])]),t[133]||(t[133]=(0,a.createElementVNode)("div",null,"如果启用IP过滤,则会先执行IP过滤后,再执行本IP验证,不符合验证规则,则直接拒决请求。通常用于临时性IP过滤。",-1)),(0,a.createElementVNode)("div",Q,[(0,a.createVNode)(le,{size:"small",placeholder:"示例:192.168.1.100,92.168.1.*",modelValue:e.form.accessIp,"onUpdate:modelValue":t[45]||(t[45]=t=>e.form.accessIp=t)},{prepend:(0,a.withCtx)((()=>t[132]||(t[132]=[(0,a.createTextVNode)("IP")]))),_:1},8,["modelValue"])])])),_:1}),(0,a.createVNode)(fe,null,{title:(0,a.withCtx)((()=>[t[134]||(t[134]=(0,a.createTextVNode)(" 参数验证  ")),(0,a.withDirectives)((0,a.createElementVNode)("i",X,null,512),[[a.vShow,e.access.parameterChecked]])])),default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",null,[(0,a.createVNode)(he,{modelValue:e.access.parameterChecked,"onUpdate:modelValue":t[46]||(t[46]=t=>e.access.parameterChecked=t)},{default:(0,a.withCtx)((()=>t[135]||(t[135]=[(0,a.createTextVNode)("启用")]))),_:1},8,["modelValue"])]),t[137]||(t[137]=(0,a.createElementVNode)("div",null,"获取URL请求串中的所带的参数,验证指定参数值,不符合验证规则,则直接拒决请求。",-1)),(0,a.createElementVNode)("div",J,[(0,a.createVNode)(le,{size:"small",placeholder:"示例:token=uuid",modelValue:e.form.accessParameter,"onUpdate:modelValue":t[47]||(t[47]=t=>e.form.accessParameter=t)},{prepend:(0,a.withCtx)((()=>t[136]||(t[136]=[(0,a.createTextVNode)("请求参数")]))),_:1},8,["modelValue"])])])),_:1}),(0,a.createVNode)(fe,null,{title:(0,a.withCtx)((()=>[t[138]||(t[138]=(0,a.createTextVNode)(" 时间验证  ")),(0,a.withDirectives)((0,a.createElementVNode)("i",ee,null,512),[[a.vShow,e.access.timeChecked]])])),default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",null,[(0,a.createVNode)(he,{modelValue:e.access.timeChecked,"onUpdate:modelValue":t[48]||(t[48]=t=>e.access.timeChecked=t)},{default:(0,a.withCtx)((()=>t[139]||(t[139]=[(0,a.createTextVNode)("启用")]))),_:1},8,["modelValue"])]),t[141]||(t[141]=(0,a.createElementVNode)("div",null,"只允许指定时间段内进行访问,不符合验证规则,则直接拒决请求。",-1)),(0,a.createElementVNode)("div",te,[(0,a.createVNode)(le,{size:"small",placeholder:"示例:08:00:00,20:00:00",modelValue:e.form.accessTime,"onUpdate:modelValue":t[49]||(t[49]=t=>e.form.accessTime=t)},{prepend:(0,a.withCtx)((()=>t[140]||(t[140]=[(0,a.createTextVNode)("时间")]))),_:1},8,["modelValue"])])])),_:1}),(0,a.createVNode)(fe,{title:"Cookie验证"},{title:(0,a.withCtx)((()=>[t[142]||(t[142]=(0,a.createTextVNode)(" Cookie验证  ")),(0,a.withDirectives)((0,a.createElementVNode)("i",oe,null,512),[[a.vShow,e.access.cookieChecked]])])),default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",null,[(0,a.createVNode)(he,{modelValue:e.access.cookieChecked,"onUpdate:modelValue":t[50]||(t[50]=t=>e.access.cookieChecked=t)},{default:(0,a.withCtx)((()=>t[143]||(t[143]=[(0,a.createTextVNode)("启用")]))),_:1},8,["modelValue"])]),t[145]||(t[145]=(0,a.createElementVNode)("div",null,"获取客户端请求所带的cookie信息,验证指定cookie参数值,不符合验证规则,则直接拒决请求。",-1)),(0,a.createElementVNode)("div",ae,[(0,a.createVNode)(le,{size:"small",placeholder:"示例:name=value",modelValue:e.form.accessCookie,"onUpdate:modelValue":t[51]||(t[51]=t=>e.form.accessCookie=t)},{prepend:(0,a.withCtx)((()=>t[144]||(t[144]=[(0,a.createTextVNode)("Cookie")]))),_:1},8,["modelValue"])])])),_:1})])),_:1})])),_:1})])),_:1})])),_:1})])}}}),ne=(0,o(2653).Z)(re,[["__scopeId","data-v-63f54f53"]])},625:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return f}}),o(3789);var a=o(2740),l=o(8066),r=o(3648),n=o(7985);const i={class:"layout-padding"},d={class:"layout-padding-auto layout-padding-view"},c={class:"box-flex-between"},s={key:0,style:{"font-weight":"bold"}},u={style:{display:"flex","align-items":"center"}},m={class:"block"},p={data(){return{form:{name:null,groupCode:null,status:null},drawer:!1,direction:"rtl",formLabelWidth:"140px",infoForm:{},gatewayServer:"",alarmDate:"",alarmStatus:[],tableData:[],currentPage:1,pageSize:10,totalNum:1,pickerOptions:{disabledDate(e){return e.getTime()>Date.now()}},statusOptions:[{value:null,label:"所有"},{value:"0",label:"启用"},{value:"1",label:"禁用"}],groupOptions:this.GLOBAL_VAR.groups}},components:{routeInfoComponent:r.Z},created:function(){this.init()},mounted:function(){},beforeDestroy:function(){},methods:{init(){this.search()},handleSizeChange(e){this.pageSize=e,this.search()},handleCurrentChange(e){this.currentPage=e,this.search()},handleShowInfo(e,t){this.infoForm=e},formatterStatus(e,t){return"0"===e.status?"启用":"禁用"},handleCreateGateway(){this.$router.push({path:"/createGateway",query:{handleType:"add"}})},handleCommandGateway(e){console.log("command",e);let t=this;"addClient"===e.command?this.$router.push({path:"/addGatewayClient",query:{route:JSON.stringify(this.newRoute(e.row))}}):"info"===e.command?(this.drawer=!0,this.infoForm=e.row):"edit"===e.command?(this.infoForm=e.row,this.$router.push({path:"/createGateway",query:{handleType:"edit",route:this.newRoute(e.row)}})):"rule"===e.command?this.$router.push({path:"/addGroovyScript",query:{route:this.newRoute(e.row)}}):"start"===e.command?(0,n.OV)({id:e.row.id}).then((function(e){t.GLOBAL_FUN.successMsg(),t.search()})):"stop"===e.command?(0,n.am)({id:e.row.id}).then((function(e){t.GLOBAL_FUN.successMsg(),t.search()})):"delete"===e.command?this.$confirm('确认删除"'+e.row.name+'"网关路由?').then((o=>{(0,n.qW)({id:e.row.id}).then((function(e){t.GLOBAL_FUN.successMsg(),t.search()}))})).catch((e=>{})):"topology"===e.command&&this.$router.push({path:"/gatewayTopology",query:{route:this.newRoute(e.row)}})},handleClose(e){e()},handleCopy(e){let t=this.GLOBAL_VAR.gatewayRoutesURL+e;this.GLOBAL_FUN.copy(t)},search(){let e=this;(0,n.CN)({form:this.form,currentPage:this.currentPage,pageSize:this.pageSize}).then((function(t){console.log("result:",t),t.data&&t.data.records&&(e.tableData=t.data.records,e.totalNum=t.data.total)}))},newRoute(e){return{form:e,filter:{ipChecked:null!=e.filterGatewayName&&-1!=e.filterGatewayName.indexOf("ip"),tokenChecked:null!=e.filterGatewayName&&-1!=e.filterGatewayName.indexOf("token"),idChecked:null!=e.filterGatewayName&&-1!=e.filterGatewayName.indexOf("id")},access:{headerChecked:null!=e.filterAuthorizeName&&-1!=e.filterAuthorizeName.indexOf("header"),ipChecked:null!=e.filterAuthorizeName&&-1!=e.filterAuthorizeName.indexOf("ip"),parameterChecked:null!=e.filterAuthorizeName&&-1!=e.filterAuthorizeName.indexOf("parameter"),timeChecked:null!=e.filterAuthorizeName&&-1!=e.filterAuthorizeName.indexOf("time"),cookieChecked:null!=e.filterAuthorizeName&&-1!=e.filterAuthorizeName.indexOf("cookie")},monitor:{checked:null!=e.monitor&&"1"!=e.monitor.status},degradeRule:{checked:null!=e.degradeRuleName&&e.degradeRuleName.length>0},flowRule:{defaultChecked:null!=e.flowRuleName&&-1!=e.flowRuleName.indexOf("default"),warmUpChecked:null!=e.flowRuleName&&-1!=e.flowRuleName.indexOf("warmUp"),rateLimiterChecked:null!=e.flowRuleName&&-1!=e.flowRuleName.indexOf("rateLimiter")},cacheResult:{checked:null!=e.cacheTtl&&e.cacheTtl>0}}}}};var h=Object.assign(p,{__name:"GatewayList",setup(e){return(e,t)=>{const o=(0,a.resolveComponent)("el-button"),n=(0,a.resolveComponent)("el-option"),p=(0,a.resolveComponent)("el-select"),h=(0,a.resolveComponent)("el-radio"),f=(0,a.resolveComponent)("el-popover"),V=(0,a.resolveComponent)("el-input"),g=(0,a.resolveComponent)("el-tag"),N=(0,a.resolveComponent)("el-table-column"),w=(0,a.resolveComponent)("el-icon"),C=(0,a.resolveComponent)("el-dropdown-item"),x=(0,a.resolveComponent)("el-dropdown-menu"),v=(0,a.resolveComponent)("el-dropdown"),y=(0,a.resolveComponent)("el-table"),b=(0,a.resolveComponent)("el-pagination"),k=(0,a.resolveComponent)("el-drawer");return(0,a.openBlock)(),(0,a.createElementBlock)("div",i,[(0,a.createElementVNode)("div",d,[(0,a.createElementVNode)("div",c,[(0,a.createVNode)(o,{icon:"el-icon-folder-add",style:{"margin-left":"5px"},type:"primary",onClick:e.handleCreateGateway,title:"创建网关服务"},null,8,["onClick"]),(0,a.createVNode)(V,{placeholder:"请输入网关服务名称",modelValue:e.form.name,"onUpdate:modelValue":t[2]||(t[2]=t=>e.form.name=t),class:"input-with-select",style:{width:"620px"},clearable:""},{prepend:(0,a.withCtx)((()=>[(0,a.createVNode)(p,{modelValue:e.form.groupCode,"onUpdate:modelValue":t[0]||(t[0]=t=>e.form.groupCode=t),placeholder:"请选择分组",style:{width:"140px","margin-right":"10px"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(n,{label:"所有",value:""}),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(e.groupOptions,(e=>((0,a.openBlock)(),(0,a.createBlock)(n,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"]),(0,a.createVNode)(f,{placement:"bottom",trigger:"click"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(o,null,{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)(" 服务状态:"+(0,a.toDisplayString)("0"===e.form.status?"启用":"1"===e.form.status?"禁用":"所有"),1),t[4]||(t[4]=(0,a.createElementVNode)("i",{class:"el-icon-caret-bottom el-icon--right"},null,-1))])),_:1})])),default:(0,a.withCtx)((()=>[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(e.statusOptions,(o=>((0,a.openBlock)(),(0,a.createBlock)(h,{modelValue:e.form.status,"onUpdate:modelValue":t[1]||(t[1]=t=>e.form.status=t),key:o.value,label:o.value},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(o.label),1)])),_:2},1032,["modelValue","label"])))),128))])),_:1})])),append:(0,a.withCtx)((()=>[(0,a.createVNode)(o,{icon:"el-icon-search",onClick:e.search,title:"查询网关服务"},null,8,["onClick"])])),_:1},8,["modelValue"])]),(0,a.createVNode)(y,{size:"small",data:e.tableData,height:"100%",style:{width:"100%"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(N,{label:"服务ID",width:"180"},{default:(0,a.withCtx)((({row:e})=>[(0,a.createVNode)(g,{size:"small",type:"warning",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.id),1)])),_:2},1024)])),_:1}),(0,a.createVNode)(N,{label:"分组",width:"100"},{default:(0,a.withCtx)((({row:t})=>[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(e.groupOptions,(e=>(0,a.withDirectives)(((0,a.openBlock)(),(0,a.createBlock)(g,{key:e.value,size:"small",type:""},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.label),1)])),_:2},1024)),[[a.vShow,e.value===t.groupCode]]))),128))])),_:1}),(0,a.createVNode)(N,{label:"系统代号>服务名称"},{default:(0,a.withCtx)((({row:e})=>[null!=e.systemCode&&""!=e.systemCode?((0,a.openBlock)(),(0,a.createElementBlock)("span",s,(0,a.toDisplayString)(e.systemCode)+" >",1)):(0,a.createCommentVNode)("",!0),(0,a.createTextVNode)(" "+(0,a.toDisplayString)(e.name),1)])),_:1}),(0,a.createVNode)(N,{label:"服务地址","show-overflow-tooltip":!0},{default:(0,a.withCtx)((({row:e})=>[(0,a.createVNode)(g,{size:"small",type:"success",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.uri),1)])),_:2},1024)])),_:1}),(0,a.createVNode)(N,{label:"断言路径"},{default:(0,a.withCtx)((({row:r})=>[(0,a.createTextVNode)((0,a.toDisplayString)(r.path)+" ",1),(0,a.createVNode)(f,{placement:"bottom",width:250,trigger:"click"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(w,{color:"#409eff"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.RbR))])),_:1})])),default:(0,a.withCtx)((()=>[t[5]||(t[5]=(0,a.createElementVNode)("div",{style:{"margin-bottom":"8px"}},[(0,a.createElementVNode)("i",{class:"el-icon-dataAnalysis",style:{"font-size":"16pt",color:"#90A0A5"}}),(0,a.createElementVNode)("span",{class:"route-title"},"网关代理地址")],-1)),(0,a.createElementVNode)("div",u,[(0,a.createVNode)(g,{size:"small",type:"success",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.GLOBAL_VAR.gatewayRoutesURL)+(0,a.toDisplayString)(r.path),1)])),_:2},1024),(0,a.createVNode)(o,{icon:"el-icon-document-copy",type:"text",onClick:t=>e.handleCopy(r.path),title:"复制"},null,8,["onClick"])]),t[6]||(t[6]=(0,a.createElementVNode)("br",null,null,-1)),(0,a.createVNode)(o,{style:{padding:"3px 0"},type:"text",title:"网关代理地址"})])),_:2},1024)])),_:1}),(0,a.createVNode)(N,{label:"请求模式",prop:"method",width:"80"},{default:(0,a.withCtx)((({row:e})=>[""!==e.method?((0,a.openBlock)(),(0,a.createBlock)(g,{key:0,effect:"plain",size:"small",type:"success"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.method),1)])),_:2},1024)):(0,a.createCommentVNode)("",!0)])),_:1}),(0,a.createVNode)(N,{label:"熔断器",prop:"degradeRuleName",width:"75"},{default:(0,a.withCtx)((({row:e})=>["default"===e.degradeRuleName?((0,a.openBlock)(),(0,a.createBlock)(g,{key:0,effect:"plain",size:"small",type:""},{default:(0,a.withCtx)((()=>t[7]||(t[7]=[(0,a.createTextVNode)("启用")]))),_:1})):(0,a.createCommentVNode)("",!0)])),_:1}),(0,a.createVNode)(N,{label:"限流器",prop:"flowRuleName",width:"90"},{default:(0,a.withCtx)((({row:e})=>["default"===e.flowRuleName?((0,a.openBlock)(),(0,a.createBlock)(g,{key:0,effect:"plain",size:"small",type:""},{default:(0,a.withCtx)((()=>t[8]||(t[8]=[(0,a.createTextVNode)("直接拒绝")]))),_:1})):(0,a.createCommentVNode)("",!0),"warmUp"===e.flowRuleName?((0,a.openBlock)(),(0,a.createBlock)(g,{key:1,effect:"plain",size:"small",type:""},{default:(0,a.withCtx)((()=>t[9]||(t[9]=[(0,a.createTextVNode)("冷启动")]))),_:1})):(0,a.createCommentVNode)("",!0),"rateLimiter"===e.flowRuleName?((0,a.openBlock)(),(0,a.createBlock)(g,{key:2,effect:"plain",size:"small",type:""},{default:(0,a.withCtx)((()=>t[10]||(t[10]=[(0,a.createTextVNode)("匀速器")]))),_:1})):(0,a.createCommentVNode)("",!0)])),_:1}),(0,a.createVNode)(N,{label:"缓存时长",prop:"cacheTtl",width:"75"},{default:(0,a.withCtx)((({row:e})=>[e.cacheTtl>0?((0,a.openBlock)(),(0,a.createBlock)(g,{key:0,effect:"plain",size:"small",type:"success"},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.cacheTtl)+"s",1)])),_:2},1024)):(0,a.createCommentVNode)("",!0)])),_:1}),(0,a.createVNode)(N,{label:"规则组件",prop:"useScript",width:"75"},{default:(0,a.withCtx)((({row:e})=>[e.useScript>0?((0,a.openBlock)(),(0,a.createBlock)(g,{key:0,effect:"plain",size:"small",type:""},{default:(0,a.withCtx)((()=>t[11]||(t[11]=[(0,a.createTextVNode)("启用")]))),_:1})):(0,a.createCommentVNode)("",!0)])),_:1}),(0,a.createVNode)(N,{label:"创建时间",width:"140",prop:"createTime"}),(0,a.createVNode)(N,{label:"状态",width:"80",prop:"status",formatter:e.formatterStatus},{default:(0,a.withCtx)((({row:e})=>["0"===e.status?((0,a.openBlock)(),(0,a.createBlock)(g,{key:0,effect:"dark",size:"small",type:""},{default:(0,a.withCtx)((()=>t[12]||(t[12]=[(0,a.createTextVNode)("启用")]))),_:1})):(0,a.createCommentVNode)("",!0),"1"===e.status?((0,a.openBlock)(),(0,a.createBlock)(g,{key:1,effect:"dark",size:"small",type:"danger"},{default:(0,a.withCtx)((()=>t[13]||(t[13]=[(0,a.createTextVNode)("禁用")]))),_:1})):(0,a.createCommentVNode)("",!0)])),_:1},8,["formatter"]),(0,a.createVNode)(N,{label:"操作",width:"100"},{default:(0,a.withCtx)((({row:r})=>[(0,a.createVNode)(v,{trigger:"click",onCommand:e.handleCommandGateway},{dropdown:(0,a.withCtx)((()=>[(0,a.createVNode)(x,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)(C,{icon:"el-icon-user",command:{command:"addClient",row:r}},{default:(0,a.withCtx)((()=>t[15]||(t[15]=[(0,a.createTextVNode)("注册客户端")]))),_:2},1032,["command"]),(0,a.createVNode)(C,{icon:"el-icon-tickets",command:{command:"info",row:r}},{default:(0,a.withCtx)((()=>t[16]||(t[16]=[(0,a.createTextVNode)("详情")]))),_:2},1032,["command"]),(0,a.createVNode)(C,{icon:"el-icon-orange",command:{command:"topology",row:r}},{default:(0,a.withCtx)((()=>t[17]||(t[17]=[(0,a.createTextVNode)("拓扑")]))),_:2},1032,["command"]),(0,a.createVNode)(C,{icon:"el-icon-edit",command:{command:"edit",row:r}},{default:(0,a.withCtx)((()=>t[18]||(t[18]=[(0,a.createTextVNode)("编辑")]))),_:2},1032,["command"]),(0,a.createVNode)(C,{icon:"el-icon-eleme",command:{command:"rule",row:r}},{default:(0,a.withCtx)((()=>t[19]||(t[19]=[(0,a.createTextVNode)("规则组件")]))),_:2},1032,["command"]),(0,a.createVNode)(C,{command:{command:"start",row:r},divided:""},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(w,{color:"#409EFF"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.rV3))])),_:1}),t[20]||(t[20]=(0,a.createTextVNode)("启用"))])),_:2},1032,["command"]),(0,a.createVNode)(C,{command:{command:"stop",row:r}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(w,{color:"#ff0000"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.Tw$))])),_:1}),t[21]||(t[21]=(0,a.createTextVNode)("禁用"))])),_:2},1032,["command"]),(0,a.createVNode)(C,{icon:"el-icon-delete",command:{command:"delete",row:r},divided:""},{default:(0,a.withCtx)((()=>t[22]||(t[22]=[(0,a.createTextVNode)("删除")]))),_:2},1032,["command"])])),_:2},1024)])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(o,{size:"small",type:"warning"},{default:(0,a.withCtx)((()=>[t[14]||(t[14]=(0,a.createTextVNode)(" 管理 ")),(0,a.createVNode)(w,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.K5e))])),_:1})])),_:1})])),_:2},1032,["onCommand"])])),_:1})])),_:1},8,["data"]),(0,a.createElementVNode)("div",m,[(0,a.createVNode)(b,{onSizeChange:e.handleSizeChange,onCurrentChange:e.handleCurrentChange,"current-page":e.currentPage,"page-sizes":[10,30,50],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.totalNum},null,8,["onSizeChange","onCurrentChange","current-page","page-size","total"])])]),(0,a.createVNode)(k,{modelValue:e.drawer,"onUpdate:modelValue":t[3]||(t[3]=t=>e.drawer=t),direction:e.direction,"before-close":e.handleClose,"with-header":!1,size:"24%"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(r.Z,{ref:"routeInfo",infoForm:e.infoForm},null,8,["infoForm"])])),_:1},8,["modelValue","direction","before-close"])])}}}),f=(0,o(2653).Z)(h,[["__scopeId","data-v-79c9aadc"]])},4980:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return i}});var a=o(2740);o(3789),o(5311);var l=o(550),r=o(6483),n={data(){return{form:{},clientList:[]}},created:function(){let e=this.$route.query;if(e){let t=e.route;console.log("route",t),this.form=t.form}},mounted:function(){this.init()},beforeDestroy:function(){},methods:{init(){this.regClientList()},regClientList(){let e=this;(0,r.kI)({routeId:this.form.id}).then((function(t){t.data&&(e.clientList=t.data,e.drawLine())}))},handleSwitchChange(e,t){let o=this;e&&"0"===e.regServerStatus?(0,r.Ge)({id:e.regServerId}).then((function(e){o.GLOBAL_FUN.successMsg()})):(0,r.sA)({id:e.regServerId}).then((function(e){o.GLOBAL_FUN.successMsg()}))},goBack(){this.$router.push({path:"/gatewayList",query:{}})},drawLine(){let e=this,t=l.init(document.getElementById("topologyChart"));var o=["#00ADD0","#FFA12F","#B62AFF","#727CF5","#1890FF","#00f6ff","#20C0F4","#95F300","#04FDB8","#AF5AFF"],a=function(e,t,l="#00f6ff"){return e.map(((e,r)=>{switch(1==t&&(l=o.find(((e,t)=>t==r%10))),0!==t&&1!==t||(e.label={position:"inside"}),t){case 0:e.symbolSize=90;break;case 1:e.symbolSize=60;break;default:e.symbolSize=20}return e.lineStyle={color:l},e.children?(e.itemStyle={borderColor:l,color:l},e.children=a(e.children,t+1,l)):e.itemStyle={color:"transparent",borderColor:l},e}))},r={type:"tree",toolbox:{show:!0,iconStyle:{borderColor:"#03ceda"},feature:{restore:{}}},tooltip:{trigger:"item",triggerOn:"mousemove",backgroundColor:"rgba(1,70,86,1)",borderColor:"rgba(0,246,255,1)",borderWidth:.5,textStyle:{fontSize:10},formatter:"{b}"},series:[{type:"tree",hoverAnimation:!0,data:function(){let t={name:e.form.name,value:0,children:[]};if(null!=e.clientList){let o=e.clientList.length;for(let a=0;a<o;a++){let o={name:e.clientList[a].name,value:a,children:[]};t.children.push(o)}}let o=[];return o.push(t),o=a(o,0),console.log(o),o}(),top:0,bottom:0,left:0,right:0,layout:"radial",symbol:"circle",symbolSize:10,nodePadding:20,animationDurationUpdate:750,expandAndCollapse:!0,initialTreeDepth:2,roam:!0,focusNodeAdjacency:!0,itemStyle:{borderWidth:1},label:{fontSize:10,fontWeight:"bold",fontFamily:"SourceHanSansCN",position:"inside",rotate:0},lineStyle:{width:1,curveness:.5}}]};t.setOption(r)}}},i=(0,o(2653).Z)(n,[["render",function(e,t,o,l,r,n){const i=(0,a.resolveComponent)("el-page-header"),d=(0,a.resolveComponent)("el-card"),c=(0,a.resolveComponent)("el-col"),s=(0,a.resolveComponent)("el-tag"),u=(0,a.resolveComponent)("el-switch"),m=(0,a.resolveComponent)("el-row");return(0,a.openBlock)(),(0,a.createElementBlock)("div",null,[(0,a.createVNode)(i,{onBack:n.goBack,content:"服务管理"},null,8,["onBack"]),(0,a.createVNode)(m,{gutter:24,style:{"margin-top":"20px"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(c,{span:16},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(d,{shadow:"always"},{default:(0,a.withCtx)((()=>t[0]||(t[0]=[(0,a.createElementVNode)("div",{slot:"header",class:"clearfix"},[(0,a.createElementVNode)("i",{class:"el-icon-orange",style:{"font-size":"10pt"}}),(0,a.createTextVNode)(" "),(0,a.createElementVNode)("span",{style:{"font-size":"12pt"}},"注册网关-客户端拓扑结构")],-1),(0,a.createElementVNode)("div",{id:"topologyChart",style:{width:"100%",height:"750px",padding:"0px",margin:"0px",border:"0px #0298F9 solid"}},null,-1)]))),_:1})])),_:1}),(0,a.createVNode)(c,{span:8,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(d,{shadow:"always"},{default:(0,a.withCtx)((()=>[t[5]||(t[5]=(0,a.createElementVNode)("div",{slot:"header",class:"clearfix"},[(0,a.createElementVNode)("i",{class:"el-icon-s-custom",style:{"font-size":"10pt"}}),(0,a.createTextVNode)(" "),(0,a.createElementVNode)("span",{style:{"font-size":"12pt"}},"注册客户端列表")],-1)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(r.clientList,((e,o)=>((0,a.openBlock)(),(0,a.createBlock)(d,{shadow:"hover",class:"paper-card__body",key:o,style:{"margin-bottom":"10px","font-size":"10pt"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{gutter:24},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(c,{span:20,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[t[1]||(t[1]=(0,a.createElementVNode)("i",{class:"el-icon-s-platform",style:{"font-size":"10pt"}},null,-1)),t[2]||(t[2]=(0,a.createTextVNode)(" ")),(0,a.createVNode)(s,{size:"small",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.name),1)])),_:2},1024),t[3]||(t[3]=(0,a.createElementVNode)("i",{class:"el-icon-caret-right",style:{"font-size":"10pt"}},null,-1)),t[4]||(t[4]=(0,a.createTextVNode)(" ")),(0,a.createVNode)(s,{size:"small",type:"warning",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.id),1)])),_:2},1024)])),_:2},1024),(0,a.createVNode)(c,{span:4,style:{border:"0px solid red"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(u,{modelValue:e.regServerStatus,"onUpdate:modelValue":t=>e.regServerStatus=t,onChange:t=>n.handleSwitchChange(e,o),"active-color":"#13ce66","inactive-color":"#ff4949","active-value":"0","inactive-value":"1",style:{float:"right"}},null,8,["modelValue","onUpdate:modelValue","onChange"])])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])),_:1})])),_:1})])),_:1})])}],["__scopeId","data-v-7e6aeca3"]])},4516:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return h}});var a=o(2740),l=o(8066),r=o(2310);const n=e=>(0,r.WY)({url:"/gateway-manage/ip/update",method:"post",data:e}),i={class:"layout-padding"},d={class:"layout-padding-auto layout-padding-view"},c={class:"box-flex-between"},s={class:"block"},u={class:"dialog-footer"},m={data(){return{dialogFormVisible:!1,formLabelWidth:"60px",status:null,ip:"",form:{ip:"",status:"0",remarks:""},tableData:[],currentPage:1,pageSize:10,totalNum:0,options:[{value:"",label:"所有"},{value:"0",label:"允许通行"},{value:"1",label:"禁止通行"}],rules:{ip:[{required:!0,message:"请输入IP地址",trigger:"blur"},{min:4,max:15,message:"长度在 4 到 15 个字符",trigger:"blur"}],status:[{required:!0,message:"请选状态",trigger:"change"}],remarks:[{required:!1},{min:1,max:200,message:"长度在 1 到 200 个字符",trigger:"blur"}]}}},created:function(){this.init()},mounted:function(){},beforeDestroy:function(){},methods:{init(){this.search(),console.log(JSON.stringify(this.tableData))},handleSizeChange(e){this.pageSize=e},handleCurrentChange(e){this.currentPage=e},handleCommandClient(e){console.log("command",e);let t=this;"start"===e.command?"1"===e.row.status&&(e.row.status="0",n(e.row).then((function(e){t.GLOBAL_FUN.successMsg(),t.search()}))):"stop"===e.command?"0"===e.row.status&&(e.row.status="1",n(e.row).then((function(e){t.GLOBAL_FUN.successMsg(),t.search()}))):"delete"===e.command&&this.$confirm('确认删除IP:"'+e.row.ip+'"?').then((o=>{var a;(a={ip:e.row.ip},(0,r.WY)({url:"/gateway-manage/ip/delete",method:"get",data:a})).then((function(e){t.GLOBAL_FUN.successMsg(),t.search()}))})).catch((e=>{}))},handleCreateIp(){this.dialogFormVisible=!0,this.form={ip:"",status:"0",remarks:""}},submit(){let e=this;this.$refs.form.validate((t=>{return!!t&&(((a=this.form.ip)||0===a||"boolean"==typeof a)&&/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/g.test(a)&&RegExp.$1<256&&RegExp.$2<256&&RegExp.$3<256&&RegExp.$4<256?void(o=this.form,(0,r.WY)({url:"/gateway-manage/ip/add",method:"post",data:o})).then((function(t){e.dialogFormVisible=!1,e.GLOBAL_FUN.successMsg(),e.search()})):(this.GLOBAL_FUN.errorMsg("IP格式错误!"),!1));var o,a}))},search(){let e=this;var t;(t={ip:this.ip,status:this.status,currentPage:this.currentPage,pageSize:this.pageSize},(0,r.WY)({url:"/gateway-manage/ip/pageList",method:"post",data:t})).then((function(t){t.data&&(e.tableData=t.data.records,e.totalNum=t.data.total)}))}}};var p=Object.assign(m,{__name:"IpList",setup(e){return(e,t)=>{const o=(0,a.resolveComponent)("el-button"),r=(0,a.resolveComponent)("el-option"),n=(0,a.resolveComponent)("el-select"),m=(0,a.resolveComponent)("el-input"),p=(0,a.resolveComponent)("el-tag"),h=(0,a.resolveComponent)("el-table-column"),f=(0,a.resolveComponent)("el-icon"),V=(0,a.resolveComponent)("el-dropdown-item"),g=(0,a.resolveComponent)("el-dropdown-menu"),N=(0,a.resolveComponent)("el-dropdown"),w=(0,a.resolveComponent)("el-table"),C=(0,a.resolveComponent)("el-pagination"),x=(0,a.resolveComponent)("el-form-item"),v=(0,a.resolveComponent)("el-radio"),y=(0,a.resolveComponent)("el-form"),b=(0,a.resolveComponent)("el-dialog");return(0,a.openBlock)(),(0,a.createElementBlock)("div",i,[(0,a.createElementVNode)("div",d,[(0,a.createElementVNode)("div",c,[(0,a.createVNode)(o,{icon:"el-icon-folder-add",type:"primary",style:{"margin-left":"5px"},onClick:e.handleCreateIp},null,8,["onClick"]),(0,a.createVNode)(m,{placeholder:"请输入IP",modelValue:e.ip,"onUpdate:modelValue":t[1]||(t[1]=t=>e.ip=t),maxlength:15,class:"input-with-select",style:{width:"520px"},clearable:""},{prepend:(0,a.withCtx)((()=>[(0,a.createVNode)(n,{modelValue:e.status,"onUpdate:modelValue":t[0]||(t[0]=t=>e.status=t),placeholder:"请选择",style:{width:"120px"}},{default:(0,a.withCtx)((()=>[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(e.options,(e=>((0,a.openBlock)(),(0,a.createBlock)(r,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),append:(0,a.withCtx)((()=>[(0,a.createVNode)(o,{icon:"el-icon-search",onClick:e.search},null,8,["onClick"])])),_:1},8,["modelValue"])]),(0,a.createVNode)(w,{size:"small",data:e.tableData,height:"100%"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(h,{label:"IP地址",prop:"ip"},{default:(0,a.withCtx)((({row:e})=>[(0,a.createVNode)(p,{size:"small",type:"success",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.ip),1)])),_:2},1024)])),_:1}),(0,a.createVNode)(h,{label:"状态",prop:"status"},{default:(0,a.withCtx)((({row:e})=>["0"===e.status?((0,a.openBlock)(),(0,a.createBlock)(p,{key:0,effect:"dark",size:"small",type:""},{default:(0,a.withCtx)((()=>t[8]||(t[8]=[(0,a.createTextVNode)("允许通行")]))),_:1})):(0,a.createCommentVNode)("",!0),"1"===e.status?((0,a.openBlock)(),(0,a.createBlock)(p,{key:1,effect:"dark",size:"small",type:"danger"},{default:(0,a.withCtx)((()=>t[9]||(t[9]=[(0,a.createTextVNode)("禁止通行")]))),_:1})):(0,a.createCommentVNode)("",!0)])),_:1}),(0,a.createVNode)(h,{label:"创建时间",prop:"createTime"}),(0,a.createVNode)(h,{label:"备注",prop:"remarks"}),(0,a.createVNode)(h,{label:"操作",width:"160"},{default:(0,a.withCtx)((({row:r})=>[(0,a.createVNode)(N,{trigger:"click",onCommand:e.handleCommandClient},{dropdown:(0,a.withCtx)((()=>[(0,a.createVNode)(g,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)(V,{command:{command:"start",row:r},divided:""},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(f,{color:"#409EFF"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.rV3))])),_:1}),t[11]||(t[11]=(0,a.createTextVNode)("允许通行"))])),_:2},1032,["command"]),(0,a.createVNode)(V,{command:{command:"stop",row:r}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(f,{color:"#ff0000"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.Tw$))])),_:1}),t[12]||(t[12]=(0,a.createTextVNode)("禁止通行"))])),_:2},1032,["command"]),(0,a.createVNode)(V,{icon:"el-icon-delete-filled",command:{command:"delete",row:r},divided:""},{default:(0,a.withCtx)((()=>t[13]||(t[13]=[(0,a.createTextVNode)("删除")]))),_:2},1032,["command"])])),_:2},1024)])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(o,{size:"small",type:"warning"},{default:(0,a.withCtx)((()=>[t[10]||(t[10]=(0,a.createTextVNode)("管理")),(0,a.createVNode)(f,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.K5e))])),_:1})])),_:1})])),_:2},1032,["onCommand"])])),_:1})])),_:1},8,["data"]),(0,a.createElementVNode)("div",s,[(0,a.createVNode)(C,{onSizeChange:e.handleSizeChange,onCurrentChange:e.handleCurrentChange,"current-page":e.currentPage,"page-sizes":[10,30,50],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.totalNum},null,8,["onSizeChange","onCurrentChange","current-page","page-size","total"])])]),(0,a.createVNode)(b,{title:"IP管理",modelValue:e.dialogFormVisible,"onUpdate:modelValue":t[7]||(t[7]=t=>e.dialogFormVisible=t),width:"30%","close-on-click-modal":!1},{footer:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",u,[(0,a.createVNode)(o,{size:"mini",type:"success",onClick:e.submit},{default:(0,a.withCtx)((()=>t[16]||(t[16]=[(0,a.createTextVNode)("提 交")]))),_:1},8,["onClick"]),(0,a.createVNode)(o,{size:"mini",type:"warning",onClick:t[6]||(t[6]=t=>e.dialogFormVisible=!1)},{default:(0,a.withCtx)((()=>t[17]||(t[17]=[(0,a.createTextVNode)("关 闭")]))),_:1})])])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(y,{model:e.form,ref:"form","label-width":e.formLabelWidth,rules:e.rules},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(x,{label:"IP",size:"mini",prop:"ip"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{modelValue:e.form.ip,"onUpdate:modelValue":t[2]||(t[2]=t=>e.form.ip=t),autocomplete:"off",maxlength:15,style:{width:"240px"}},null,8,["modelValue"])])),_:1}),(0,a.createVNode)(x,{label:"状态",size:"mini",prop:"status"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(v,{modelValue:e.form.status,"onUpdate:modelValue":t[3]||(t[3]=t=>e.form.status=t),label:"0"},{default:(0,a.withCtx)((()=>t[14]||(t[14]=[(0,a.createTextVNode)("允许通行")]))),_:1},8,["modelValue"]),(0,a.createVNode)(v,{modelValue:e.form.status,"onUpdate:modelValue":t[4]||(t[4]=t=>e.form.status=t),label:"1"},{default:(0,a.withCtx)((()=>t[15]||(t[15]=[(0,a.createTextVNode)("禁止通行")]))),_:1},8,["modelValue"])])),_:1}),(0,a.createVNode)(x,{label:"备注",size:"mini",prop:"remarks"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{type:"textarea",rows:3,modelValue:e.form.remarks,"onUpdate:modelValue":t[5]||(t[5]=t=>e.form.remarks=t),maxlength:200,autocomplete:"off"},null,8,["modelValue"])])),_:1})])),_:1},8,["model","label-width","rules"])])),_:1},8,["modelValue"])])}}}),h=(0,o(2653).Z)(p,[["__scopeId","data-v-244fc116"]])},385:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return U}}),o(3789);var a=o(2740),l=o(8066);const r={class:"box-card-header"},n={style:{position:"relative"}},i={style:{"padding-top":"35px"}};o(6087),o(8602);const d=["data-letters"],c=["data-letters"];var s={props:{className:{type:String,default:""},text:{type:String,default:"vue-element-admin"}}},u=o(2653),m=(0,u.Z)(s,[["render",function(e,t,o,l,r,n){return(0,a.openBlock)(),(0,a.createElementBlock)("a",{class:(0,a.normalizeClass)([o.className,"link--mallki"]),href:"#"},[(0,a.createTextVNode)((0,a.toDisplayString)(o.text)+" ",1),(0,a.createElementVNode)("span",{"data-letters":o.text},null,8,d),(0,a.createElementVNode)("span",{"data-letters":o.text},null,8,c)],2)}]]);const p={class:"pan-info"},h={class:"pan-info-roles-container"};var f={name:"PanThumb",data(){return{}},props:{image:{type:String,required:!0},zIndex:{type:Number,default:1},width:{type:String,default:"150px"},height:{type:String,default:"150px"}}},V=(0,u.Z)(f,[["render",function(e,t,o,l,r,n){return(0,a.openBlock)(),(0,a.createElementBlock)("div",{style:(0,a.normalizeStyle)({zIndex:o.zIndex,height:o.height,width:o.width}),class:"pan-item"},[(0,a.createElementVNode)("div",p,[(0,a.createElementVNode)("div",h,[(0,a.renderSlot)(e.$slots,"default",{},void 0,!0)])]),(0,a.createElementVNode)("div",{style:(0,a.normalizeStyle)({backgroundImage:`url(${o.image})`}),class:"pan-thumb"},null,4)],4)}],["__scopeId","data-v-57611446"]]);const g={id:"routeAccessChart",style:{width:"100%",height:"220px"}};var N=o(550),w=o(9517),C={data(){return{}},methods:{loadAccessCard(e,t,o){let a=this;console.log("balancedId",e),(0,w.QW)({balancedId:e,routeIds:t,dateType:o}).then((function(e){e&&e.data&&a.drawLine(e.data)}))},drawLine(e){let t=e.dates,o=[];e.datas.forEach(((e,t)=>{let a={name:e.routeId,type:"line",stack:"总量",smooth:!0,symbol:"none",areaStyle:{},data:e.counts};o.push(a)})),console.log("chart data",o);let a=N.init(document.getElementById("routeAccessChart"));var l={color:["#00ADD0","#FFA12F","#B62AFF","#727CF5","#1890FF","#00f6ff","#20C0F4","#95F300","#04FDB8","#AF5AFF"],tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},grid:{top:"10%",left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,data:t}],yAxis:[{type:"value",boundaryGap:[0,"10%"]}],series:o};a.setOption(l,!0)}}},x={components:{PanThumb:V,Mallki:m,RouteAccessChart:(0,u.Z)(C,[["render",function(e,t,o,l,r,n){return(0,a.openBlock)(),(0,a.createElementBlock)("div",g)}]])},filters:{statusFilter(e){return{success:"success",pending:"danger"}[e]}},props:["routeTable","balancedName"],data(){return{name:"boxCard",dateType:"min",balancedId:null,routeIds:[],timer:"",avatar:"https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif",statisticsData:{article_count:1024,pageviews_count:1024},colors:["#00ADD0","#FFA12F","#B62AFF","#727CF5","#1890FF","#00f6ff","#20C0F4","#95F300","#04FDB8","#AF5AFF"]}},created:function(){this.init()},mounted:function(){},beforeDestroy:function(){clearInterval(this.timer)},methods:{init(){console.log("routeTable",this.routeTable)},loadCard(e,t){console.log("data",t),this.balancedId=e,null!=t&&null!=t&&(this.routeIds=[],t.forEach(((e,t)=>{this.routeIds.push(e.routeId)})),this.loadAccessCard())},loadAccessCard(){null!=this.routeIds&&this.routeIds.length>0&&this.$refs.routeAccessChart.loadAccessCard(this.balancedId,this.routeIds,this.dateType)}}},v=(0,u.Z)(x,[["render",function(e,t,o,l,d,c){const s=(0,a.resolveComponent)("el-col"),u=(0,a.resolveComponent)("el-radio-button"),m=(0,a.resolveComponent)("el-radio-group"),p=(0,a.resolveComponent)("el-row"),h=(0,a.resolveComponent)("el-divider"),f=(0,a.resolveComponent)("RouteAccessChart"),V=(0,a.resolveComponent)("mallki"),g=(0,a.resolveComponent)("el-progress"),N=(0,a.resolveComponent)("el-card");return(0,a.openBlock)(),(0,a.createBlock)(N,{class:"box-card-component"},{header:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",r,[(0,a.createVNode)(p,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)(s,{span:12},{default:(0,a.withCtx)((()=>t[1]||(t[1]=[(0,a.createTextVNode)("  "),(0,a.createElementVNode)("div",{style:{"margin-left":"20px","text-align":"left"}},[(0,a.createElementVNode)("i",{class:"iconfont icon-guizeyinqing",style:{"font-size":"16pt",color:"#90A0A5"}}),(0,a.createElementVNode)("span",{style:{"font-size":"14pt",color:"#90A0A5","font-weight":"bold","margin-left":"6px"}},"访问量统计")],-1)]))),_:1}),(0,a.createVNode)(s,{span:12},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{modelValue:d.dateType,"onUpdate:modelValue":t[0]||(t[0]=e=>d.dateType=e),size:"mini",style:{"margin-top":"18px","margin-right":"18px",float:"right"},onChange:c.loadAccessCard},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(u,{label:"min"},{default:(0,a.withCtx)((()=>t[2]||(t[2]=[(0,a.createTextVNode)("60分")]))),_:1}),(0,a.createVNode)(u,{label:"hour"},{default:(0,a.withCtx)((()=>t[3]||(t[3]=[(0,a.createTextVNode)("24小时")]))),_:1}),(0,a.createVNode)(u,{label:"day"},{default:(0,a.withCtx)((()=>t[4]||(t[4]=[(0,a.createTextVNode)("7天")]))),_:1})])),_:1},8,["modelValue","onChange"])])),_:1})])),_:1}),(0,a.createVNode)(h,{style:{width:"80%"}}),(0,a.createVNode)(f,{ref:"routeAccessChart"},null,512)])])),default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",n,[(0,a.createVNode)(V,{"class-name":"mallki-text",text:o.balancedName+"-权重占比"},null,8,["text"]),(0,a.createElementVNode)("div",i,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(o.routeTable,((e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)("div",{key:t,class:"progress-item"},[(0,a.createElementVNode)("span",null,(0,a.toDisplayString)(e.name),1),(0,a.createVNode)(g,{percentage:e.weight,color:d.colors[t]},null,8,["percentage","color"])])))),128))])])])),_:1})}],["__scopeId","data-v-57a1b9b2"]]),y=o(1811);o(3300);const b={class:"layout-padding"},k={class:"layout-padding-auto layout-padding-view"},_={class:"box-flex-between"},E={class:"part-bottom"},T={class:"part-one"},S={style:{display:"flex","align-items":"center"}},z={class:"block",style:{"margin-top":"20px"}},B={class:"part-two"},F={class:"two-icon",style:{"margin-bottom":"14px"}},L={key:0,class:"el-icon-circle-check",style:{"font-size":"12pt","font-weight":"bold",color:"#409EFF"},title:"服务已启用"},D={key:1,class:"el-icon-circle-close",style:{"font-size":"12pt","font-weight":"bold",color:"#F56C6C"},title:"服务已禁用"},A={style:{"line-height":"28px",color:"#727CF5","font-weight":"bold"}},R={style:{"line-height":"28px",color:"#1890FF","font-weight":"bold"}},I={class:"part-three"},O={data(){return{form:{name:null,groupCode:null,status:null},parent:"/parent/",activeName:1,formLabelWidth:"140px",gatewayServer:"",tableData:[],currentPage:1,pageSize:10,totalNum:1,selectedId:0,pickerOptions:{disabledDate(e){return e.getTime()>Date.now()}},statusOptions:[{value:null,label:"所有"},{value:"0",label:"启用"},{value:"1",label:"禁用"}],groupOptions:this.GLOBAL_VAR.groups,balancedName:null,routeTable:[]}},components:{boxCardComponent:v},created:function(){this.init()},mounted:function(){},beforeDestroy:function(){},methods:{init(){this.search()},handleSizeChange(e){this.pageSize=e,this.search()},handleCurrentChange(e){this.currentPage=e,this.search()},formatterStatus(e,t){return"0"===e.status?"启用":"禁用"},handleClickBalanced(e){let t=this;this.selectedId=e.id,this.balancedName=e.name,(0,y.EO)({balancedId:e.id}).then((function(e){e&&e.data&&(t.routeTable=e.data,console.log(t.$refs.boxCard),t.$refs.boxCard.loadCard(t.selectedId,e.data))}))},handleCreateBalanced(){this.$router.push({path:"/createBalanced",query:{handleType:"add"}})},handleCommandGateway(e){let t=this;"edit"===e.command?this.$router.push({path:"/createBalanced",query:{handleType:"edit",balanced:e.row}}):"start"===e.command?(0,y.zH)({id:e.row.id}).then((function(e){t.GLOBAL_FUN.successMsg(),t.search()})):"stop"===e.command?(0,y.M5)({id:e.row.id}).then((function(e){t.GLOBAL_FUN.successMsg(),t.search()})):"delete"===e.command&&this.$confirm('确认删除"'+e.row.name+'"网关路由?').then((o=>{(0,y.d0)({id:e.row.id}).then((function(e){t.GLOBAL_FUN.successMsg(),t.search()}))})).catch((e=>{}))},handleClose(e){e()},handleCopy(e){let t=this.GLOBAL_VAR.gatewayRoutesURL+this.parent+e;this.GLOBAL_FUN.copy(t)},search(){let e=this;(0,y.M8)({name:this.form.name,groupCode:this.form.groupCode,status:this.form.status,currentPage:this.currentPage,pageSize:this.pageSize}).then((function(t){t.data&&t.data.records&&(e.tableData=t.data.records,e.totalNum=t.data.total,e.tableData.length>0&&e.handleClickBalanced(e.tableData[0]))}))}}};var P=Object.assign(O,{__name:"LoadBalanced",setup(e){return(e,t)=>{const o=(0,a.resolveComponent)("el-button"),r=(0,a.resolveComponent)("el-option"),n=(0,a.resolveComponent)("el-select"),i=(0,a.resolveComponent)("el-radio"),d=(0,a.resolveComponent)("el-popover"),c=(0,a.resolveComponent)("el-input"),s=(0,a.resolveComponent)("el-card"),u=(0,a.resolveComponent)("el-tag"),m=(0,a.resolveComponent)("el-tooltip"),p=(0,a.resolveComponent)("el-table-column"),h=(0,a.resolveComponent)("el-icon"),f=(0,a.resolveComponent)("el-dropdown-item"),V=(0,a.resolveComponent)("el-dropdown-menu"),g=(0,a.resolveComponent)("el-dropdown"),N=(0,a.resolveComponent)("el-table"),w=(0,a.resolveComponent)("el-pagination"),C=(0,a.resolveComponent)("el-collapse-item"),x=(0,a.resolveComponent)("el-collapse");return(0,a.openBlock)(),(0,a.createElementBlock)("div",b,[(0,a.createElementVNode)("div",k,[(0,a.createVNode)(s,null,{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",_,[(0,a.createVNode)(o,{icon:"el-icon-folder-add",style:{"margin-left":"5px"},type:"primary",onClick:e.handleCreateBalanced,title:"创建负载服务"},null,8,["onClick"]),(0,a.createVNode)(c,{placeholder:"请输入网关服务名称",modelValue:e.form.name,"onUpdate:modelValue":t[2]||(t[2]=t=>e.form.name=t),class:"input-with-select",style:{width:"620px"},clearable:""},{prepend:(0,a.withCtx)((()=>[(0,a.createVNode)(n,{modelValue:e.form.groupCode,"onUpdate:modelValue":t[0]||(t[0]=t=>e.form.groupCode=t),placeholder:"请选择分组",style:{width:"140px","margin-right":"10px"}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(r,{label:"所有",value:""}),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(e.groupOptions,(e=>((0,a.openBlock)(),(0,a.createBlock)(r,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"]),(0,a.createVNode)(d,{placement:"bottom",trigger:"click"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(o,null,{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)(" 服务状态:"+(0,a.toDisplayString)("0"===e.form.status?"启用":"1"===e.form.status?"禁用":"所有"),1),t[4]||(t[4]=(0,a.createElementVNode)("i",{class:"el-icon-caret-bottom el-icon--right"},null,-1))])),_:1})])),default:(0,a.withCtx)((()=>[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(e.statusOptions,(o=>((0,a.openBlock)(),(0,a.createBlock)(i,{modelValue:e.form.status,"onUpdate:modelValue":t[1]||(t[1]=t=>e.form.status=t),key:o.value,label:o.value},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(o.label),1)])),_:2},1032,["modelValue","label"])))),128))])),_:1})])),append:(0,a.withCtx)((()=>[(0,a.createVNode)(o,{icon:"el-icon-search",onClick:e.search,title:"查询网关服务"},null,8,["onClick"])])),_:1},8,["modelValue"])])])),_:1}),(0,a.createElementVNode)("div",E,[(0,a.createElementVNode)("div",T,[(0,a.createVNode)(s,{class:"box-card"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(N,{size:"small",data:e.tableData,height:"calc(100% - 50px)"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(p,{label:"服务名称"},{default:(0,a.withCtx)((({row:e})=>[(0,a.createVNode)(m,{effect:"dark",content:e.name,placement:"top-start"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(u,{size:"small",type:"warning",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.name),1)])),_:2},1024)])),_:2},1032,["content"])])),_:1}),(0,a.createVNode)(p,{label:"分组",width:"90"},{default:(0,a.withCtx)((({row:t})=>[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(e.groupOptions,(e=>(0,a.withDirectives)(((0,a.openBlock)(),(0,a.createBlock)(u,{key:e.value,size:"small",type:""},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.label),1)])),_:2},1024)),[[a.vShow,e.value===t.groupCode]]))),128))])),_:1}),(0,a.createVNode)(p,{label:"断言地址",width:"180"},{default:(0,a.withCtx)((({row:r})=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.parent)+(0,a.toDisplayString)(r.loadUri)+" ",1),(0,a.createVNode)(d,{placement:"bottom",width:240,trigger:"click"},{reference:(0,a.withCtx)((()=>[(0,a.createVNode)(h,{color:"#409eff"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.RbR))])),_:1})])),default:(0,a.withCtx)((()=>[t[5]||(t[5]=(0,a.createElementVNode)("div",{style:{"margin-bottom":"8px"}},[(0,a.createElementVNode)("i",{class:"el-icon-dataAnalysis",style:{"font-size":"16pt",color:"#90A0A5"}}),(0,a.createElementVNode)("span",{class:"route-title"},"网关代理地址")],-1)),(0,a.createElementVNode)("div",S,[(0,a.createVNode)(u,{size:"small",type:"success",style:{"font-weight":"bold"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.GLOBAL_VAR.gatewayRoutesURL)+(0,a.toDisplayString)(e.parent)+(0,a.toDisplayString)(r.loadUri),1)])),_:2},1024),(0,a.createVNode)(o,{style:{padding:"3px 0"},icon:"el-icon-document-copy",type:"text",onClick:t=>e.handleCopy(r.loadUri),title:"复制"},null,8,["onClick"])]),t[6]||(t[6]=(0,a.createElementVNode)("br",null,null,-1)),(0,a.createVNode)(o,{style:{padding:"3px 0"},type:"text",title:"网关代理地址"})])),_:2},1024)])),_:1}),(0,a.createVNode)(p,{label:"创建时间",width:"135",prop:"createTime"}),(0,a.createVNode)(p,{label:"状态",width:"65",prop:"status",formatter:e.formatterStatus},{default:(0,a.withCtx)((({row:e})=>["0"===e.status?((0,a.openBlock)(),(0,a.createBlock)(u,{key:0,effect:"dark",size:"small",type:""},{default:(0,a.withCtx)((()=>t[7]||(t[7]=[(0,a.createTextVNode)("启用")]))),_:1})):(0,a.createCommentVNode)("",!0),"1"===e.status?((0,a.openBlock)(),(0,a.createBlock)(u,{key:1,effect:"dark",size:"small",type:"danger"},{default:(0,a.withCtx)((()=>t[8]||(t[8]=[(0,a.createTextVNode)("禁用")]))),_:1})):(0,a.createCommentVNode)("",!0)])),_:1},8,["formatter"]),(0,a.createVNode)(p,{label:"操作",width:"80",fixed:"right"},{default:(0,a.withCtx)((({row:r})=>[(0,a.createVNode)(g,{trigger:"click",onCommand:e.handleCommandGateway},{dropdown:(0,a.withCtx)((()=>[(0,a.createVNode)(V,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)(f,{icon:"el-icon-edit",command:{command:"edit",row:r}},{default:(0,a.withCtx)((()=>t[10]||(t[10]=[(0,a.createTextVNode)("编辑")]))),_:2},1032,["command"]),(0,a.createVNode)(f,{command:{command:"start",row:r},divided:""},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(h,{color:"#409EFF"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.rV3))])),_:1}),t[11]||(t[11]=(0,a.createTextVNode)("启用 "))])),_:2},1032,["command"]),(0,a.createVNode)(f,{command:{command:"stop",row:r}},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(h,{color:"#ff0000"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.Tw$))])),_:1}),t[12]||(t[12]=(0,a.createTextVNode)("禁用 "))])),_:2},1032,["command"]),(0,a.createVNode)(f,{icon:"el-icon-delete",command:{command:"delete",row:r},divided:""},{default:(0,a.withCtx)((()=>t[13]||(t[13]=[(0,a.createTextVNode)("删除")]))),_:2},1032,["command"])])),_:2},1024)])),default:(0,a.withCtx)((()=>[(0,a.createVNode)(o,{size:"small",type:"warning"},{default:(0,a.withCtx)((()=>[t[9]||(t[9]=(0,a.createTextVNode)(" 管理 ")),(0,a.createVNode)(h,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.K5e))])),_:1})])),_:1})])),_:2},1032,["onCommand"])])),_:1}),(0,a.createVNode)(p,{label:"查看",width:"58",fixed:"right"},{default:(0,a.withCtx)((({row:t})=>[(0,a.createVNode)(o,{size:"small",onClick:o=>e.handleClickBalanced(t),icon:e.selectedId===t.id?(0,a.unref)(l.olP):(0,a.unref)(l.K5e),circle:"",title:"请点击选中查看",class:(0,a.normalizeClass)(e.selectedId===t.id?"breathe-keyframes btn-select":"btn-not-select")},null,8,["onClick","icon","class"])])),_:1})])),_:1},8,["data"]),(0,a.createElementVNode)("div",z,[(0,a.createVNode)(w,{onSizeChange:e.handleSizeChange,onCurrentChange:e.handleCurrentChange,"current-page":e.currentPage,"page-sizes":[10,30,50],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.totalNum},null,8,["onSizeChange","onCurrentChange","current-page","page-size","total"])])])),_:1})]),(0,a.createElementVNode)("div",B,[(0,a.createVNode)(s,{class:"box-card"},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",F,[(0,a.createVNode)(h,{size:"20",color:"#90A0A5"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)((0,a.unref)(l.fDA))])),_:1}),t[14]||(t[14]=(0,a.createElementVNode)("span",{class:"route-title"},"转发路由",-1))]),(0,a.createVNode)(x,{modelValue:e.activeName,"onUpdate:modelValue":t[3]||(t[3]=t=>e.activeName=t)},{default:(0,a.withCtx)((()=>[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(e.routeTable,((e,o)=>((0,a.openBlock)(),(0,a.createBlock)(C,{key:o,name:o+1},{title:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",null,[(0,a.createVNode)(u,{size:"",type:"success",style:{"font-weight":"bold","background-color":"#FFFFFF",color:"#303133"}},{default:(0,a.withCtx)((()=>[(0,a.createTextVNode)((0,a.toDisplayString)(e.name)+" ",1),"0"===e.status?((0,a.openBlock)(),(0,a.createElementBlock)("i",L)):(0,a.createCommentVNode)("",!0),"1"===e.status?((0,a.openBlock)(),(0,a.createElementBlock)("i",D)):(0,a.createCommentVNode)("",!0)])),_:2},1024)])])),default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("div",A,[t[15]||(t[15]=(0,a.createElementVNode)("i",{class:"el-icon-s-promotion",style:{"font-size":"12pt","font-weight":"bold"}},null,-1)),(0,a.createTextVNode)("  "+(0,a.toDisplayString)(e.routeId),1)]),(0,a.createElementVNode)("div",R,[t[16]||(t[16]=(0,a.createElementVNode)("i",{class:"el-icon-connection",style:{"font-size":"12pt","font-weight":"bold"}},null,-1)),(0,a.createTextVNode)("  "+(0,a.toDisplayString)(e.uri),1)])])),_:2},1032,["name"])))),128))])),_:1},8,["modelValue"])])),_:1})]),(0,a.createElementVNode)("div",I,[(0,a.createVNode)(v,{ref:"boxCard","balanced-name":e.balancedName,"route-table":e.routeTable},null,8,["balanced-name","route-table"])])])])])}}}),U=(0,u.Z)(P,[["__scopeId","data-v-23f005b4"]])},2072:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return d}});var a=o(2740);const l={style:{float:"right",color:"rgba(255, 255, 255, 0.5)","margin-right":"20px","font-size":"14px"}},r=["href"],n={class:"el-icon-collection-tag el-icon--left",title:"系统版本"};var i={data(){return{isRouterAlive:!0,isDisabled:!0,gatewayRoutesURL:this.GLOBAL_VAR.gatewayRoutesURL+"/actuator/gateway/routes"}},created:function(){this.init()},mounted:function(){},beforeDestroy:function(){},methods:{init(){this.$router.replace("/loadBalanced")},handleSelect(e,t){console.log(e)},handleLogout(){console.log("logout")}}},d=(0,o(2653).Z)(i,[["render",function(e,t,o,i,d,c){const s=(0,a.resolveComponent)("el-menu-item"),u=(0,a.resolveComponent)("el-menu"),m=(0,a.resolveComponent)("el-col"),p=(0,a.resolveComponent)("el-row"),h=(0,a.resolveComponent)("el-header"),f=(0,a.resolveComponent)("el-backtop"),V=(0,a.resolveComponent)("router-view"),g=(0,a.resolveComponent)("el-main"),N=(0,a.resolveComponent)("el-container");return(0,a.openBlock)(),(0,a.createElementBlock)("div",null,[(0,a.createVNode)(N,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)(h,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)(p,null,{default:(0,a.withCtx)((()=>[(0,a.createVNode)(m,{span:18},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(u,{router:"","default-active":e.$route.path,mode:"horizontal",onSelect:c.handleSelect,"background-color":"#545c64","text-color":"#fff","active-text-color":"#ffd04b"},{default:(0,a.withCtx)((()=>[(0,a.createVNode)(s,{index:"/loadBalanced",class:"iconfont icon-jichuguanli"},{default:(0,a.withCtx)((()=>t[1]||(t[1]=[(0,a.createTextVNode)("负载管理")]))),_:1}),(0,a.createVNode)(s,{index:"/gatewayList",class:"el-icon-connection"},{default:(0,a.withCtx)((()=>t[2]||(t[2]=[(0,a.createTextVNode)("服务管理")]))),_:1}),(0,a.createVNode)(s,{index:"/clientList",class:"el-icon-s-custom"},{default:(0,a.withCtx)((()=>t[3]||(t[3]=[(0,a.createTextVNode)("客户端管理")]))),_:1}),(0,a.createVNode)(s,{index:"/ipList",class:"iconfont icon-IP"},{default:(0,a.withCtx)((()=>t[4]||(t[4]=[(0,a.createTextVNode)("IP名单管理")]))),_:1}),(0,a.createVNode)(s,{index:"/apiCount",class:"el-icon-s-data"},{default:(0,a.withCtx)((()=>t[5]||(t[5]=[(0,a.createTextVNode)("接口统计")]))),_:1}),(0,a.createVNode)(s,{index:"/apiMonitor",class:"iconfont icon-gaojing"},{default:(0,a.withCtx)((()=>t[6]||(t[6]=[(0,a.createTextVNode)("接口监控")]))),_:1}),(0,a.createVNode)(s,{index:"/apiDoc",class:"el-icon-collection"},{default:(0,a.withCtx)((()=>t[7]||(t[7]=[(0,a.createTextVNode)("接口文档")]))),_:1})])),_:1},8,["default-active","onSelect"])])),_:1}),(0,a.createVNode)(m,{span:6,style:{"line-height":"60px",height:"60px"}},{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("span",l,[(0,a.createElementVNode)("a",{href:d.gatewayRoutesURL,target:"_blank",style:{"text-decoration":"none",color:"#AAAEB2"},class:"iconfont icon-liebiao",title:"网关路由生效配置列表"},null,8,r),t[8]||(t[8]=(0,a.createTextVNode)("   ")),(0,a.createElementVNode)("i",n," 版本 "+(0,a.toDisplayString)(e.GLOBAL_VAR.systemVersion),1),t[9]||(t[9]=(0,a.createTextVNode)("   ")),(0,a.createElementVNode)("a",{href:"javascript:viod();",style:{"text-decoration":"none",color:"#AAAEB2"},class:"el-icon-setting el-icon--left",title:"退出系统",onClick:t[0]||(t[0]=(...e)=>c.handleLogout&&c.handleLogout(...e))}," 退出")])])),_:1})])),_:1})])),_:1}),(0,a.createVNode)(g,null,{default:(0,a.withCtx)((()=>[(0,a.createElementVNode)("template",null,[(0,a.createVNode)(f,null,{default:(0,a.withCtx)((()=>t[10]||(t[10]=[(0,a.createTextVNode)("UP")]))),_:1})]),d.isRouterAlive?((0,a.openBlock)(),(0,a.createBlock)(V,{key:0,name:"mainView",ref:"viewPage"},null,512)):(0,a.createCommentVNode)("",!0)])),_:1})])),_:1})])}]])},588:function(e,t,o){var a={"./views/AddClientGateway":[2512],"./views/AddClientGateway.vue":[2512],"./views/AddGatewayClient":[3453],"./views/AddGatewayClient.vue":[3453],"./views/AddGroovyScript":[901],"./views/AddGroovyScript.vue":[901],"./views/ApiCount":[9461],"./views/ApiCount.vue":[9461],"./views/ApiDoc":[9334],"./views/ApiDoc.vue":[9334],"./views/ApiMonitor":[5340],"./views/ApiMonitor.vue":[5340],"./views/ClientList":[6105],"./views/ClientList.vue":[6105],"./views/CreateBalanced":[1840],"./views/CreateBalanced.vue":[1840],"./views/CreateClient":[2955],"./views/CreateClient.vue":[2955],"./views/CreateGateway":[8893,834],"./views/CreateGateway.vue":[8893,834],"./views/GatewayList":[625],"./views/GatewayList.vue":[625],"./views/GatewayTopology":[4980,834],"./views/GatewayTopology.vue":[4980,834],"./views/IpList":[4516],"./views/IpList.vue":[4516],"./views/LoadBalanced":[385],"./views/LoadBalanced.vue":[385],"./views/Main":[2072],"./views/Main.vue":[2072]};function l(e){if(!o.o(a,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=a[e],l=t[0];return Promise.all(t.slice(1).map(o.e)).then((function(){return o(l)}))}l.keys=function(){return Object.keys(a)},l.id=588,e.exports=l},8066:function(e,t,o){"use strict";o.d(t,{HXv:function(){return n},K5e:function(){return l},RbR:function(){return c},Tw$:function(){return d},fDA:function(){return s},olP:function(){return r},rV3:function(){return i}});var a=o(2740),l=(0,a.defineComponent)({name:"ArrowDown",__name:"arrow-down",setup(e){return(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[(0,a.createElementVNode)("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),r=(0,a.defineComponent)({name:"ArrowRight",__name:"arrow-right",setup(e){return(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[(0,a.createElementVNode)("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),n=(0,a.defineComponent)({name:"CaretBottom",__name:"caret-bottom",setup(e){return(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[(0,a.createElementVNode)("path",{fill:"currentColor",d:"m192 384 320 384 320-384z"})]))}}),i=(0,a.defineComponent)({name:"CircleCheckFilled",__name:"circle-check-filled",setup(e){return(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[(0,a.createElementVNode)("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),d=(0,a.defineComponent)({name:"CircleCloseFilled",__name:"circle-close-filled",setup(e){return(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[(0,a.createElementVNode)("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),c=(0,a.defineComponent)({name:"DataAnalysis",__name:"data-analysis",setup(e){return(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[(0,a.createElementVNode)("path",{fill:"currentColor",d:"m665.216 768 110.848 192h-73.856L591.36 768H433.024L322.176 960H248.32l110.848-192H160a32 32 0 0 1-32-32V192H64a32 32 0 0 1 0-64h896a32 32 0 1 1 0 64h-64v544a32 32 0 0 1-32 32zM832 192H192v512h640zM352 448a32 32 0 0 1 32 32v64a32 32 0 0 1-64 0v-64a32 32 0 0 1 32-32m160-64a32 32 0 0 1 32 32v128a32 32 0 0 1-64 0V416a32 32 0 0 1 32-32m160-64a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V352a32 32 0 0 1 32-32"})]))}}),s=(0,a.defineComponent)({name:"Guide",__name:"guide",setup(e){return(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[(0,a.createElementVNode)("path",{fill:"currentColor",d:"M640 608h-64V416h64zm0 160v160a32 32 0 0 1-32 32H416a32 32 0 0 1-32-32V768h64v128h128V768zM384 608V416h64v192zm256-352h-64V128H448v128h-64V96a32 32 0 0 1 32-32h192a32 32 0 0 1 32 32z"}),(0,a.createElementVNode)("path",{fill:"currentColor",d:"m220.8 256-71.232 80 71.168 80H768V256H220.8zm-14.4-64H800a32 32 0 0 1 32 32v224a32 32 0 0 1-32 32H206.4a32 32 0 0 1-23.936-10.752l-99.584-112a32 32 0 0 1 0-42.496l99.584-112A32 32 0 0 1 206.4 192m678.784 496-71.104 80H266.816V608h547.2l71.168 80zm-56.768-144H234.88a32 32 0 0 0-32 32v224a32 32 0 0 0 32 32h593.6a32 32 0 0 0 23.936-10.752l99.584-112a32 32 0 0 0 0-42.496l-99.584-112A32 32 0 0 0 828.48 544z"})]))}})}}]);
3
- //# sourceMappingURL=views-CreateGateway.7db295a9.js.map