diff --git a/frontend b/frontend index 895f27cf..d8a32323 160000 --- a/frontend +++ b/frontend @@ -1 +1 @@ -Subproject commit 895f27cfa21916a7b504555171af8b3c2bd9945c +Subproject commit d8a32323f46bf8a01de5670bc3757eb4907c38a5 diff --git a/static/dist/index.html b/static/dist/index.html index ee1bb8e8..c2eede69 100644 --- a/static/dist/index.html +++ b/static/dist/index.html @@ -1 +1 @@ -ClickHouse Management Console
\ No newline at end of file +ClickHouse Management Console
\ No newline at end of file diff --git a/static/dist/js/app.9b5aa182.js b/static/dist/js/app.9b5aa182.js new file mode 100644 index 00000000..b611cd0d --- /dev/null +++ b/static/dist/js/app.9b5aa182.js @@ -0,0 +1 @@ +(function(e){function t(t){for(var r,o,c=t[0],s=t[1],l=t[2],u=0,f=[];u0?[n("el-select",{staticClass:"width-350",attrs:{disabled:"false"===e.schema.editable,size:"medium",placeholder:e.$t("common.Please choose")},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}},e._l(e.getFilterOption(e.schema.candidates),(function(t,r){return n("el-option",{key:r,attrs:{label:t["label_"+e.lang],value:["int","float"].includes(e.schema.type)?Number(t.value):t.value}})})),1)]:["string"===e.schema.type?["text"===e.schema.input_type?n("el-input",{staticClass:"width-350",attrs:{size:"medium",disabled:"false"===e.schema.editable,placeholder:e.$t("common.Please fill out")},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}}):e._e(),"textarea"===e.schema.input_type?n("el-input",{staticClass:"width-350",attrs:{size:"medium",disabled:"false"===e.schema.editable,type:"textarea",placeholder:e.$t("common.Please fill out")},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}}):e._e(),"password"===e.schema.input_type?n("el-input",{staticClass:"width-350",attrs:{size:"medium",disabled:"false"===e.schema.editable,autocomplete:"new-password",placeholder:e.$t("common.Please fill out"),"show-password":""},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}}):e._e()]:e._e(),"bool"===e.schema.type?n("el-switch",{attrs:{disabled:"false"===e.schema.editable,size:"medium"},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}}):e._e(),"int"===e.schema.type?n("el-input-number",{staticClass:"width-350",attrs:{disabled:"false"===e.schema.editable,size:"medium",controls:!1,precision:0,min:e.schema.range&&e.schema.range.min||-1/0,max:e.schema.range&&e.schema.range.max||1/0,step:e.schema.range&&e.schema.range.step||1},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}}):e._e(),"float"===e.schema.type?n("el-input-number",{staticClass:"width-350",attrs:{disabled:"false"===e.schema.editable,size:"medium",controls:!1,precision:e.precision,min:e.schema.range&&e.schema.range.min||-1/0,max:e.schema.range&&e.schema.range.max||1/0,step:e.schema.range&&e.schema.range.step||1},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}}):e._e(),"struct"===e.schema.type?n("struct",{directives:[{name:"show",rawName:"v-show",value:e.isSlideUp,expression:"isSlideUp"}],attrs:{schema:e.schema.struct,"prop-name":""+e.propName},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}}):e._e(),"list-struct"===e.schema.type?n("list-struct",{directives:[{name:"show",rawName:"v-show",value:e.isSlideUp,expression:"isSlideUp"}],ref:"listStructRef",attrs:{schema:e.schema,"prop-name":e.propName,"origin-name":e.originName},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}}):e._e(),"list-string"===e.schema.type?n("list-string",{directives:[{name:"show",rawName:"v-show",value:e.isSlideUp,expression:"isSlideUp"}],ref:"listStringRef",attrs:{schema:e.schema,"prop-name":e.propName},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}}):e._e(),"map"===e.schema.type?n("Map",{directives:[{name:"show",rawName:"v-show",value:e.isSlideUp,expression:"isSlideUp"}],ref:"mapRef",attrs:{schema:e.schema,"prop-name":e.propName},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}}):e._e(),e._t("suffix")]],2):e._e()},o=[],i=n("5c8a"),a=n("32e8"),c=n("641c"),s={name:"dFormItem",components:{Struct:function(){return n.e("chunk-2d0c7d23").then(n.bind(null,"51f7"))},ListStruct:function(){return n.e("chunk-753853f4").then(n.bind(null,"1d60"))},ListString:function(){return n.e("chunk-2d0c7310").then(n.bind(null,"5021"))},Map:function(){return n.e("chunk-2d0b9416").then(n.bind(null,"31bd"))}},model:{prop:"formModel",event:"change"},props:{schema:{type:Object,default:function(){return{}}},originName:{type:String,default:""},propName:{type:String,default:""},formModel:{type:Object,default:function(){return{}}},isCascade:{type:Boolean,default:!1}},computed:{lang:function(){return this.$i18n.locale},isShowAddIcon:function(){return["list-struct","list-string","map"].includes(this.schema.type)},isShowCaret:function(){return["list-struct","list-string","map","struct"].includes(this.schema.type)},isComplexType:function(){return["list-struct","list-string","map","struct"].includes(this.schema.type)},isRequired:function(){var e=this.formModel,t=this.schema.required;try{return Object(c["a"])(e,"return ".concat(t,";"))}catch(n){console.warn(e,t,n)}},isVisible:function(){var e=this.formModel,t=this.schema.visiable;try{return Object(c["a"])(e,"return ".concat(t,";"))}catch(n){console.warn(e,t,n)}},className:function(){var e=this.isComplexType,t=this.schema.type,n=this.originName,r=this.isSlideUp,o=this.formModel,i="";return e?(i+="complex-item",!r&&o[n]&&0!==o[n].length||(i+=" hide-content")):i+="normal-item",i+=" "+t,i},precision:function(){var e=this.schema;if(e.range&&e.range.step){var t=e.range.step.toString().split(".");if(t.length>1)return t[1].length}},description:function(){var e=this.schema,t=this.originName,n=this.lang,r=e.type,o=e.range,i=e["default"],a=e.required,c=["".concat(this.$t("common.Field Name"),":").concat(e["label_"+n]||""),"name: ".concat(t||""),"".concat(this.$t("common.Field Type"),":").concat(r||""),"".concat(this.$t("common.Defaults"),":").concat(i||this.$t("common.Null")),"".concat(this.$t("common.Is it required"),":").concat(a?this.$t("common.Yes"):this.$t("common.No")),"".concat(this.$t("common.Description"),":").concat(e["description_"+n]||"")];if(["int","float"].includes(r))if(o){var s=o.min,l=o.max;c.splice(2,0,"".concat(this.$t("common.Ranges"),":[ ").concat(s,", ").concat(l," ]"))}else c.splice(2,0,"".concat(this.$t("common.Ranges"),":").concat(this.$t("common.Null")));return c},rules:function(){var e=this,t=this.isRequired,n=this.schema,r=(this.lang,this.$t,n.range),o=n.regexp,s=n.type,l=(n.struct,[null,"",void 0]);return{trigger:["blur"],validator:function(u,f){if(1==t)switch(s){case"list-string":return 0===f.length?(e.isSlideUp=!0,new Error(e.$t("common.Required"))):(e.errorMessage="",!0);case"struct":var p=Object(c["c"])(Object(i["a"])(f),n);return Object(a["a"])(p,null)?(e.isSlideUp=!0,new Error(e.$t("common.Required"))):(e.errorMessage="",!0);case"list-struct":return 0!==f.length||new Error(e.$t("common.Required"));case"map":var d=Object(c["c"])(Object(i["a"])(f),n);return!Object(a["a"])(d,null)||(e.isSlideUp=!0,new Error(e.$t("common.Required")))}if(t&&l.includes(f))return new Error(e.$t("common.Required"));if(o&&!l.includes(f)&&!new RegExp(o.slice(1,-1)).test(f))return new Error(e.$t("common.Input error, please check the rules and re-enter"));if(!r||l.includes(f))return!0;var b=r.min,h=r.max;return f=h)||new Error(e.$t("common.Please enter a value less than or equal to {max}",{max:h}))}}}},data:function(){return{label:"",isSlideUp:!0,errorMessage:""}},methods:{getFilterOption:function(e){var t=this,n=this.schema.filter;return n?e.filter((function(e){return Object(c["a"])(t.formModel,"return ".concat(n.replace(t.originName,"".concat(e.value)),";"))})):e},addItem:function(){this.isSlideUp=!0;var e=this.schema,t=e.type;"list-struct"!==t?"list-string"!==t?"map"!==t||this.$refs.mapRef.addItem():this.$refs.listStringRef.addItem():this.$refs.listStructRef.addItem()}}},l=s,u=(n("5133"),n("2877")),f=Object(u["a"])(l,r,o,!1,null,"5f7732b8",null);t["default"]=f.exports},"129c":function(e,t,n){"use strict";n.d(t,"e",(function(){return _})),n.d(t,"b",(function(){return C})),n.d(t,"c",(function(){return T})),n.d(t,"d",(function(){return E})),n.d(t,"f",(function(){return I})),n.d(t,"a",(function(){return M}));var r=n("7ee8"),o=(n("98db"),n("2b0e")),i=n("475b"),a=n("84e1"),c=n("70f2");function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:0;if(this.handle&&cancelAnimationFrame(this.handle),"number"!==typeof e)this.$el.textContent=e;else{var r,o=e+"",i=o.indexOf("."),a=i>-1?o.length-i-1:0,c=function o(i){r=r||i,i-r>=500?t.$el.textContent=e+"":(t.$el.textContent=(n+(e-n)*(i-r)/500).toFixed(a),t.handle=requestAnimationFrame(o))};this.handle=requestAnimationFrame(c)}}},{key:"render",value:function(e){return e("span",{class:"font-mono"})}},{key:"mounted",value:function(){this.$el.textContent=this.value}},{key:"beforeDestroy",value:function(){this.handle&&cancelAnimationFrame(this.handle)}}]),n}(s["e"]);Object(c["a"])([Object(s["c"])({type:[Number,String]}),Object(c["b"])("design:type",Object)],O.prototype,"value",void 0),Object(c["a"])([Object(s["f"])("value"),Object(c["b"])("design:type",Function),Object(c["b"])("design:paramtypes",[Object,Object]),Object(c["b"])("design:returntype",void 0)],O.prototype,"valueChange",null),O=Object(c["a"])([Object(s["a"])()],O);var j=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("nav",{style:e.navStyle},[e._t("default")],2),e.customRouterView?e._e():[e.keepAlive?n("keep-alive",[n("router-view",e._b({key:e.viewKey,ref:"view"},"router-view",e.props,!1))],1):n("router-view",e._b({key:e.viewKey,ref:"view"},"router-view",e.props,!1))]],2)},w=[];function k(e){return k="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&C(e,t)}function C(e,t){return C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},C(e,t)}function x(e){var t=E();return function(){var n,r=R(e);if(t){var o=R(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return P(this,n)}}function P(e,t){return!t||"object"!==k(t)&&"function"!==typeof t?T(e):t}function T(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}var I=function(e){S(n,e);var t=x(n);function n(){return _(this,n),t.apply(this,arguments)}return n}(s["e"]);Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Boolean)],I.prototype,"keepAlive",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Object)],I.prototype,"props",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Object)],I.prototype,"navStyle",void 0),Object(c["a"])([Object(s["c"])({type:[String,Number]}),Object(c["b"])("design:type",Object)],I.prototype,"viewKey",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Boolean)],I.prototype,"customRouterView",void 0),I=Object(c["a"])([Object(s["a"])()],I);var A,M=I,N=M,D=(n("6759"),n("2877")),$=Object(D["a"])(N,j,w,!1,null,"36bb0f3f",null),L=$.exports,W=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-drawer",e._b({ref:"modal",class:e.classes,attrs:{"modal-append-to-body":!1,"focus-first":!1,visible:e.visible,"before-close":e.onBeforeClose},on:{"update:visible":function(t){e.visible=t},closed:e.onHidden}},"el-drawer",e.props,!1),[n("div",{staticClass:"sharp-drawer__body"},[n(e.childComponent,e._b({ref:"body",tag:"component",attrs:{modalInstance:this}},"component",e.data,!1))],1),null!==e.props.cancelText||null!==e.props.okText?n("div",{staticClass:"footer"},[null!==e.props.cancelText?n("el-button",{on:{click:e.onCancel}},[e._v(e._s(e.props.cancelText))]):e._e(),null!==e.props.okText?n("el-button",{attrs:{type:"primary",loading:e.loading},on:{click:e.onOk}},[e._v(e._s(e.props.okText))]):e._e()],1):e._e()])},z=[];function B(e){return B="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function V(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1];this.visible=!1,this.resultValue=e,this.isOk=t}},{key:"onHidden",value:function(){this.isOk?this.resolve(this.resultValue):this.resolve(Promise.reject(null==this.resultValue?"cancel":this.resultValue))}},{key:"onOk",value:function(){var e=this,t=this.body.onOk?this.body.onOk(this):this.body;t&&"function"===typeof t.then?(this.loading=!0,Promise.resolve(t).then((function(t){return e.close(t,!0)}))["finally"]((function(){return e.loading=!1}))):(this.close(t),this.isOk=!0)}},{key:"onCancel",value:function(){this.body.onCancel?this.body.onCancel(this):this.close("cancel")}}]),n}(s["e"]);Object(c["a"])([Object(s["d"])(),Object(c["b"])("design:type",Object)],Y.prototype,"body",void 0),Object(c["a"])([Object(s["d"])(),Object(c["b"])("design:type",Object)],Y.prototype,"modal",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type","function"===typeof(A="undefined"!==typeof Record&&Record)?A:Object)],Y.prototype,"props",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Object)],Y.prototype,"data",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Function)],Y.prototype,"resolve",void 0),Object(c["a"])([Object(s["c"])({type:[i["default"],Function,Object]}),Object(c["b"])("design:type",Object)],Y.prototype,"childComponent",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Array)],Y.prototype,"classes",void 0),Y=Object(c["a"])([Object(s["a"])()],Y);var J,ee=Y,te={name:"SharpDrawer",mixins:[ee]},ne=te,re=(n("0724"),Object(D["a"])(ne,W,z,!1,null,"1bd3fe04",null)),oe=re.exports,ie=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dialog",e._b({ref:"modal",class:e.classes,attrs:{"modal-append-to-body":!1,"close-on-click-modal":!1,visible:e.visible,"before-close":e.onBeforeClose},on:{"update:visible":function(t){e.visible=t},closed:e.onHidden}},"el-dialog",e.props,!1),[n(e.childComponent,e._b({ref:"body",tag:"component",attrs:{modalInstance:this}},"component",e.data,!1)),null!==e.props.cancelText||null!==e.props.okText?n("template",{slot:"footer"},[null!==e.props.cancelText?n("el-button",{on:{click:e.onCancel}},[e._v(e._s(e.props.cancelText))]):e._e(),null!==e.props.okText?n("el-button",{attrs:{type:"primary",loading:e.loading},on:{click:e.onOk}},[e._v(e._s(e.props.okText))]):e._e()],1):e._e()],2)},ae=[],ce={name:"SharpModal",mixins:[ee]},se=ce,le=(n("afbc"),Object(D["a"])(se,ie,ae,!1,null,"36d9125e",null)),ue=le.exports,fe=n("4668");function pe(e){return pe="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pe(e)}function de(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function be(e){for(var t=1;t"===e.item.tempValue.verb.key?[n("span",{staticClass:"mlr-10 mt-5"},[e._v("~")]),n("el-input-number",{staticClass:"flex-1",attrs:{size:e.size,"controls-position":"right",min:e.item.tempValue.value1},model:{value:e.item.tempValue.value2,callback:function(t){e.$set(e.item.tempValue,"value2",t)},expression:"item.tempValue.value2"}})]:e._e()],2),n("footer",{staticClass:"text-right mt-10"},[n("el-button",{attrs:{size:"mini"},on:{click:function(t){e.item.visible=!1,e.$refs.popover.doClose()}}},[e._v("取消")]),e._v(" "),n("el-button",{attrs:{size:"mini",type:"primary","html-type":"submit",disabled:e.shouldDisableRange()},on:{click:function(t){e.$emit("call","selectRange",e.item),e.$refs.popover.doClose()}}},[e._v("确定")])],1)])])},ot=[],it={props:{item:Object,size:String,operators:Array},methods:{shouldDisableRange:function(){return null==this.item.tempValue.value1&&("<=>"!==this.item.tempValue.verb||this.item.tempValue.value2>this.item.tempValue.value1)}}},at=it,ct=Object(D["a"])(at,rt,ot,!1,null,null,null),st=ct.exports,lt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dropdown",{attrs:{trigger:"click",placement:"bottom-start"}},[n("a",{staticClass:"ss-tag-text"},[n("i",{staticClass:"el-icon-arrow-down"}),e._v(" "+e._s(e.item.detail.title)),e.item.displayText?n("span",[e._v("("+e._s(e.item.displayText)+")")]):e._e()]),n("el-dropdown-menu",{staticClass:"checkable maxheight-list",attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.item.options,(function(t){return n("el-dropdown-item",{key:t.value,staticClass:"dropdown-item",class:{selected:e.item.value===t.value},nativeOn:{click:function(n){return e.$emit("call","selectSingle",e.item,t)}}},[e._v(e._s(t.label)+" ")])})),1)],1)},ut=[],ft={props:{item:Object,size:String}},pt=ft,dt=Object(D["a"])(pt,lt,ut,!1,null,null,null),bt=dt.exports;function ht(e){return ht="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ht(e)}function yt(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(r,o)}function mt(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){yt(i,r,o,a,c,"next",e)}function c(e){yt(i,r,o,a,c,"throw",e)}a(void 0)}))}}function vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gt(e){for(var t=1;t",label:"区间"},{key:">",label:"大于"},{key:">=",label:"大于等于"},{key:"==",label:"等于"},{key:"!=",label:"不等于"}],e.components=r,e}return kt(n,[{key:"optionDetailChange",value:function(e){this.data.forEach((function(t){var n;if(t.options){var r=new Set(t.options.filter((function(e){return e.selected})).map((function(e){return e.value})));switch(t.options=(e[t.key]||[]).map((function(e){return gt(gt({},e),{},{selected:r.has(e.value)})})),t.detail.filterType){case"single":var o=t.options.find((function(e){return e.selected}));t.value=null!==(n=null===o||void 0===o?void 0:o.value)&&void 0!==n?n:null,t.displayText=(null===o||void 0===o?void 0:o.label)||"";break;case"filter":case"multi":t.displayTextArr=t.options.filter((function(e){return e.selected})),t.value=t.displayTextArr.map((function(e){return e.value}));break}}}))}},{key:"mounted",value:function(){var e=this;this.defaultData.forEach((function(t){return e.addSelectedOption(t)}))}},{key:"addSelectedOption",value:function(e){var t=this,n=this.newOptions.find((function(t){return t.key===e.key}));if(n){this.addNewOption(n,!1);var r=this.data.find((function(t){return t.key===e.key}));switch(r.detail.filterType){case"single":var o=r.options.find((function(t){return e.value===t.value}));o&&this.selectSingle(r,o,!1);break;case"filter":case"multi":e.value.forEach((function(e){var n=r.options.find((function(t){return e===t.value}));n&&t.selectMulti(r,n,!1)}));break;case"textarea":case"input":r.tempValue=e.value,this.selectInput(r,!1);break;case"duration":r.tempValue=e.value,this.selectDuration(r,!1);break;case"range":r.tempValue=e.value,this.selectRange(r,!1);break}}}},{key:"addNewOption",value:function(){var e=mt(Re.a.mark((function e(t){var n,r,o,i,a,c,s=arguments;return Re.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=!(s.length>1&&void 0!==s[1])||s[1],!t.filterDisabled&&!this.data.some((function(e){return e.key===t.key}))){e.next=3;break}return e.abrupt("return");case 3:r={detail:t,key:t.key,value:null,tempValue:{},visible:!1,options:null,searchText:"",displayText:""},e.t0=t.filterType,e.next="single"===e.t0?7:"filter"===e.t0?11:"multi"===e.t0?12:"textarea"===e.t0||"input"===e.t0?16:"duration"===e.t0?18:"range"===e.t0?20:22;break;case 7:return o=this.optionDetail[t.key],r.options=Object(Ie["a"])(o),r.value=null,e.abrupt("break",22);case 11:r.searchText="";case 12:return i=this.optionDetail[t.key],r.options=Object(Ie["a"])(i),r.value=[],e.abrupt("break",22);case 16:return r.tempValue="",e.abrupt("break",22);case 18:return r.tempValue=[],e.abrupt("break",22);case 20:return r.tempValue={verb:{},value1:null,value2:null},e.abrupt("break",22);case 22:if(this.$set(t,"filterDisabled",!0),this.data.push(r),!n){e.next=31;break}return e.next=27,this.$nextTick();case 27:a=this.$el.querySelectorAll(".ss-tag-text"),c=a[a.length-1],c.click&&c.click(),r.visible=!0;case 31:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"selectSingle",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e.value=t.value,e.displayText=t.label,e.visible=!1,t.selected=!0,n&&this.$emit("change",{type:"change",key:e.key})}},{key:"selectMulti",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.$set(t,"selected",!t.selected);var r=e.options.filter((function(e){return e.selected}));e.value=r.map((function(e){return e.value})),e.displayTextArr=r,n&&this.$emit("change",{type:"change",key:e.key})}},{key:"selectDuration",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.visible=!1;var n=i["default"].filter("formatDate");e.tempValue?(e.displayText=e.tempValue.map((function(e){return n(e).replace(" 00:00:00","")})).join(" 至 "),e.value=e.tempValue.map((function(e){return+e}))):(e.displayText="",e.value=[]),t&&this.$emit("change",{type:"change",key:e.key})}},{key:"selectInput",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.value=e.tempValue,e.visible=!1,t&&this.$emit("change",{type:"change",key:e.key})}},{key:"selectRange",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.value=e.tempValue;if("<=>"===n.verb){if(n.value1>n.value2){var r=[n.value2,n.value1];n.value1=r[0],n.value2=r[1]}e.displayText="".concat(n.value1," 至 ").concat(n.value2)}else e.displayText="".concat(this.operators.find((function(e){return e.key===n.verb.key})).label," ").concat(n.value1);e.visible=!1,t&&this.$emit("change",{type:"change",key:e.key})}},{key:"remove",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.data.splice(this.data.indexOf(e),1),e.detail.filterDisabled=!1,t&&this.$emit("change",{type:"remove",key:e.key})}},{key:"removeAll",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.data.length&&(this.data.filter((function(e){return!e.detail.hideClose})).forEach((function(t){return e.remove(t,!1)})),t&&this.$emit("change",{type:"clear"}))}},{key:"showPopover",value:function(e){this.hidePopover(),e.visible=!0}},{key:"hidePopover",value:function(){this.data.forEach((function(e){return e.visible=!1}))}},{key:"callMethod",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n["return"]||n["return"]()}finally{if(c)throw i}}}}function yo(e,t){if(e){if("string"===typeof e)return mo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mo(e,t):void 0}}function mo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),o=1;oi?(this.btnStyle.left=0,c=!0):this.btnStyle.left=(i-n)/o,rthis.btnStyle.right*this.boxWidth)this.type="right";else{var n=this.boxWidth+this.btnStyle.width;t>=n&&(t=n),this.btnStyle.left=t/this.boxWidth}else t=this.boxWidth&&(t=this.boxWidth),this.btnStyle.right=t/this.boxWidth);this.updateSelectedWidth()}},{key:"drag",value:function(e){this.moveX=e.pageX-this.btnStyle.left*this.boxWidth,addEventListener("mousemove",this.dragMove),addEventListener("mouseup",this.removeEventListener)}},{key:"dragMove",value:function(e){var t=e.pageX-this.moveX;t<=0&&(t=0);var n=this.boxWidth-(this.selectedWidth*this.boxWidth+this.btnStyle.width);t>=n&&(t=n),this.btnStyle.left=t/this.boxWidth,this.btnStyle.right=this.btnStyle.left+this.selectedWidth+this.btnStyle.width/this.boxWidth}},{key:"updateMinWindow",value:function(){var e=Ci(Re.a.mark((function e(t){return Re.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.$emit("update:minWindow",t),e.next=3,this.$nextTick();case 3:this.updateAggWindow();case 4:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"updateMinWindowUnit",value:function(){var e=Ci(Re.a.mark((function e(){var t,n=arguments;return Re.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:"s",this.$emit("update:minWindowUnit",t),e.next=4,this.$nextTick();case 4:this.updateAggWindow();case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"updateAggWindow",value:function(){if(this.minWindow){var e=+new Date(this.value[0]),t=+new Date(this.value[1]),n=this.minWindow;if(t-e>1e3*this.count){var r={d:60*this.minWindow*60*24,h:60*this.minWindow*60,m:60*this.minWindow,s:this.minWindow}[this.minWindowUnit],o=Math.ceil((t-e)/(1e3*this.count));n=Math.floor(o/r)*r||r}this.aggWindow=n,this.$emit("aggWindowChange",n)}}}]),n}(s["e"]);Object(c["a"])([Object(s["d"])(),Object(c["b"])("design:type","function"===typeof(gi="undefined"!==typeof ki&&ki)?gi:Object)],$i.prototype,"Chart",void 0),Object(c["a"])([Object(s["d"])(),Object(c["b"])("design:type","function"===typeof(Oi="undefined"!==typeof HTMLDivElement&&HTMLDivElement)?Oi:Object)],$i.prototype,"ContentBox",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Array)],$i.prototype,"value",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Array)],$i.prototype,"dateRange",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Boolean)],$i.prototype,"disabledMinWindow",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Number)],$i.prototype,"minWindow",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",String)],$i.prototype,"minWindowUnit",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type","function"===typeof(ji="undefined"!==typeof Record&&Record)?ji:Object)],$i.prototype,"chartOption",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",String)],$i.prototype,"chartTheme",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Object)],$i.prototype,"styleObj",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Object)],$i.prototype,"showAggInfo",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Object)],$i.prototype,"count",void 0),Object(c["a"])([s["b"],Object(c["b"])("design:type","function"===typeof(wi="undefined"!==typeof oi["default"]&&oi["default"])?wi:Object)],$i.prototype,"ro",void 0),Object(c["a"])([s["b"],Object(c["b"])("design:type",Object)],$i.prototype,"timeUnit",void 0),Object(c["a"])([Object(s["f"])("dateRange"),Object(s["f"])("value"),Object(c["b"])("design:type",Function),Object(c["b"])("design:paramtypes",[Object,Object]),Object(c["b"])("design:returntype",void 0)],$i.prototype,"init",null),$i=Object(c["a"])([Object(s["a"])()],$i);var Li=$i,Wi=Li,zi=(n("77ce"),Object(D["a"])(Wi,ni,ri,!1,null,"4aab67d1",null)),Bi=zi.exports,Vi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"v-collapse"},[n("div",{staticClass:"title",class:e.options.class,style:e.options.style},[n("a",{staticClass:"pointer",on:{click:function(t){e.show=!e.show,e.$emit("input",e.show)}}},[e._t("title",[e._v(e._s(e.title||e.options.title))]),n("i",{class:"el-icon-arrow-"+(e.show?"up":"down")})],2)]),n("el-collapse-transition",[n("div",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}]},[e._t("default")],2)])],1)},Ui=[];function Hi(e){return Hi="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hi(e)}function Fi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qi(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:3e3;this.setPercent(0),clearInterval(this.timer),this.timer=setInterval((function(){e.increase(1e4/t*Math.random())}),100)}},{key:"setPercent",value:function(e){this.show=!0,this.canSuccess=!0,this.percent=e}},{key:"increase",value:function(e){this.percent=Math.min(99,this.percent+e)}},{key:"decrease",value:function(e){this.percent=Math.max(0,this.percent-e)}},{key:"hide",value:function(){var e=this;this.pause(),setTimeout((function(){e.show=!1}),this.transition.termination)}},{key:"pause",value:function(){clearInterval(this.timer),this.timer=null}},{key:"finish",value:function(){this.percent=100,this.hide()}},{key:"fail",value:function(){this.canSuccess=!1}},{key:"isRunning",value:function(){return!!this.timer}},{key:"style",get:function(){return{zIndex:"999999",color:this.canSuccess?this.color:this.failedColor,backgroundColor:"currentColor",opacity:this.show?"1":"0",position:"fixed",top:"0",left:"0",width:this.percent+"%",height:this.thickness,borderRadius:"0 999px 999px 0",transition:(this.show?"width ".concat(this.transition.speed,", "):"")+"opacity ".concat(this.transition.opacity," linear"),contain:"layout size"}}},{key:"pegStyle",get:function(){return{borderRadius:"100%",boxShadow:"currentColor 1px 0 6px 1px",height:"100%",opacity:".45",position:"absolute",right:"0",top:"0",width:"70px"}}},{key:"render",value:function(e){return e("div",{style:this.style},[this.noPeg?null:e("i",{style:this.pegStyle})])}}]),n}(s["e"]);function Cc(e,t){return Rc(e)||Ec(e,t)||Pc(e,t)||xc()}function xc(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Pc(e,t){if(e){if("string"===typeof e)return Tc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tc(e,t):void 0}}function Tc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n-o.moment)throw new TypeError("开始时间在结束时间之后");if(o.number)throw new TypeError("不支持的结束时间(目前只支持结束时间为当前时间)");this.display={type:this.relativeTimes.includes(r.value)?"fast":"relative",value:r.value,number:r.number,unit:r.unit,moment:+Nc.a.duration(r.moment)}}else{if("absolute"!==r.type||"absolute"!==o.type)throw new TypeError("不支持的时间段类型");if(r.value>=o.value)throw new TypeError("开始时间在结束时间之后");this.display={type:"absolute",start:r.value,end:o.value}}}}},{key:"created",value:function(){var e=this.localKey;if(e){var t=this.readLocal();if(t){var n=t.refreshDuration,r=t.timeRange;this.$emit("update:refreshDuration",n),r&&this.$emit("input",r),n&&this.setRefresh(n)}else this.refreshDuration&&this.setRefresh(this.refreshDuration)}}},{key:"setLocal",value:function(e){var t=this.localKey;if(t){var n=this.readLocal();localStorage.setItem(t,JSON.stringify(zc(zc({},n),e)))}}},{key:"readLocal",value:function(){var e=this.localKey;if(e)try{var t=JSON.parse(localStorage.getItem(e));if("object"===Lc(t))return t}catch(n){return null}}},{key:"destroyed",value:function(){clearInterval(this.refreshPromise)}},{key:"setRefresh",value:function(e){var t=this;if(clearInterval(this.refreshPromise),e){var n=+Object($c["e"])(e);this.$emit("update:refreshDuration",e),this.setLocal({refreshDuration:e}),this.refreshPromise=setInterval((function(e){t.$emit("on-refresh",e)}),n)}else this.$emit("update:refreshDuration",null),this.setLocal({refreshDuration:null})}},{key:"setRelative",value:function(e){this.$emit("input",["now-"+e,"now"]),this.setLocal({timeRange:["now-"+e,"now"]})}},{key:"initRelative",value:function(){switch(this.now=os(),this.display.type){case"fast":case"relative":this.defaultValue=this.display.number;break;case"absolute":var e=Nc.a.duration(this.display.end-this.display.start),t=["y","M","d","h","m","s","ms"].find((function(t){return e.get(t)}));this.defaultValue=e.get(t),this.setRelative(this.defaultValue+t);break}this.relativeValue=this.defaultValue}},{key:"setAbsolute",value:function(){var e=this.absoluteValue.map((function(e){return+new Date(e)}));this.$emit("input",e),this.setLocal({timeRange:e})}},{key:"initAbsolute",value:function(){switch(this.now=os(),this.display.type){case"fast":case"relative":this.absoluteValue=[os(+this.now-this.display.moment),os(this.now)],this.setAbsolute();break;case"absolute":this.absoluteValue=[os(this.display.start),os(this.display.end)];break}}},{key:"switchTab",value:function(e){switch(e.name){case"fast":case"relative":this.initRelative();break;case"absolute":this.initAbsolute();break}}}]),n}(s["e"]);Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Boolean)],as.prototype,"hideRefresh",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Array)],as.prototype,"value",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",String)],as.prototype,"refreshDuration",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",String)],as.prototype,"localKey",void 0),Object(c["a"])([Object(s["f"])("value",{immediate:!0}),Object(c["b"])("design:type",Function),Object(c["b"])("design:paramtypes",[Array]),Object(c["b"])("design:returntype",void 0)],as.prototype,"valueChange",null),as=Object(c["a"])([Object(s["a"])({filters:{duration:function(e){if(null!=e)return is(e)},timefilterDuration:function(e){if(null!=e)return e.includes("/")?is(e)+"迄今":"最近 "+is(e)},timeUnit:function(e){return Dc["f"][e]}}})],as);var cs=as,ss=cs,ls=(n("1cee"),Object(D["a"])(ss,Ic,Ac,!1,null,null,null)),us=ls.exports,fs=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{staticClass:"breadcrum mb-10 flex-vcenter flex-between plr-10"},[n("el-breadcrumb",{attrs:{"separator-class":"el-icon-arrow-right"}},[n("el-breadcrumb-item",[n("router-link",{attrs:{to:"/"}},[n("i",{staticClass:"fa fa-home"})])],1),e._l(e.data,(function(t,r){return n("el-breadcrumb-item",{key:r,class:{active:r===e.data.length-1}},[e._v(e._s(1!==r?e.$t("common."+t):t))])}))],2),n("div",{staticClass:"slot"},[e._t("default")],2)],1)},ps=[],ds={name:"Breadcrumb",props:{data:{type:Array,default:[]}},data:function(){return{}},mounted:function(){}},bs=ds,hs=(n("8835"),Object(D["a"])(bs,fs,ps,!1,null,"6426b88b",null)),ys=hs.exports,ms=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("main",{staticClass:"settings"},[n("breadcrumb",{attrs:{data:e.breadcrumbInfo}}),n("section",{staticClass:"container"},e._l(e.chartMetrics,(function(t,r){return n("div",{key:t.title},[n("div",{staticClass:"title flex flex-vcenter flex-between"},[n("span",{staticClass:"fs-18 font-bold mtb-20"},[e._v(e._s(e.$t("ClickHouseEcharts."+t.title)))]),0===r?n("time-filter",{attrs:{localKey:"overviewBaseTimeFilter",refreshDuration:e.refresh},on:{"update:refreshDuration":function(t){e.refresh=t},"update:refresh-duration":function(t){e.refresh=t},input:e.timeFilterChange,"on-refresh":e.timeFilterRefresh},model:{value:e.timeFilter,callback:function(t){e.timeFilter=t},expression:"timeFilter"}}):e._e()],1),n("ul",{staticClass:"charts flex flex-wrap"},e._l(t.metrics,(function(t,r){return n("li",{key:r,staticClass:"chart-item mb-50"},[n("p",{staticClass:"mtb-10 fs-16 font-bold expect"},[e._v(e._s(e.$t("ClickHouseEcharts."+t.expect)))]),t.option?n("vue-echarts",{ref:"Charts",refInFor:!0,attrs:{option:t.option},nativeOn:{mousemove:function(t){return e.mousemove("series",t)}}}):e._e()],1)})),0)])})),0)],1)},vs=[],gs=n("a474");function Os(e,t){return Ss(e)||_s(e,t)||ws(e,t)||js()}function js(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ws(e,t){if(e){if("string"===typeof e)return ks(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ks(e,t):void 0}}function ks(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n")+Object.entries(Object(gs["a"])(e,"seriesName")).map((function(e){var t=Os(e,2),n=t[0],r=t[1];return"".concat(r[0].marker).concat(n).concat(r.sort((function(e,t){return t.value[1]-e.value[1]})).map((function(e){return": ".concat(e.value[1])})).join("
"))})).join("
")}},legend:{left:"center",type:"scroll",top:-5},dataZoom:[{show:!0,height:25,xAxisIndex:0,bottom:10}],grid:{top:"middle",left:"3%",right:"5.5%",bottom:"3%",height:"80%",containLabel:!0},xAxis:{type:"time",name:"时间",axisLine:{lineStyle:{color:"#999"}},axisTick:{show:!1},min:t,max:n},yAxis:{type:"value",splitLine:{lineStyle:{type:"dashed",color:"#DDD"}},nameTextStyle:{color:"#999"},name:"值"},series:(e||[]).map((function(e){var t=e.metric,n=e.values;return{name:function(){return t.instance?t.device?"".concat(t.instance,"-").concat(t.device):t.gc?"".concat(t.instance,"-").concat(t.gc):"".concat(t.instance):"job:".concat(t.job,"-task:").concat(t.task)}(),data:n.map((function(e){return[1e3*e[0],Number(e[1]).toFixed(2).replace(".00","")]})),type:"line",symbol:"none"}}))}},xs=n("c949");function Ps(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(r,o)}function Ts(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ps(i,r,o,a,c,"next",e)}function c(e){Ps(i,r,o,a,c,"throw",e)}a(void 0)}))}}var Es={props:{breadcrumbInfo:{type:Array,default:[]},metrics:{type:Array,default:[]}},data:function(){return{timeFilter:["now-1h","now"],refresh:null,chartOption:null,chartMetrics:[]}},mounted:function(){this.chartMetrics=(this.metrics||[]).map((function(e){var t=e.title,n=e.metrics;return{title:t,metrics:(n||[]).map((function(e){return e["option"]=null,e}))}})),this.fetchData()},methods:{fetchData:function(){var e=this;this.chartMetrics.forEach((function(t,n){t.metrics.forEach((function(n,r){e.fetchChartData(t.title,n,r)}))}))},fetchChartData:function(e,t,n){var r=this;return Ts(Re.a.mark((function o(){var i,a,c,s,l,u,f;return Re.a.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return i=Object($c["b"])(r.timeFilter),a=i.duration,c=i.min,s=i.max,l=Math.floor(+a/360/1e3),o.next=4,xs["c"].queryRangeMetric(r.$route.params.id,{title:e,metric:t.metric,start:Math.floor(c/1e3),end:Math.floor(s/1e3),step:l});case 4:u=o.sent,f=u.data.entity,r.$set(t,"option",Cs(f,c,s)),r.$nextTick((function(){r.$refs.Charts[n]&&r.$refs.Charts[n].refreshChart();var e=(r.$refs.Charts||[]).map((function(e){return e.chart}));ai.a.connect(e)}));case 8:case"end":return o.stop()}}),o)})))()},mousemove:function(e,t){},timeFilterChange:function(){this.fetchData()},timeFilterRefresh:function(){this.fetchData()}},components:{}},Rs=Es,Is=(n("8a48"),Object(D["a"])(Rs,ms,vs,!1,null,"b3fde702",null)),As=Is.exports,Ms=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("textarea",{ref:"code",staticStyle:{border:"none"},attrs:{name:"code"}})},Ns=[],Ds=n("56b3"),$s=n.n(Ds),Ls=(n("aedd"),n("cbc89"),n("697eb"),n("f9d4"),n("a7be"),n("7ba3"),n("f6b6"),n("ffda"),n("9b74"),n("991c"),n("7289"),n("9a48"),n("db05")),Ws=n("55f8"),zs=n("08ba");function Bs(e){for(var t={},n=e.split(" "),r=0;r!=&|^]/,dateSQL:Bs("now"),support:Bs("binaryNumber hexNumber doubleQuote"),hooks:{}});var Us={name:"SqlCodeMirror",components:{CodeMirror:$s.a},model:{prop:"sql",event:"change"},props:{sql:{type:String},readOnly:{type:Boolean,default:!0}},data:function(){return{code:"",sqlEditor:""}},created:function(){try{this.code=Object(Ls["format"])(this.sql,{language:"mysql",indent:" "})}catch(e){this.code=this.sql}},mounted:function(){var e=this,t=this.sqlEditor=$s.a.fromTextArea(this.$refs.code,{mode:"text/x-clickhouse",theme:"darcula",readOnly:this.readOnly,indentWithTabs:!0,smartIndent:!0,lineNumbers:!0,matchBrackets:!0,keyMap:"sublime",autofocus:!0,hintOptions:{completeSingle:!1}});t.on("keypress",(function(e){t.showHint()})),t.on("change",(function(t){e.$emit("change",Object(Ws["a"])(t.getValue()))})),t.setValue(this.code)},methods:{format:function(){try{var e=this.sql,t=this.sqlEditor;this.code=Object(Ls["format"])(e,{language:"mysql",indent:" "}),t.setValue(this.code)}catch(n){zs["c"].info(this.$t("common.Current Browser Not Support"))}},onOk:function(){}}},Hs=Us,Fs=Object(D["a"])(Hs,Ms,Ns,!1,null,null,null),qs=Fs.exports,Ks=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{ref:"form",staticStyle:{"line-height":"40px"},attrs:{model:e.formData}},[e._l(e.schema,(function(t,r){return n("DFormItem",{key:r,attrs:{schema:t,"origin-name":r,"prop-name":r},model:{value:e.formData,callback:function(t){e.formData=t},expression:"formData"}})})),n("el-form-item",{staticClass:"sticky-bottom"},[e.isShowSubmit?n("el-button",{attrs:{loading:e.loading,type:"primary"},on:{click:e.submit}},[e._v(e._s(e.submitText||e.$t("common.Create")))]):e._e(),e.isShowCancel?n("el-button",{on:{click:e.cancel}},[e._v(e._s(e.cancelText||e.$t("common.Cancel")))]):e._e()],1)],2)},Qs=[],Zs=n("0b0b"),Xs=n("641c"),Gs=n("32e8"),Ys={name:"DForm",components:{DFormItem:Zs["default"]},props:{schema:{type:Object,default:{}},formModel:{type:Object,default:function(){return null}},isShowSubmit:{type:Boolean,default:!0},isShowCancel:{type:Boolean,default:!0},submitText:{type:String,default:""},cancelText:{type:String,default:""},loading:Boolean},data:function(){return{formData:{}}},created:function(){var e=this.formModel,t=this.schema,n=this.formData;this.formData=Object(Xs["b"])(e,t,n)},methods:{submit:function(){var e=this,t=this.$refs.form;t.clearValidate();try{t.validate((function(n){if(!n){var r=t.fields.filter((function(e){return"error"===e.validateState})),o=t.fields.find((function(e){return"error"===e.validateState}));r.forEach((function(e){e.isSlideUp=!0;var t=e;do{var n=t.$parent;t=n,-1!==t.$el.className.indexOf("el-form-item")&&(t.isSlideUp=!0)}while("FORM"!==t.$el.nodeName)}));var i=0;if(o){o.isSlideUp=!0;var a=o;do{var c=a.$parent;a=c,a.collapse&&!Object(Gs["a"])(a.collapse.activeNames,[a.name])&&(a.collapse.activeNames=[a.name],i+=1),-1!==a.$el.className.indexOf("el-form-item")&&(a.isSlideUp=!0)}while("FORM"!==a.$el.nodeName);setTimeout((function(){o.$el.scrollIntoView()}),300*i)}return!1}var s=e.schema,l=e.formData,u=Object(Xs["c"])(Object(Ie["a"])(l),s);e.$emit("submit",u)}))}catch(n){console.log(n)}},cancel:function(){this.$router.go(-1)}}},Js=Ys,el=(n("22a0"),Object(D["a"])(Js,Ks,Qs,!1,null,null,null)),tl=el.exports;function nl(e,t){return cl(e)||al(e,t)||ol(e,t)||rl()}function rl(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ol(e,t){if(e){if("string"===typeof e)return il(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?il(e,t):void 0}}function il(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd HH:mm:ss";return null==e||""===e?"-":Object(p["a"])("string"===typeof e?new Date(e):e,t)},formatTime:function(e){return null==e?"-":new Date(e).toISOString().slice(11,-5)},percent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(100*e).toFixed(t)+"%"},trueFalse:function(e){return e?"真":"假"},yesNo:function(e){return e?"是":"否"}};Object.entries(g).forEach((function(e){var t=d(e,2),n=t[0],r=t[1];return o["default"].filter(n,r)}));var O=n("84c3"),j=n.n(O);O["Select"].props.optionMaxWidth["default"]="800px";var w=n("bc3a"),k=n.n(w),_=(n("3503"),n("8c4f")),S=n("2a95");Object.assign(S["default"].messages,{default:function(){return"字段验证错误,请检查"},required:function(){return"必填字段"},enum:function(e,t){return"必须是 ".concat(t," 其中之一")},whitespace:function(){return"该字段不能为空"},date:{format:function(){return"非法的日期格式"},parse:function(){return"非法的日期格式"},invalid:function(){return"非法的日期格式"}},types:{string:function(){return"必须是一个字符串"},method:function(){return"必须是一个方法 (函数)"},array:function(){return"必须是一个数组"},object:function(){return"必须是一个对象"},number:function(){return"必须是一个数字"},date:function(){return"必须是一个日期"},boolean:function(){return"必须是一个布尔值"},integer:function(){return"必须是一个整数"},float:function(){return"必须是一个浮点数"},regexp:function(){return"必须是一个合法的正则表达式"},email:function(){return"必须是一个合法的 Email 地址"},url:function(){return"必须是一个合法的 URL"},hex:function(){return"必须是一个合法的 16 进制数"}},string:{len:function(e,t){return"必须是 ".concat(t," 个字符长度")},min:function(e,t){return"必须至少是 ".concat(t," 个字符长度")},max:function(e,t){return"不能超过 ".concat(t," 个字符长度")},range:function(e,t,n){return"必须在 ".concat(t," 和 ").concat(n," 个字符长度之间")}},number:{len:function(e,t){return"必须等于 ".concat(t)},min:function(e,t){return"不能小于 ".concat(t)},max:function(e,t){return"不能大于 ".concat(t)},range:function(e,t,n){return"必须在 ".concat(t," 和 ").concat(n," 之间")}},array:{len:function(e,t){return"必须包含 ".concat(t," 个元素")},min:function(e,t){return"必须至少包含 ".concat(t," 个元素")},max:function(e,t){return"至多包含 ".concat(t," 个元素")},range:function(e,t,n){return"长度必须在 ".concat(t," 和 ").concat(n," 之间")}},pattern:{mismatch:function(e,t,n){return"必须匹配 ".concat(n," 规则")}}}),O["Link"].props.underline["default"]=!1,O["InputNumber"].props.controlsPosition["default"]="right",O["InputNumber"].props.max["default"]=Number.MAX_SAFE_INTEGER,O["InputNumber"].props.min["default"]=Number.MIN_SAFE_INTEGER,O["Slider"].props.inputControlsPosition["default"]="right",O["Dropdown"].props.trigger["default"]="click",O["MessageBox"].setDefaults({closeOnClickModal:!1});var C=n("08ba"),x=n("8c10");function P(e,t){return R(e)||E(e,t)||A(e,t)||T()}function T(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function E(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(i.push(r.value),t&&i.length===t)break}catch(s){c=!0,o=s}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw o}}return i}}function R(e){if(Array.isArray(e))return e}function I(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=A(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n["return"]||n["return"]()}finally{if(c)throw i}}}}function A(e,t){if(e){if("string"===typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&C["e"].tooltips.splice(n,1)}});var U=function(){var e=document.createElement("style");e.innerHTML=":focus-within{}",document.head.appendChild(e);var t=!!e.sheet.cssRules.length;return document.head.removeChild(e),t}();if(U)document.documentElement.classList.add("native-focus-within"),o["default"].directive("focusWithinPolyfill",{});else{document.documentElement.classList.add("polyfilled-focus-within");var H="onfocusin"in document;o["default"].directive("focusWithinPolyfill",{bind:function(e,t){var n=t.value,r=void 0===n?"focus-within":n,o=function(){var t=0,n=!1;return function(o){t+=o,n||(n=!0,requestAnimationFrame((function(){n=!1,t?e.classList.add(r):e.classList.remove(r)})))}}(),i=e.handleFocusEvent=function(){return o(1)},a=e.handleBlurEvent=function(){return o(-1)};H?(e.addEventListener("focusin",i),e.addEventListener("focusout",a)):(e.addEventListener("focus",i,!0),e.addEventListener("blur",a,!0))},unbind:function(e){var t=e.handleFocusEvent,n=e.handleBlurEvent;H?(e.removeEventListener("focusin",t,!0),e.removeEventListener("focusout",n,!0)):(e.removeEventListener("focus",t,!0),e.removeEventListener("blur",n,!0))}})}var F=n("129c"),q=n("a388"),K=n.n(q),Q=(n("778e"),n("3133")),Z=n.n(Q);function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function G(e){for(var t=1;t100&&n.pop(),n.unshift(t)},deleteHistory:function(e,t){var n=t.clusterName,r=t.checksum,o=e.history.findIndex((function(e){return e.Cluster===n&&e.CheckSum===r}));-1!==o&&e.history.splice(o,1)},setHistory:function(e,t){e.history=Object(c["a"])(t)},setStatus:function(e,t){e.status=t},clear:function(e){e.result=[],e.pagination={pageSize:100,total:0,currentPage:1}}},actions:{retrieveHistory:function(e,t){return u(a.a.mark((function n(){var r,o,i;return a.a.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=e.commit,n.next=3,s["f"].getHistory(t);case 3:o=n.sent,i=o.data.entity,r("setHistory",i);case 6:case"end":return n.stop()}}),n)})))()},deleteHistory:function(e,t){return u(a.a.mark((function n(){var r;return a.a.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=e.commit,n.next=3,s["f"].deleteHistory(t);case 3:n.sent,r("deleteHistory",t);case 5:case"end":return n.stop()}}),n)})))()}},getters:{getResultColumn:function(e){var t=e.result;return 0===t.length?[]:t[0].map((function(e){return{label:e,prop:e}}))},getResultData:function(e){var t=e.result;if(t.length<=1)return[];var n=[],r=t[0];return t.forEach((function(e,t){if(t>0){var o={};r.forEach((function(t,n){o[t]=e[n]})),n.push(o)}})),n}}};r["default"].use(o["a"]);var p=new o["a"].Store({});p.registerModule("sqlSelect",f);t["a"]=p},4668:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));n("8e9f");n("a34a");function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;r(this,e),this.itemsPerPage=t,this.currentPage=null,this.totalItems=0}return i(e,[{key:"toApiParams",value:function(){var e=(this.currentPage||1)-1,t=this.itemsPerPage||10;return{page:e,from:e*t,size:t}}},{key:"filterData",value:function(e){var t=this.toApiParams(),n=t.from,r=t.size;return e.slice(n,n+r)}}]),e}();n("70f2");var c=null;function s(e,t){return e?(c=c||document.createElement("canvas").getContext("2d"),c.font=t,c.measureText(e).width):0}},4678:function(e,t,n){var r={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn-bd":"9686","./bn-bd.js":"9686","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-in":"ec2e","./en-in.js":"ec2e","./en-nz":"6f50","./en-nz.js":"6f50","./en-sg":"b7e9","./en-sg.js":"b7e9","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-mx":"b5b7","./es-mx.js":"b5b7","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fil":"d69a","./fil.js":"d69a","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-deva":"aaf2","./gom-deva.js":"aaf2","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./oc-lnc":"167b","./oc-lnc.js":"167b","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tk":"5aff","./tk.js":"5aff","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-mo":"3a6c","./zh-mo.js":"3a6c","./zh-tw":"90ea","./zh-tw.js":"90ea"};function o(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id="4678"},"49c5":function(e,t,n){},5133:function(e,t,n){"use strict";var r=n("e1ae"),o=n.n(r);o.a},"539c":function(e,t,n){},"5d5c":function(e,t,n){},"62ec":function(e,t,n){},"641c":function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return d}));var r=n("ec41"),o=n("32e8");function i(e,t){return u(e)||l(e,t)||c(e,t)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(e,t){if(e){if("string"===typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:"",t=r.loading;t.status++,t.text=e},decrease:function(){setTimeout((function(){return r.loading.status--}))}};function a(e){r=e}function c(e,t){var n=e.component,r=e.data,o=void 0===r?{}:r,i=e.props,a=void 0===i?{}:i;if(!n)throw new TypeError("Field component is required");void 0===a.cancelText&&(a.cancelText="取消"),void 0===a.okText&&(a.okText=null===a.cancelText?"关闭":"确定");var c={childComponent:n,data:o,props:a,resolve:null};return new Promise((function(e){c.resolve=e,t.push(c)}))["finally"]((function(){t.splice(t.indexOf(c),1)}))}function s(e){return"number"===typeof e.props.width&&(e.props.width=e.props.width+"px"),c(e,r.modals)}var l=n("bc3a"),u=n.n(l);function f(e){return f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}var p={info:function(e){return o["Message"].info(e)},success:function(e){return o["Message"].success(e)},warning:function(e){return o["Message"].warning(e)},error:function(e){return o["Message"].error(e)},fuck:function(e){if(u.a.isCancel(e))return console.info("Request canceled: ",e.message.url);if("cancel"===e)return console.info("User canceled");if(console.error(e),null==e)return o["Message"].error("未知错误,请联系管理员");if(e instanceof Error)return o["Message"].error(e.message);if("object"!==f(e))return o["Message"].error(e+"");if(e.data||e.response&&e.response.data){var t=e.data||e.response.data;return o["Message"].error(t.detail||t.error||t.message||t.retMsg||JSON.stringify(t))}return o["Message"].error(e.detail||e.error||e.message||e.retMsg||JSON.stringify(e))}},d={};["start","setPercent","increase","decrease","hide","pause","finish","fail","isRunning"].forEach((function(e){d[e]=function(){var t;r&&r.$refs&&(t=r.$refs.progressbar)[e].apply(t,arguments)}}))},"8e9f":function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));var r=getComputedStyle(document.documentElement).getPropertyValue("--primary-color").trim(),o=Object.freeze({serviceName:null,name:"ckman-fe",displayName:"ClickHouse Management Console",environment:"prod",version:null,commitsSinceRelease:null,compileTime:1659694716305,commitSha:"d8a32323f46bf8a01de5670bc3757eb4907c38a5"});Object.freeze(["Ⅰ","Ⅱ","Ⅲ","Ⅳ","Ⅴ","Ⅵ","Ⅶ","Ⅷ","Ⅸ","Ⅹ"])},"8f12":function(e,t,n){"use strict";n.d(t,"f",(function(){return r})),n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"e",(function(){return a})),n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return s}));n("8e9f");var r=Object.freeze({s:"秒",m:"分钟",h:"小时",d:"天",w:"周",M:"月",y:"年"}),o=Object.freeze([{path:"overview",name:"Overview"},{path:"manage",name:"Manage"},{path:"tables",name:"Tables"},{path:"session",name:"Session"},{path:"query-execution",name:"Query Execution"},{path:"settings",name:"Settings"}]),i=Object.freeze([{path:"overview",name:"Overview"},{path:"manage",name:"Manage"}]),a=Object.freeze([{title:"ClickHouse Table KPIs",metrics:[{expect:"clickhouse Query",metric:'ClickHouseMetrics_Query{instance=~"{{.hosts}}"}'}]},{title:"ClickHouse Node KPIs",metrics:[{expect:"cpu usage",metric:'100 * (1 - sum(increase(node_cpu_seconds_total{mode="idle",instance=~"{{.hosts}}"}[1m])) by (instance) / sum(increase(node_cpu_seconds_total{instance=~"{{.hosts}}"}[1m])) by (instance))'},{expect:"memory usage",metric:'100 * (1 - (node_memory_MemFree_bytes{instance=~"{{.hosts}}"}+node_memory_Buffers_bytes{instance=~"{{.hosts}}"}+node_memory_Cached_bytes{instance=~"{{.hosts}}"})/node_memory_MemTotal_bytes{instance=~"{{.hosts}}"})'},{expect:"disk usage",metric:'100 * (1 - node_filesystem_avail_bytes{fstype !~"tmpfs",instance=~"{{.hosts}}"} / node_filesystem_size_bytes{fstype !~"tmpfs",instance=~"{{.hosts}}"})'},{expect:"IOPS",metric:'irate(node_disk_writes_completed_total{instance=~"{{.hosts}}"}[1m])+irate(node_disk_reads_completed_total{instance=~"{{.hosts}}"}[1m])'}]},{title:"ZooKeeper KPIs",metrics:[{expect:"znode_count",metric:'znode_count{instance=~"{{.hosts}}"}'},{expect:"leader_uptime",metric:'increase(leader_uptime{instance=~"{{.hosts}}"}[1m])'},{expect:"stale_sessions_expired",metric:'stale_sessions_expired{instance=~"{{.hosts}}"}'},{expect:"jvm_gc_collection_seconds_count",metric:'jvm_gc_collection_seconds_count{instance=~"{{.hosts}}"}'},{expect:"jvm_gc_collection_seconds_sum",metric:'jvm_gc_collection_seconds_sum{instance=~"{{.hosts}}"}'}]}]),c=(Object.freeze([{title:"Clickhouse Sinker KPIs",metrics:[{expect:"rate clickhouse_sinker_consume_msgs_total 1m",metric:"sum(rate(clickhouse_sinker_consume_msgs_total[1m])) by(job,task)"},{expect:"rate clickhouse_sinker_flush_msgs_total 1m",metric:"sum(rate(clickhouse_sinker_flush_msgs_total[1m])) by(job,task)"},{expect:"rate clickhouse_sinker_shard_msgs 1m",metric:"sum(clickhouse_sinker_shard_msgs) by(job,task)"},{expect:"rate clickhouse_sinker_ring_msgs 1m",metric:"sum(clickhouse_sinker_ring_msgs) by(job,task)"},{expect:"rate clickhouse_sinker_parsing_pool_backlog 1m",metric:"sum(clickhouse_sinker_parsing_pool_backlog) by(job,task)"},{expect:"rate clickhouse_sinker_writing_pool_backlog 1m",metric:"sum(clickhouse_sinker_writing_pool_backlog) by(job,task)"}]}]),Object.freeze({start:"start",stop:"stop",destroy:"destroy",rebalance:"rebalance",upgrade:"upgrade"})),s=(Object.freeze(["green","red","yellow"]),Object.freeze(["5020"]))},9339:function(e,t,n){},9824:function(e,t,n){},"9df7":function(e,t,n){"use strict";var r=n("49c5"),o=n.n(r);o.a},a239:function(e,t,n){},a56d:function(e,t,n){"use strict";var r=n("a690"),o=n.n(r);o.a},a690:function(e,t,n){},afbc:function(e,t,n){"use strict";var r=n("1e41"),o=n.n(r);o.a},b44f:function(e,t,n){"use strict";var r=n("f09a"),o=n.n(r);o.a},bba2:function(e,t,n){"use strict";var r=n("3050"),o=n.n(r);o.a},c281:function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"e",(function(){return O})),n.d(t,"f",(function(){return a})),n.d(t,"d",(function(){return P})),n.d(t,"c",(function(){return T})),n.d(t,"a",(function(){return E}));n("4668");var r=n("c1df"),o=n.n(r);function i(e){return i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e){switch(i(e)){case"string":var t=+e;if(!isNaN(t))return{type:"absolute",value:t,moment:o()(t),timestamp:t};var n=/^now(?:-((\d+)([smhdwMy])(?:\/([dwMy]))?))?$/.exec(e);if(n){var r=+n[2]||0,a=n[3]||"d",c=n[4],s=+o.a.duration(r,a),l=new Date(Date.now()-s).setMilliseconds(0);return c&&(l=+o()(l).startOf(c),s=+o.a.duration((new Date).setMilliseconds(0)-l)),{type:"relative",value:n[1]||"0d",number:r,unit:a,moment:s,trunc:c,timestamp:l}}var u=Date.parse(e);if(u)return{type:"absolute",value:u,moment:o()(u),timestamp:u};throw new TypeError("不支持的时间类型");case"number":case"object":return{type:"absolute",value:+e,timestamp:+e};default:throw new TypeError("不支持的时间类型")}}function c(e,t){return p(e)||f(e,t)||l(e,t)||s()}function s(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(e,t){if(e){if("string"===typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.toFixed(2).toString().length&&(e=e.toFixed(2)),e+" "+t[r]}},c949:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return l})),n.d(t,"d",(function(){return f})),n.d(t,"c",(function(){return d})),n.d(t,"f",(function(){return y})),n.d(t,"g",(function(){return v})),n.d(t,"e",(function(){return O})),n.d(t,"h",(function(){return w}));var r=n("bc3a"),o=n.n(r),i="/api/login",a={login:function(e){return o.a.post("".concat(i),e)}},c="/api/v1/ck",s="/api/v1/deploy/ck",l={getCluster:function(){return o.a.get("".concat(c,"/cluster"))},getClusterByName:function(e){return o.a.get("".concat(c,"/cluster/").concat(e))},getClusterConfig:function(e){return o.a.get("".concat(c,"/config/").concat(e))},saveClusterConfig:function(e,t){return o.a.post("".concat(c,"/config/").concat(e),t)},getClusterCreateFormSchema:function(){return o.a.get("/api/v1/ui/schema?type=deploy")},getClusterUpdateFormSchema:function(){return o.a.get("/api/v1/ui/schema?type=config")},importCluster:function(e){return o.a.post("".concat(c,"/cluster"),e)},createCluster:function(e){return o.a.post("".concat(s,"/"),e)},updateCluster:function(e){return o.a.put("".concat(c,"/cluster"),e)},deleteCluster:function(e){return o.a["delete"]("".concat(c,"/cluster/").concat(e))},manageCluster:function(e,t,n){var r=t.clusterName,i=t.packageVersion,a=t.skip,s=t.policy;return i?o.a.put("".concat(c,"/").concat(e,"/").concat(r,"?password=").concat(n||""),{packageVersion:i,skip:a,policy:s}):o.a.put("".concat(c,"/").concat(e,"/").concat(r,"?password=").concat(n||""))},getClusterInfo:function(e){return o.a.get("".concat(c,"/get/").concat(e))},addClusterNode:function(e,t,n){return o.a.post("".concat(c,"/node/").concat(e,"?password=").concat(n||""),t)},deleteClusterNode:function(e,t,n){return o.a["delete"]("".concat(c,"/node/").concat(e,"?password=").concat(n||""),{params:t})},onlineClusterNode:function(e,t,n){return o.a.put("".concat(c,"/node/start/").concat(e,"?ip=").concat(t,"&password=").concat(n||""))},offlineClusterNode:function(e,t,n){return o.a.put("".concat(c,"/node/stop/").concat(e,"?ip=").concat(t,"&password=").concat(n||""))},getNodeLog:function(e){var t=e.clusterName,n=e.ip,r=e.logType,i=e.lines,a=void 0===i?1e3:i,s=e.tail,l=void 0===s||s;return o.a.post("".concat(c,"/node/log/").concat(t,"?ip=").concat(n),{lines:a,logType:r,tail:l})}},u="/api/v1",f={getList:function(e){return o.a.get("".concat(u,"/package?pkgType=").concat(e))},upload:function(e,t){return o.a.post("".concat(u,"/package"),e,t)},deletePackage:function(e){return o.a["delete"]("".concat(u,"/package"),{params:e})},getVersion:function(){return o.a.get("".concat(u,"/version"))}},p="/api/v1/metric",d={querymetric:function(e){return o.a.get("".concat(p,"/query"),{params:e})},queryRangeMetric:function(e,t){return o.a.get("".concat(p,"/query_range/").concat(e),{params:t})}},b=n("d710"),h="/api/v1/ck",y={query:function(e){return o.a.get("".concat(h,"/query/").concat(e.clusterName),{params:e,transformResponse:[function(e){try{return b["a"].parse(e)}catch(t){return JSON.parse(e)}}]})},getTableLists:function(e){return o.a.get("".concat(h,"/table_lists/").concat(e))},queryExplain:function(e){return o.a.get("".concat(h,"/query_explain/").concat(e.clusterName),{params:e})},getHistory:function(e){return o.a.get("".concat(h,"/query_history/").concat(e))},deleteHistory:function(e){var t=e.clusterName,n=e.checksum;return o.a["delete"]("".concat(h,"/query_history/").concat(t,"?checksum=").concat(n))}},m="/api/v1",v={zkStatus:function(e){return o.a.get("".concat(m,"/zk/status/").concat(e))},tableMetrics:function(e){return o.a.get("".concat(m,"/ck/table_metric/").concat(e))},deleteTable:function(e,t){return o.a["delete"]("".concat(m,"/ck/table/").concat(e),{params:t})},viewTableCreateSql:function(e,t){return o.a.get("".concat(m,"/ck/table_schema/").concat(e),{params:t})},replicationStatus:function(e){return o.a.get("".concat(m,"/zk/replicated_table/").concat(e))},getPartitions:function(e,t){return o.a.get("".concat(m,"/ck/partition/").concat(e,"?table=").concat(t))},deletePartition:function(e,t){var n=t.database,r=t.tables,i=t.begin,a=t.end;return o.a.post("".concat(m,"/ck/purge_tables/").concat(e),{database:n,tables:r,begin:i,end:a})}},g="/api/v1/ck",O={open:function(e){return o.a.get("".concat(g,"/open_sessions/").concat(e))},close:function(e,t){return o.a.get("".concat(g,"/slow_sessions/").concat(e),{params:t})},kill:function(e,t){return o.a.put("".concat(g,"/open_sessions/").concat(e),{params:t})}},j="/api/v1/task",w={getLists:function(){return o.a.get("".concat(j,"/lists"))},getRunningLists:function(){return o.a.get("".concat(j,"/running"))},getTaskStatus:function(e){return o.a.get("".concat(j,"/").concat(e))},deleteTask:function(e){return o.a["delete"]("".concat(j,"/").concat(e))},getTaskDetail:function(e){return o.a.get("".concat(j,"/").concat(e))},stopTask:function(e){return o.a.put("".concat(j,"/").concat(e))}}},c9ff:function(e,t,n){},d4ab:function(e,t,n){"use strict";var r=n("642b"),o=n.n(r);o.a},d823:function(e,t,n){"use strict";var r=n("2812"),o=n.n(r);o.a},e1ae:function(e,t,n){},f09a:function(e,t,n){},f896:function(e,t,n){"use strict";var r=n("6b1b"),o=n.n(r);o.a}}); \ No newline at end of file diff --git a/static/dist/js/app.a872de00.js b/static/dist/js/app.a872de00.js deleted file mode 100644 index e331539d..00000000 --- a/static/dist/js/app.a872de00.js +++ /dev/null @@ -1 +0,0 @@ -(function(e){function t(t){for(var r,o,c=t[0],s=t[1],l=t[2],u=0,f=[];u0?[n("el-select",{staticClass:"width-350",attrs:{disabled:"false"===e.schema.editable,size:"medium",placeholder:e.$t("common.Please choose")},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}},e._l(e.getFilterOption(e.schema.candidates),(function(t,r){return n("el-option",{key:r,attrs:{label:t["label_"+e.lang],value:["int","float"].includes(e.schema.type)?Number(t.value):t.value}})})),1)]:["string"===e.schema.type?["text"===e.schema.input_type?n("el-input",{staticClass:"width-350",attrs:{size:"medium",disabled:"false"===e.schema.editable,placeholder:e.$t("common.Please fill out")},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}}):e._e(),"textarea"===e.schema.input_type?n("el-input",{staticClass:"width-350",attrs:{size:"medium",disabled:"false"===e.schema.editable,type:"textarea",placeholder:e.$t("common.Please fill out")},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}}):e._e(),"password"===e.schema.input_type?n("el-input",{staticClass:"width-350",attrs:{size:"medium",disabled:"false"===e.schema.editable,autocomplete:"new-password",placeholder:e.$t("common.Please fill out"),"show-password":""},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}}):e._e()]:e._e(),"bool"===e.schema.type?n("el-switch",{attrs:{disabled:"false"===e.schema.editable,size:"medium"},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}}):e._e(),"int"===e.schema.type?n("el-input-number",{staticClass:"width-350",attrs:{disabled:"false"===e.schema.editable,size:"medium",controls:!1,precision:0,min:e.schema.range&&e.schema.range.min||-1/0,max:e.schema.range&&e.schema.range.max||1/0,step:e.schema.range&&e.schema.range.step||1},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}}):e._e(),"float"===e.schema.type?n("el-input-number",{staticClass:"width-350",attrs:{disabled:"false"===e.schema.editable,size:"medium",controls:!1,precision:e.precision,min:e.schema.range&&e.schema.range.min||-1/0,max:e.schema.range&&e.schema.range.max||1/0,step:e.schema.range&&e.schema.range.step||1},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}}):e._e(),"struct"===e.schema.type?n("struct",{directives:[{name:"show",rawName:"v-show",value:e.isSlideUp,expression:"isSlideUp"}],attrs:{schema:e.schema.struct,"prop-name":""+e.propName},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}}):e._e(),"list-struct"===e.schema.type?n("list-struct",{directives:[{name:"show",rawName:"v-show",value:e.isSlideUp,expression:"isSlideUp"}],ref:"listStructRef",attrs:{schema:e.schema,"prop-name":e.propName,"origin-name":e.originName},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}}):e._e(),"list-string"===e.schema.type?n("list-string",{directives:[{name:"show",rawName:"v-show",value:e.isSlideUp,expression:"isSlideUp"}],ref:"listStringRef",attrs:{schema:e.schema,"prop-name":e.propName},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}}):e._e(),"map"===e.schema.type?n("Map",{directives:[{name:"show",rawName:"v-show",value:e.isSlideUp,expression:"isSlideUp"}],ref:"mapRef",attrs:{schema:e.schema,"prop-name":e.propName},model:{value:e.formModel[e.originName],callback:function(t){e.$set(e.formModel,e.originName,t)},expression:"formModel[originName]"}}):e._e(),e._t("suffix")]],2):e._e()},o=[],i=n("5c8a"),a=n("32e8"),c=n("641c"),s={name:"dFormItem",components:{Struct:function(){return n.e("chunk-2d0c7d23").then(n.bind(null,"51f7"))},ListStruct:function(){return n.e("chunk-753853f4").then(n.bind(null,"1d60"))},ListString:function(){return n.e("chunk-2d0c7310").then(n.bind(null,"5021"))},Map:function(){return n.e("chunk-2d0b9416").then(n.bind(null,"31bd"))}},model:{prop:"formModel",event:"change"},props:{schema:{type:Object,default:function(){return{}}},originName:{type:String,default:""},propName:{type:String,default:""},formModel:{type:Object,default:function(){return{}}},isCascade:{type:Boolean,default:!1}},computed:{lang:function(){return this.$i18n.locale},isShowAddIcon:function(){return["list-struct","list-string","map"].includes(this.schema.type)},isShowCaret:function(){return["list-struct","list-string","map","struct"].includes(this.schema.type)},isComplexType:function(){return["list-struct","list-string","map","struct"].includes(this.schema.type)},isRequired:function(){var e=this.formModel,t=this.schema.required;try{return Object(c["a"])(e,"return ".concat(t,";"))}catch(n){console.warn(e,t,n)}},isVisible:function(){var e=this.formModel,t=this.schema.visiable;try{return Object(c["a"])(e,"return ".concat(t,";"))}catch(n){console.warn(e,t,n)}},className:function(){var e=this.isComplexType,t=this.schema.type,n=this.originName,r=this.isSlideUp,o=this.formModel,i="";return e?(i+="complex-item",!r&&o[n]&&0!==o[n].length||(i+=" hide-content")):i+="normal-item",i+=" "+t,i},precision:function(){var e=this.schema;if(e.range&&e.range.step){var t=e.range.step.toString().split(".");if(t.length>1)return t[1].length}},description:function(){var e=this.schema,t=this.originName,n=this.lang,r=e.type,o=e.range,i=e["default"],a=e.required,c=["".concat(this.$t("common.Field Name"),":").concat(e["label_"+n]||""),"name: ".concat(t||""),"".concat(this.$t("common.Field Type"),":").concat(r||""),"".concat(this.$t("common.Defaults"),":").concat(i||this.$t("common.Null")),"".concat(this.$t("common.Is it required"),":").concat(a?this.$t("common.Yes"):this.$t("common.No")),"".concat(this.$t("common.Description"),":").concat(e["description_"+n]||"")];if(["int","float"].includes(r))if(o){var s=o.min,l=o.max;c.splice(2,0,"".concat(this.$t("common.Ranges"),":[ ").concat(s,", ").concat(l," ]"))}else c.splice(2,0,"".concat(this.$t("common.Ranges"),":").concat(this.$t("common.Null")));return c},rules:function(){var e=this,t=this.isRequired,n=this.schema,r=(this.lang,this.$t,n.range),o=n.regexp,s=n.type,l=(n.struct,[null,"",void 0]);return{trigger:["blur"],validator:function(u,f){if(1==t)switch(s){case"list-string":return 0===f.length?(e.isSlideUp=!0,new Error(e.$t("common.Required"))):(e.errorMessage="",!0);case"struct":var p=Object(c["c"])(Object(i["a"])(f),n);return Object(a["a"])(p,null)?(e.isSlideUp=!0,new Error(e.$t("common.Required"))):(e.errorMessage="",!0);case"list-struct":return 0!==f.length||new Error(e.$t("common.Required"));case"map":var d=Object(c["c"])(Object(i["a"])(f),n);return!Object(a["a"])(d,null)||(e.isSlideUp=!0,new Error(e.$t("common.Required")))}if(t&&l.includes(f))return new Error(e.$t("common.Required"));if(o&&!l.includes(f)&&!new RegExp(o.slice(1,-1)).test(f))return new Error(e.$t("common.Input error, please check the rules and re-enter"));if(!r||l.includes(f))return!0;var b=r.min,h=r.max;return f=h)||new Error(e.$t("common.Please enter a value less than or equal to {max}",{max:h}))}}}},data:function(){return{label:"",isSlideUp:!0,errorMessage:""}},methods:{getFilterOption:function(e){var t=this,n=this.schema.filter;return n?e.filter((function(e){return Object(c["a"])(t.formModel,"return ".concat(n.replace(t.originName,"".concat(e.value)),";"))})):e},addItem:function(){this.isSlideUp=!0;var e=this.schema,t=e.type;"list-struct"!==t?"list-string"!==t?"map"!==t||this.$refs.mapRef.addItem():this.$refs.listStringRef.addItem():this.$refs.listStructRef.addItem()}}},l=s,u=(n("5133"),n("2877")),f=Object(u["a"])(l,r,o,!1,null,"5f7732b8",null);t["default"]=f.exports},"129c":function(e,t,n){"use strict";n.d(t,"e",(function(){return _})),n.d(t,"b",(function(){return C})),n.d(t,"c",(function(){return T})),n.d(t,"d",(function(){return E})),n.d(t,"f",(function(){return I})),n.d(t,"a",(function(){return N}));var r=n("7ee8"),o=(n("98db"),n("2b0e")),i=n("475b"),a=n("84e1"),c=n("70f2");function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:0;if(this.handle&&cancelAnimationFrame(this.handle),"number"!==typeof e)this.$el.textContent=e;else{var r,o=e+"",i=o.indexOf("."),a=i>-1?o.length-i-1:0,c=function o(i){r=r||i,i-r>=500?t.$el.textContent=e+"":(t.$el.textContent=(n+(e-n)*(i-r)/500).toFixed(a),t.handle=requestAnimationFrame(o))};this.handle=requestAnimationFrame(c)}}},{key:"render",value:function(e){return e("span",{class:"font-mono"})}},{key:"mounted",value:function(){this.$el.textContent=this.value}},{key:"beforeDestroy",value:function(){this.handle&&cancelAnimationFrame(this.handle)}}]),n}(s["e"]);Object(c["a"])([Object(s["c"])({type:[Number,String]}),Object(c["b"])("design:type",Object)],O.prototype,"value",void 0),Object(c["a"])([Object(s["f"])("value"),Object(c["b"])("design:type",Function),Object(c["b"])("design:paramtypes",[Object,Object]),Object(c["b"])("design:returntype",void 0)],O.prototype,"valueChange",null),O=Object(c["a"])([Object(s["a"])()],O);var j=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("nav",{style:e.navStyle},[e._t("default")],2),e.customRouterView?e._e():[e.keepAlive?n("keep-alive",[n("router-view",e._b({key:e.viewKey,ref:"view"},"router-view",e.props,!1))],1):n("router-view",e._b({key:e.viewKey,ref:"view"},"router-view",e.props,!1))]],2)},w=[];function k(e){return k="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&C(e,t)}function C(e,t){return C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},C(e,t)}function x(e){var t=E();return function(){var n,r=R(e);if(t){var o=R(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return P(this,n)}}function P(e,t){return!t||"object"!==k(t)&&"function"!==typeof t?T(e):t}function T(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}var I=function(e){S(n,e);var t=x(n);function n(){return _(this,n),t.apply(this,arguments)}return n}(s["e"]);Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Boolean)],I.prototype,"keepAlive",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Object)],I.prototype,"props",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Object)],I.prototype,"navStyle",void 0),Object(c["a"])([Object(s["c"])({type:[String,Number]}),Object(c["b"])("design:type",Object)],I.prototype,"viewKey",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Boolean)],I.prototype,"customRouterView",void 0),I=Object(c["a"])([Object(s["a"])()],I);var A,N=I,M=N,D=(n("6759"),n("2877")),$=Object(D["a"])(M,j,w,!1,null,"36bb0f3f",null),L=$.exports,W=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-drawer",e._b({ref:"modal",class:e.classes,attrs:{"modal-append-to-body":!1,"focus-first":!1,visible:e.visible,"before-close":e.onBeforeClose},on:{"update:visible":function(t){e.visible=t},closed:e.onHidden}},"el-drawer",e.props,!1),[n("div",{staticClass:"sharp-drawer__body"},[n(e.childComponent,e._b({ref:"body",tag:"component",attrs:{modalInstance:this}},"component",e.data,!1))],1),null!==e.props.cancelText||null!==e.props.okText?n("div",{staticClass:"footer"},[null!==e.props.cancelText?n("el-button",{on:{click:e.onCancel}},[e._v(e._s(e.props.cancelText))]):e._e(),null!==e.props.okText?n("el-button",{attrs:{type:"primary",loading:e.loading},on:{click:e.onOk}},[e._v(e._s(e.props.okText))]):e._e()],1):e._e()])},z=[];function B(e){return B="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function U(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1];this.visible=!1,this.resultValue=e,this.isOk=t}},{key:"onHidden",value:function(){this.isOk?this.resolve(this.resultValue):this.resolve(Promise.reject(null==this.resultValue?"cancel":this.resultValue))}},{key:"onOk",value:function(){var e=this,t=this.body.onOk?this.body.onOk(this):this.body;t&&"function"===typeof t.then?(this.loading=!0,Promise.resolve(t).then((function(t){return e.close(t,!0)}))["finally"]((function(){return e.loading=!1}))):(this.close(t),this.isOk=!0)}},{key:"onCancel",value:function(){this.body.onCancel?this.body.onCancel(this):this.close("cancel")}}]),n}(s["e"]);Object(c["a"])([Object(s["d"])(),Object(c["b"])("design:type",Object)],Y.prototype,"body",void 0),Object(c["a"])([Object(s["d"])(),Object(c["b"])("design:type",Object)],Y.prototype,"modal",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type","function"===typeof(A="undefined"!==typeof Record&&Record)?A:Object)],Y.prototype,"props",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Object)],Y.prototype,"data",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Function)],Y.prototype,"resolve",void 0),Object(c["a"])([Object(s["c"])({type:[i["default"],Function,Object]}),Object(c["b"])("design:type",Object)],Y.prototype,"childComponent",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Array)],Y.prototype,"classes",void 0),Y=Object(c["a"])([Object(s["a"])()],Y);var J,ee=Y,te={name:"SharpDrawer",mixins:[ee]},ne=te,re=(n("0724"),Object(D["a"])(ne,W,z,!1,null,"1bd3fe04",null)),oe=re.exports,ie=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dialog",e._b({ref:"modal",class:e.classes,attrs:{"modal-append-to-body":!1,"close-on-click-modal":!1,visible:e.visible,"before-close":e.onBeforeClose},on:{"update:visible":function(t){e.visible=t},closed:e.onHidden}},"el-dialog",e.props,!1),[n(e.childComponent,e._b({ref:"body",tag:"component",attrs:{modalInstance:this}},"component",e.data,!1)),null!==e.props.cancelText||null!==e.props.okText?n("template",{slot:"footer"},[null!==e.props.cancelText?n("el-button",{on:{click:e.onCancel}},[e._v(e._s(e.props.cancelText))]):e._e(),null!==e.props.okText?n("el-button",{attrs:{type:"primary",loading:e.loading},on:{click:e.onOk}},[e._v(e._s(e.props.okText))]):e._e()],1):e._e()],2)},ae=[],ce={name:"SharpModal",mixins:[ee]},se=ce,le=(n("afbc"),Object(D["a"])(se,ie,ae,!1,null,"36d9125e",null)),ue=le.exports,fe=n("4668");function pe(e){return pe="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pe(e)}function de(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function be(e){for(var t=1;t"===e.item.tempValue.verb.key?[n("span",{staticClass:"mlr-10 mt-5"},[e._v("~")]),n("el-input-number",{staticClass:"flex-1",attrs:{size:e.size,"controls-position":"right",min:e.item.tempValue.value1},model:{value:e.item.tempValue.value2,callback:function(t){e.$set(e.item.tempValue,"value2",t)},expression:"item.tempValue.value2"}})]:e._e()],2),n("footer",{staticClass:"text-right mt-10"},[n("el-button",{attrs:{size:"mini"},on:{click:function(t){e.item.visible=!1,e.$refs.popover.doClose()}}},[e._v("取消")]),e._v(" "),n("el-button",{attrs:{size:"mini",type:"primary","html-type":"submit",disabled:e.shouldDisableRange()},on:{click:function(t){e.$emit("call","selectRange",e.item),e.$refs.popover.doClose()}}},[e._v("确定")])],1)])])},ot=[],it={props:{item:Object,size:String,operators:Array},methods:{shouldDisableRange:function(){return null==this.item.tempValue.value1&&("<=>"!==this.item.tempValue.verb||this.item.tempValue.value2>this.item.tempValue.value1)}}},at=it,ct=Object(D["a"])(at,rt,ot,!1,null,null,null),st=ct.exports,lt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dropdown",{attrs:{trigger:"click",placement:"bottom-start"}},[n("a",{staticClass:"ss-tag-text"},[n("i",{staticClass:"el-icon-arrow-down"}),e._v(" "+e._s(e.item.detail.title)),e.item.displayText?n("span",[e._v("("+e._s(e.item.displayText)+")")]):e._e()]),n("el-dropdown-menu",{staticClass:"checkable maxheight-list",attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.item.options,(function(t){return n("el-dropdown-item",{key:t.value,staticClass:"dropdown-item",class:{selected:e.item.value===t.value},nativeOn:{click:function(n){return e.$emit("call","selectSingle",e.item,t)}}},[e._v(e._s(t.label)+" ")])})),1)],1)},ut=[],ft={props:{item:Object,size:String}},pt=ft,dt=Object(D["a"])(pt,lt,ut,!1,null,null,null),bt=dt.exports;function ht(e){return ht="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ht(e)}function yt(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(r,o)}function mt(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){yt(i,r,o,a,c,"next",e)}function c(e){yt(i,r,o,a,c,"throw",e)}a(void 0)}))}}function vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gt(e){for(var t=1;t",label:"区间"},{key:">",label:"大于"},{key:">=",label:"大于等于"},{key:"==",label:"等于"},{key:"!=",label:"不等于"}],e.components=r,e}return kt(n,[{key:"optionDetailChange",value:function(e){this.data.forEach((function(t){var n;if(t.options){var r=new Set(t.options.filter((function(e){return e.selected})).map((function(e){return e.value})));switch(t.options=(e[t.key]||[]).map((function(e){return gt(gt({},e),{},{selected:r.has(e.value)})})),t.detail.filterType){case"single":var o=t.options.find((function(e){return e.selected}));t.value=null!==(n=null===o||void 0===o?void 0:o.value)&&void 0!==n?n:null,t.displayText=(null===o||void 0===o?void 0:o.label)||"";break;case"filter":case"multi":t.displayTextArr=t.options.filter((function(e){return e.selected})),t.value=t.displayTextArr.map((function(e){return e.value}));break}}}))}},{key:"mounted",value:function(){var e=this;this.defaultData.forEach((function(t){return e.addSelectedOption(t)}))}},{key:"addSelectedOption",value:function(e){var t=this,n=this.newOptions.find((function(t){return t.key===e.key}));if(n){this.addNewOption(n,!1);var r=this.data.find((function(t){return t.key===e.key}));switch(r.detail.filterType){case"single":var o=r.options.find((function(t){return e.value===t.value}));o&&this.selectSingle(r,o,!1);break;case"filter":case"multi":e.value.forEach((function(e){var n=r.options.find((function(t){return e===t.value}));n&&t.selectMulti(r,n,!1)}));break;case"textarea":case"input":r.tempValue=e.value,this.selectInput(r,!1);break;case"duration":r.tempValue=e.value,this.selectDuration(r,!1);break;case"range":r.tempValue=e.value,this.selectRange(r,!1);break}}}},{key:"addNewOption",value:function(){var e=mt(Re.a.mark((function e(t){var n,r,o,i,a,c,s=arguments;return Re.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=!(s.length>1&&void 0!==s[1])||s[1],!t.filterDisabled&&!this.data.some((function(e){return e.key===t.key}))){e.next=3;break}return e.abrupt("return");case 3:r={detail:t,key:t.key,value:null,tempValue:{},visible:!1,options:null,searchText:"",displayText:""},e.t0=t.filterType,e.next="single"===e.t0?7:"filter"===e.t0?11:"multi"===e.t0?12:"textarea"===e.t0||"input"===e.t0?16:"duration"===e.t0?18:"range"===e.t0?20:22;break;case 7:return o=this.optionDetail[t.key],r.options=Object(Ie["a"])(o),r.value=null,e.abrupt("break",22);case 11:r.searchText="";case 12:return i=this.optionDetail[t.key],r.options=Object(Ie["a"])(i),r.value=[],e.abrupt("break",22);case 16:return r.tempValue="",e.abrupt("break",22);case 18:return r.tempValue=[],e.abrupt("break",22);case 20:return r.tempValue={verb:{},value1:null,value2:null},e.abrupt("break",22);case 22:if(this.$set(t,"filterDisabled",!0),this.data.push(r),!n){e.next=31;break}return e.next=27,this.$nextTick();case 27:a=this.$el.querySelectorAll(".ss-tag-text"),c=a[a.length-1],c.click&&c.click(),r.visible=!0;case 31:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"selectSingle",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e.value=t.value,e.displayText=t.label,e.visible=!1,t.selected=!0,n&&this.$emit("change",{type:"change",key:e.key})}},{key:"selectMulti",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.$set(t,"selected",!t.selected);var r=e.options.filter((function(e){return e.selected}));e.value=r.map((function(e){return e.value})),e.displayTextArr=r,n&&this.$emit("change",{type:"change",key:e.key})}},{key:"selectDuration",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.visible=!1;var n=i["default"].filter("formatDate");e.tempValue?(e.displayText=e.tempValue.map((function(e){return n(e).replace(" 00:00:00","")})).join(" 至 "),e.value=e.tempValue.map((function(e){return+e}))):(e.displayText="",e.value=[]),t&&this.$emit("change",{type:"change",key:e.key})}},{key:"selectInput",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.value=e.tempValue,e.visible=!1,t&&this.$emit("change",{type:"change",key:e.key})}},{key:"selectRange",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.value=e.tempValue;if("<=>"===n.verb){if(n.value1>n.value2){var r=[n.value2,n.value1];n.value1=r[0],n.value2=r[1]}e.displayText="".concat(n.value1," 至 ").concat(n.value2)}else e.displayText="".concat(this.operators.find((function(e){return e.key===n.verb.key})).label," ").concat(n.value1);e.visible=!1,t&&this.$emit("change",{type:"change",key:e.key})}},{key:"remove",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.data.splice(this.data.indexOf(e),1),e.detail.filterDisabled=!1,t&&this.$emit("change",{type:"remove",key:e.key})}},{key:"removeAll",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.data.length&&(this.data.filter((function(e){return!e.detail.hideClose})).forEach((function(t){return e.remove(t,!1)})),t&&this.$emit("change",{type:"clear"}))}},{key:"showPopover",value:function(e){this.hidePopover(),e.visible=!0}},{key:"hidePopover",value:function(){this.data.forEach((function(e){return e.visible=!1}))}},{key:"callMethod",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n["return"]||n["return"]()}finally{if(c)throw i}}}}function yo(e,t){if(e){if("string"===typeof e)return mo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mo(e,t):void 0}}function mo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),o=1;oi?(this.btnStyle.left=0,c=!0):this.btnStyle.left=(i-n)/o,rthis.btnStyle.right*this.boxWidth)this.type="right";else{var n=this.boxWidth+this.btnStyle.width;t>=n&&(t=n),this.btnStyle.left=t/this.boxWidth}else t=this.boxWidth&&(t=this.boxWidth),this.btnStyle.right=t/this.boxWidth);this.updateSelectedWidth()}},{key:"drag",value:function(e){this.moveX=e.pageX-this.btnStyle.left*this.boxWidth,addEventListener("mousemove",this.dragMove),addEventListener("mouseup",this.removeEventListener)}},{key:"dragMove",value:function(e){var t=e.pageX-this.moveX;t<=0&&(t=0);var n=this.boxWidth-(this.selectedWidth*this.boxWidth+this.btnStyle.width);t>=n&&(t=n),this.btnStyle.left=t/this.boxWidth,this.btnStyle.right=this.btnStyle.left+this.selectedWidth+this.btnStyle.width/this.boxWidth}},{key:"updateMinWindow",value:function(){var e=Ci(Re.a.mark((function e(t){return Re.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.$emit("update:minWindow",t),e.next=3,this.$nextTick();case 3:this.updateAggWindow();case 4:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"updateMinWindowUnit",value:function(){var e=Ci(Re.a.mark((function e(){var t,n=arguments;return Re.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:"s",this.$emit("update:minWindowUnit",t),e.next=4,this.$nextTick();case 4:this.updateAggWindow();case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"updateAggWindow",value:function(){if(this.minWindow){var e=+new Date(this.value[0]),t=+new Date(this.value[1]),n=this.minWindow;if(t-e>1e3*this.count){var r={d:60*this.minWindow*60*24,h:60*this.minWindow*60,m:60*this.minWindow,s:this.minWindow}[this.minWindowUnit],o=Math.ceil((t-e)/(1e3*this.count));n=Math.floor(o/r)*r||r}this.aggWindow=n,this.$emit("aggWindowChange",n)}}}]),n}(s["e"]);Object(c["a"])([Object(s["d"])(),Object(c["b"])("design:type","function"===typeof(gi="undefined"!==typeof ki&&ki)?gi:Object)],$i.prototype,"Chart",void 0),Object(c["a"])([Object(s["d"])(),Object(c["b"])("design:type","function"===typeof(Oi="undefined"!==typeof HTMLDivElement&&HTMLDivElement)?Oi:Object)],$i.prototype,"ContentBox",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Array)],$i.prototype,"value",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Array)],$i.prototype,"dateRange",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Boolean)],$i.prototype,"disabledMinWindow",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Number)],$i.prototype,"minWindow",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",String)],$i.prototype,"minWindowUnit",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type","function"===typeof(ji="undefined"!==typeof Record&&Record)?ji:Object)],$i.prototype,"chartOption",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",String)],$i.prototype,"chartTheme",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Object)],$i.prototype,"styleObj",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Object)],$i.prototype,"showAggInfo",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Object)],$i.prototype,"count",void 0),Object(c["a"])([s["b"],Object(c["b"])("design:type","function"===typeof(wi="undefined"!==typeof oi["default"]&&oi["default"])?wi:Object)],$i.prototype,"ro",void 0),Object(c["a"])([s["b"],Object(c["b"])("design:type",Object)],$i.prototype,"timeUnit",void 0),Object(c["a"])([Object(s["f"])("dateRange"),Object(s["f"])("value"),Object(c["b"])("design:type",Function),Object(c["b"])("design:paramtypes",[Object,Object]),Object(c["b"])("design:returntype",void 0)],$i.prototype,"init",null),$i=Object(c["a"])([Object(s["a"])()],$i);var Li=$i,Wi=Li,zi=(n("77ce"),Object(D["a"])(Wi,ni,ri,!1,null,"4aab67d1",null)),Bi=zi.exports,Ui=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"v-collapse"},[n("div",{staticClass:"title",class:e.options.class,style:e.options.style},[n("a",{staticClass:"pointer",on:{click:function(t){e.show=!e.show,e.$emit("input",e.show)}}},[e._t("title",[e._v(e._s(e.title||e.options.title))]),n("i",{class:"el-icon-arrow-"+(e.show?"up":"down")})],2)]),n("el-collapse-transition",[n("div",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}]},[e._t("default")],2)])],1)},Vi=[];function Hi(e){return Hi="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hi(e)}function Fi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qi(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:3e3;this.setPercent(0),clearInterval(this.timer),this.timer=setInterval((function(){e.increase(1e4/t*Math.random())}),100)}},{key:"setPercent",value:function(e){this.show=!0,this.canSuccess=!0,this.percent=e}},{key:"increase",value:function(e){this.percent=Math.min(99,this.percent+e)}},{key:"decrease",value:function(e){this.percent=Math.max(0,this.percent-e)}},{key:"hide",value:function(){var e=this;this.pause(),setTimeout((function(){e.show=!1}),this.transition.termination)}},{key:"pause",value:function(){clearInterval(this.timer),this.timer=null}},{key:"finish",value:function(){this.percent=100,this.hide()}},{key:"fail",value:function(){this.canSuccess=!1}},{key:"isRunning",value:function(){return!!this.timer}},{key:"style",get:function(){return{zIndex:"999999",color:this.canSuccess?this.color:this.failedColor,backgroundColor:"currentColor",opacity:this.show?"1":"0",position:"fixed",top:"0",left:"0",width:this.percent+"%",height:this.thickness,borderRadius:"0 999px 999px 0",transition:(this.show?"width ".concat(this.transition.speed,", "):"")+"opacity ".concat(this.transition.opacity," linear"),contain:"layout size"}}},{key:"pegStyle",get:function(){return{borderRadius:"100%",boxShadow:"currentColor 1px 0 6px 1px",height:"100%",opacity:".45",position:"absolute",right:"0",top:"0",width:"70px"}}},{key:"render",value:function(e){return e("div",{style:this.style},[this.noPeg?null:e("i",{style:this.pegStyle})])}}]),n}(s["e"]);function Cc(e,t){return Rc(e)||Ec(e,t)||Pc(e,t)||xc()}function xc(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Pc(e,t){if(e){if("string"===typeof e)return Tc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tc(e,t):void 0}}function Tc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n-o.moment)throw new TypeError("开始时间在结束时间之后");if(o.number)throw new TypeError("不支持的结束时间(目前只支持结束时间为当前时间)");this.display={type:this.relativeTimes.includes(r.value)?"fast":"relative",value:r.value,number:r.number,unit:r.unit,moment:+Mc.a.duration(r.moment)}}else{if("absolute"!==r.type||"absolute"!==o.type)throw new TypeError("不支持的时间段类型");if(r.value>=o.value)throw new TypeError("开始时间在结束时间之后");this.display={type:"absolute",start:r.value,end:o.value}}}}},{key:"created",value:function(){var e=this.localKey;if(e){var t=this.readLocal();if(t){var n=t.refreshDuration,r=t.timeRange;this.$emit("update:refreshDuration",n),r&&this.$emit("input",r),n&&this.setRefresh(n)}else this.refreshDuration&&this.setRefresh(this.refreshDuration)}}},{key:"setLocal",value:function(e){var t=this.localKey;if(t){var n=this.readLocal();localStorage.setItem(t,JSON.stringify(zc(zc({},n),e)))}}},{key:"readLocal",value:function(){var e=this.localKey;if(e)try{var t=JSON.parse(localStorage.getItem(e));if("object"===Lc(t))return t}catch(n){return null}}},{key:"destroyed",value:function(){clearInterval(this.refreshPromise)}},{key:"setRefresh",value:function(e){var t=this;if(clearInterval(this.refreshPromise),e){var n=+Object($c["e"])(e);this.$emit("update:refreshDuration",e),this.setLocal({refreshDuration:e}),this.refreshPromise=setInterval((function(e){t.$emit("on-refresh",e)}),n)}else this.$emit("update:refreshDuration",null),this.setLocal({refreshDuration:null})}},{key:"setRelative",value:function(e){this.$emit("input",["now-"+e,"now"]),this.setLocal({timeRange:["now-"+e,"now"]})}},{key:"initRelative",value:function(){switch(this.now=os(),this.display.type){case"fast":case"relative":this.defaultValue=this.display.number;break;case"absolute":var e=Mc.a.duration(this.display.end-this.display.start),t=["y","M","d","h","m","s","ms"].find((function(t){return e.get(t)}));this.defaultValue=e.get(t),this.setRelative(this.defaultValue+t);break}this.relativeValue=this.defaultValue}},{key:"setAbsolute",value:function(){var e=this.absoluteValue.map((function(e){return+new Date(e)}));this.$emit("input",e),this.setLocal({timeRange:e})}},{key:"initAbsolute",value:function(){switch(this.now=os(),this.display.type){case"fast":case"relative":this.absoluteValue=[os(+this.now-this.display.moment),os(this.now)],this.setAbsolute();break;case"absolute":this.absoluteValue=[os(this.display.start),os(this.display.end)];break}}},{key:"switchTab",value:function(e){switch(e.name){case"fast":case"relative":this.initRelative();break;case"absolute":this.initAbsolute();break}}}]),n}(s["e"]);Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Boolean)],as.prototype,"hideRefresh",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",Array)],as.prototype,"value",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",String)],as.prototype,"refreshDuration",void 0),Object(c["a"])([Object(s["c"])(),Object(c["b"])("design:type",String)],as.prototype,"localKey",void 0),Object(c["a"])([Object(s["f"])("value",{immediate:!0}),Object(c["b"])("design:type",Function),Object(c["b"])("design:paramtypes",[Array]),Object(c["b"])("design:returntype",void 0)],as.prototype,"valueChange",null),as=Object(c["a"])([Object(s["a"])({filters:{duration:function(e){if(null!=e)return is(e)},timefilterDuration:function(e){if(null!=e)return e.includes("/")?is(e)+"迄今":"最近 "+is(e)},timeUnit:function(e){return Dc["f"][e]}}})],as);var cs=as,ss=cs,ls=(n("1cee"),Object(D["a"])(ss,Ic,Ac,!1,null,null,null)),us=ls.exports,fs=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{staticClass:"breadcrum mb-10 flex-vcenter flex-between plr-10"},[n("el-breadcrumb",{attrs:{"separator-class":"el-icon-arrow-right"}},[n("el-breadcrumb-item",[n("router-link",{attrs:{to:"/"}},[n("i",{staticClass:"fa fa-home"})])],1),e._l(e.data,(function(t,r){return n("el-breadcrumb-item",{key:r,class:{active:r===e.data.length-1}},[e._v(e._s(1!==r?e.$t("common."+t):t))])}))],2),n("div",{staticClass:"slot"},[e._t("default")],2)],1)},ps=[],ds={name:"Breadcrumb",props:{data:{type:Array,default:[]}},data:function(){return{}},mounted:function(){}},bs=ds,hs=(n("8835"),Object(D["a"])(bs,fs,ps,!1,null,"6426b88b",null)),ys=hs.exports,ms=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("main",{staticClass:"settings"},[n("breadcrumb",{attrs:{data:e.breadcrumbInfo}}),n("section",{staticClass:"container"},e._l(e.chartMetrics,(function(t,r){return n("div",{key:t.title},[n("div",{staticClass:"title flex flex-vcenter flex-between"},[n("span",{staticClass:"fs-18 font-bold mtb-20"},[e._v(e._s(e.$t("ClickHouseEcharts."+t.title)))]),0===r?n("time-filter",{attrs:{localKey:"overviewBaseTimeFilter",refreshDuration:e.refresh},on:{"update:refreshDuration":function(t){e.refresh=t},"update:refresh-duration":function(t){e.refresh=t},input:e.timeFilterChange,"on-refresh":e.timeFilterRefresh},model:{value:e.timeFilter,callback:function(t){e.timeFilter=t},expression:"timeFilter"}}):e._e()],1),n("ul",{staticClass:"charts flex flex-wrap"},e._l(t.metrics,(function(t,r){return n("li",{key:r,staticClass:"chart-item mb-50"},[n("p",{staticClass:"mtb-10 fs-16 font-bold expect"},[e._v(e._s(e.$t("ClickHouseEcharts."+t.expect)))]),t.option?n("vue-echarts",{ref:"Charts",refInFor:!0,attrs:{option:t.option},nativeOn:{mousemove:function(t){return e.mousemove("series",t)}}}):e._e()],1)})),0)])})),0)],1)},vs=[],gs=n("a474");function Os(e,t){return Ss(e)||_s(e,t)||ws(e,t)||js()}function js(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ws(e,t){if(e){if("string"===typeof e)return ks(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ks(e,t):void 0}}function ks(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n")+Object.entries(Object(gs["a"])(e,"seriesName")).map((function(e){var t=Os(e,2),n=t[0],r=t[1];return"".concat(r[0].marker).concat(n).concat(r.sort((function(e,t){return t.value[1]-e.value[1]})).map((function(e){return": ".concat(e.value[1])})).join("
"))})).join("
")}},legend:{left:"center",type:"scroll",top:-5},dataZoom:[{show:!0,height:25,xAxisIndex:0,bottom:10}],grid:{top:"middle",left:"3%",right:"5.5%",bottom:"3%",height:"80%",containLabel:!0},xAxis:{type:"time",name:"时间",axisLine:{lineStyle:{color:"#999"}},axisTick:{show:!1},min:t,max:n},yAxis:{type:"value",splitLine:{lineStyle:{type:"dashed",color:"#DDD"}},nameTextStyle:{color:"#999"},name:"值"},series:(e||[]).map((function(e){var t=e.metric,n=e.values;return{name:function(){return t.instance?t.device?"".concat(t.instance,"-").concat(t.device):t.gc?"".concat(t.instance,"-").concat(t.gc):"".concat(t.instance):"job:".concat(t.job,"-task:").concat(t.task)}(),data:n.map((function(e){return[1e3*e[0],Number(e[1]).toFixed(2).replace(".00","")]})),type:"line",symbol:"none"}}))}},xs=n("c949");function Ps(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(r,o)}function Ts(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ps(i,r,o,a,c,"next",e)}function c(e){Ps(i,r,o,a,c,"throw",e)}a(void 0)}))}}var Es={props:{breadcrumbInfo:{type:Array,default:[]},metrics:{type:Array,default:[]}},data:function(){return{timeFilter:["now-1h","now"],refresh:null,chartOption:null,chartMetrics:[]}},mounted:function(){this.chartMetrics=(this.metrics||[]).map((function(e){var t=e.title,n=e.metrics;return{title:t,metrics:(n||[]).map((function(e){return e["option"]=null,e}))}})),this.fetchData()},methods:{fetchData:function(){var e=this;this.chartMetrics.forEach((function(t,n){t.metrics.forEach((function(n,r){e.fetchChartData(t.title,n,r)}))}))},fetchChartData:function(e,t,n){var r=this;return Ts(Re.a.mark((function o(){var i,a,c,s,l,u,f;return Re.a.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return i=Object($c["b"])(r.timeFilter),a=i.duration,c=i.min,s=i.max,l=Math.floor(+a/360/1e3),o.next=4,xs["c"].queryRangeMetric(r.$route.params.id,{title:e,metric:t.metric,start:Math.floor(c/1e3),end:Math.floor(s/1e3),step:l});case 4:u=o.sent,f=u.data.entity,r.$set(t,"option",Cs(f,c,s)),r.$nextTick((function(){r.$refs.Charts[n]&&r.$refs.Charts[n].refreshChart();var e=(r.$refs.Charts||[]).map((function(e){return e.chart}));ai.a.connect(e)}));case 8:case"end":return o.stop()}}),o)})))()},mousemove:function(e,t){},timeFilterChange:function(){this.fetchData()},timeFilterRefresh:function(){this.fetchData()}},components:{}},Rs=Es,Is=(n("8a48"),Object(D["a"])(Rs,ms,vs,!1,null,"b3fde702",null)),As=Is.exports,Ns=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("textarea",{ref:"code",staticStyle:{border:"none"},attrs:{name:"code"}})},Ms=[],Ds=n("56b3"),$s=n.n(Ds),Ls=(n("aedd"),n("cbc89"),n("697eb"),n("f9d4"),n("a7be"),n("7ba3"),n("f6b6"),n("ffda"),n("9b74"),n("991c"),n("7289"),n("9a48"),n("db05")),Ws=n("55f8"),zs=n("08ba");function Bs(e){for(var t={},n=e.split(" "),r=0;r!=&|^]/,dateSQL:Bs("now"),support:Bs("binaryNumber hexNumber doubleQuote"),hooks:{}});var Vs={name:"SqlCodeMirror",components:{CodeMirror:$s.a},model:{prop:"sql",event:"change"},props:{sql:{type:String},readOnly:{type:Boolean,default:!0}},data:function(){return{code:"",sqlEditor:""}},created:function(){try{this.code=Object(Ls["format"])(this.sql,{language:"mysql",indent:" "})}catch(e){this.code=this.sql}},mounted:function(){var e=this,t=this.sqlEditor=$s.a.fromTextArea(this.$refs.code,{mode:"text/x-clickhouse",theme:"darcula",readOnly:this.readOnly,indentWithTabs:!0,smartIndent:!0,lineNumbers:!0,matchBrackets:!0,keyMap:"sublime",autofocus:!0,hintOptions:{completeSingle:!1}});t.on("keypress",(function(e){t.showHint()})),t.on("change",(function(t){e.$emit("change",Object(Ws["a"])(t.getValue()))})),t.setValue(this.code)},methods:{format:function(){try{var e=this.sql,t=this.sqlEditor;this.code=Object(Ls["format"])(e,{language:"mysql",indent:" "}),t.setValue(this.code)}catch(n){zs["c"].info(this.$t("common.Current Browser Not Support"))}},onOk:function(){}}},Hs=Vs,Fs=Object(D["a"])(Hs,Ns,Ms,!1,null,null,null),qs=Fs.exports,Ks=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{ref:"form",staticStyle:{"line-height":"40px"},attrs:{model:e.formData}},[e._l(e.schema,(function(t,r){return n("DFormItem",{key:r,attrs:{schema:t,"origin-name":r,"prop-name":r},model:{value:e.formData,callback:function(t){e.formData=t},expression:"formData"}})})),n("el-form-item",{staticClass:"sticky-bottom"},[e.isShowSubmit?n("el-button",{attrs:{loading:e.loading,type:"primary"},on:{click:e.submit}},[e._v(e._s(e.submitText||e.$t("common.Create")))]):e._e(),e.isShowCancel?n("el-button",{on:{click:e.cancel}},[e._v(e._s(e.cancelText||e.$t("common.Cancel")))]):e._e()],1)],2)},Qs=[],Zs=n("0b0b"),Xs=n("641c"),Gs=n("32e8"),Ys={name:"DForm",components:{DFormItem:Zs["default"]},props:{schema:{type:Object,default:{}},formModel:{type:Object,default:function(){return null}},isShowSubmit:{type:Boolean,default:!0},isShowCancel:{type:Boolean,default:!0},submitText:{type:String,default:""},cancelText:{type:String,default:""},loading:Boolean},data:function(){return{formData:{}}},created:function(){var e=this.formModel,t=this.schema,n=this.formData;this.formData=Object(Xs["b"])(e,t,n)},methods:{submit:function(){var e=this,t=this.$refs.form;t.clearValidate();try{t.validate((function(n){if(!n){var r=t.fields.filter((function(e){return"error"===e.validateState})),o=t.fields.find((function(e){return"error"===e.validateState}));r.forEach((function(e){e.isSlideUp=!0;var t=e;do{var n=t.$parent;t=n,-1!==t.$el.className.indexOf("el-form-item")&&(t.isSlideUp=!0)}while("FORM"!==t.$el.nodeName)}));var i=0;if(o){o.isSlideUp=!0;var a=o;do{var c=a.$parent;a=c,a.collapse&&!Object(Gs["a"])(a.collapse.activeNames,[a.name])&&(a.collapse.activeNames=[a.name],i+=1),-1!==a.$el.className.indexOf("el-form-item")&&(a.isSlideUp=!0)}while("FORM"!==a.$el.nodeName);setTimeout((function(){o.$el.scrollIntoView()}),300*i)}return!1}var s=e.schema,l=e.formData,u=Object(Xs["c"])(Object(Ie["a"])(l),s);e.$emit("submit",u)}))}catch(n){console.log(n)}},cancel:function(){this.$router.go(-1)}}},Js=Ys,el=(n("22a0"),Object(D["a"])(Js,Ks,Qs,!1,null,null,null)),tl=el.exports;function nl(e,t){return cl(e)||al(e,t)||ol(e,t)||rl()}function rl(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ol(e,t){if(e){if("string"===typeof e)return il(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?il(e,t):void 0}}function il(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd HH:mm:ss";return null==e||""===e?"-":Object(p["a"])("string"===typeof e?new Date(e):e,t)},formatTime:function(e){return null==e?"-":new Date(e).toISOString().slice(11,-5)},percent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(100*e).toFixed(t)+"%"},trueFalse:function(e){return e?"真":"假"},yesNo:function(e){return e?"是":"否"}};Object.entries(g).forEach((function(e){var t=d(e,2),n=t[0],r=t[1];return o["default"].filter(n,r)}));var O=n("84c3"),j=n.n(O);O["Select"].props.optionMaxWidth["default"]="800px";var w=n("bc3a"),k=n.n(w),_=(n("3503"),n("8c4f")),S=n("2a95");Object.assign(S["default"].messages,{default:function(){return"字段验证错误,请检查"},required:function(){return"必填字段"},enum:function(e,t){return"必须是 ".concat(t," 其中之一")},whitespace:function(){return"该字段不能为空"},date:{format:function(){return"非法的日期格式"},parse:function(){return"非法的日期格式"},invalid:function(){return"非法的日期格式"}},types:{string:function(){return"必须是一个字符串"},method:function(){return"必须是一个方法 (函数)"},array:function(){return"必须是一个数组"},object:function(){return"必须是一个对象"},number:function(){return"必须是一个数字"},date:function(){return"必须是一个日期"},boolean:function(){return"必须是一个布尔值"},integer:function(){return"必须是一个整数"},float:function(){return"必须是一个浮点数"},regexp:function(){return"必须是一个合法的正则表达式"},email:function(){return"必须是一个合法的 Email 地址"},url:function(){return"必须是一个合法的 URL"},hex:function(){return"必须是一个合法的 16 进制数"}},string:{len:function(e,t){return"必须是 ".concat(t," 个字符长度")},min:function(e,t){return"必须至少是 ".concat(t," 个字符长度")},max:function(e,t){return"不能超过 ".concat(t," 个字符长度")},range:function(e,t,n){return"必须在 ".concat(t," 和 ").concat(n," 个字符长度之间")}},number:{len:function(e,t){return"必须等于 ".concat(t)},min:function(e,t){return"不能小于 ".concat(t)},max:function(e,t){return"不能大于 ".concat(t)},range:function(e,t,n){return"必须在 ".concat(t," 和 ").concat(n," 之间")}},array:{len:function(e,t){return"必须包含 ".concat(t," 个元素")},min:function(e,t){return"必须至少包含 ".concat(t," 个元素")},max:function(e,t){return"至多包含 ".concat(t," 个元素")},range:function(e,t,n){return"长度必须在 ".concat(t," 和 ").concat(n," 之间")}},pattern:{mismatch:function(e,t,n){return"必须匹配 ".concat(n," 规则")}}}),O["Link"].props.underline["default"]=!1,O["InputNumber"].props.controlsPosition["default"]="right",O["InputNumber"].props.max["default"]=Number.MAX_SAFE_INTEGER,O["InputNumber"].props.min["default"]=Number.MIN_SAFE_INTEGER,O["Slider"].props.inputControlsPosition["default"]="right",O["Dropdown"].props.trigger["default"]="click",O["MessageBox"].setDefaults({closeOnClickModal:!1});var C=n("08ba"),x=n("8c10");function P(e,t){return R(e)||E(e,t)||A(e,t)||T()}function T(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function E(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(i.push(r.value),t&&i.length===t)break}catch(s){c=!0,o=s}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw o}}return i}}function R(e){if(Array.isArray(e))return e}function I(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=A(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n["return"]||n["return"]()}finally{if(c)throw i}}}}function A(e,t){if(e){if("string"===typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?N(e,t):void 0}}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&C["e"].tooltips.splice(n,1)}});var V=function(){var e=document.createElement("style");e.innerHTML=":focus-within{}",document.head.appendChild(e);var t=!!e.sheet.cssRules.length;return document.head.removeChild(e),t}();if(V)document.documentElement.classList.add("native-focus-within"),o["default"].directive("focusWithinPolyfill",{});else{document.documentElement.classList.add("polyfilled-focus-within");var H="onfocusin"in document;o["default"].directive("focusWithinPolyfill",{bind:function(e,t){var n=t.value,r=void 0===n?"focus-within":n,o=function(){var t=0,n=!1;return function(o){t+=o,n||(n=!0,requestAnimationFrame((function(){n=!1,t?e.classList.add(r):e.classList.remove(r)})))}}(),i=e.handleFocusEvent=function(){return o(1)},a=e.handleBlurEvent=function(){return o(-1)};H?(e.addEventListener("focusin",i),e.addEventListener("focusout",a)):(e.addEventListener("focus",i,!0),e.addEventListener("blur",a,!0))},unbind:function(e){var t=e.handleFocusEvent,n=e.handleBlurEvent;H?(e.removeEventListener("focusin",t,!0),e.removeEventListener("focusout",n,!0)):(e.removeEventListener("focus",t,!0),e.removeEventListener("blur",n,!0))}})}var F=n("129c"),q=n("a388"),K=n.n(q),Q=(n("778e"),n("3133")),Z=n.n(Q);function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function G(e){for(var t=1;t100&&n.pop(),n.unshift(t)},deleteHistory:function(e,t){var n=t.clusterName,r=t.checksum,o=e.history.findIndex((function(e){return e.Cluster===n&&e.CheckSum===r}));-1!==o&&e.history.splice(o,1)},setHistory:function(e,t){e.history=Object(c["a"])(t)},setStatus:function(e,t){e.status=t},clear:function(e){e.result=[],e.pagination={pageSize:100,total:0,currentPage:1}}},actions:{retrieveHistory:function(e,t){return u(a.a.mark((function n(){var r,o,i;return a.a.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=e.commit,n.next=3,s["f"].getHistory(t);case 3:o=n.sent,i=o.data.entity,r("setHistory",i);case 6:case"end":return n.stop()}}),n)})))()},deleteHistory:function(e,t){return u(a.a.mark((function n(){var r;return a.a.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=e.commit,n.next=3,s["f"].deleteHistory(t);case 3:n.sent,r("deleteHistory",t);case 5:case"end":return n.stop()}}),n)})))()}},getters:{getResultColumn:function(e){var t=e.result;return 0===t.length?[]:t[0].map((function(e){return{label:e,prop:e}}))},getResultData:function(e){var t=e.result;if(t.length<=1)return[];var n=[],r=t[0];return t.forEach((function(e,t){if(t>0){var o={};r.forEach((function(t,n){o[t]=e[n]})),n.push(o)}})),n}}};r["default"].use(o["a"]);var p=new o["a"].Store({});p.registerModule("sqlSelect",f);t["a"]=p},4668:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));n("8e9f");n("a34a");function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;r(this,e),this.itemsPerPage=t,this.currentPage=null,this.totalItems=0}return i(e,[{key:"toApiParams",value:function(){var e=(this.currentPage||1)-1,t=this.itemsPerPage||10;return{page:e,from:e*t,size:t}}},{key:"filterData",value:function(e){var t=this.toApiParams(),n=t.from,r=t.size;return e.slice(n,n+r)}}]),e}();n("70f2");var c=null;function s(e,t){return e?(c=c||document.createElement("canvas").getContext("2d"),c.font=t,c.measureText(e).width):0}},4678:function(e,t,n){var r={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn-bd":"9686","./bn-bd.js":"9686","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-in":"ec2e","./en-in.js":"ec2e","./en-nz":"6f50","./en-nz.js":"6f50","./en-sg":"b7e9","./en-sg.js":"b7e9","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-mx":"b5b7","./es-mx.js":"b5b7","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fil":"d69a","./fil.js":"d69a","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-deva":"aaf2","./gom-deva.js":"aaf2","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./oc-lnc":"167b","./oc-lnc.js":"167b","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tk":"5aff","./tk.js":"5aff","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-mo":"3a6c","./zh-mo.js":"3a6c","./zh-tw":"90ea","./zh-tw.js":"90ea"};function o(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id="4678"},"49c5":function(e,t,n){},5133:function(e,t,n){"use strict";var r=n("e1ae"),o=n.n(r);o.a},"539c":function(e,t,n){},"5d5c":function(e,t,n){},"62ec":function(e,t,n){},"641c":function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return d}));var r=n("ec41"),o=n("32e8");function i(e,t){return u(e)||l(e,t)||c(e,t)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(e,t){if(e){if("string"===typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:"",t=r.loading;t.status++,t.text=e},decrease:function(){setTimeout((function(){return r.loading.status--}))}};function a(e){r=e}function c(e,t){var n=e.component,r=e.data,o=void 0===r?{}:r,i=e.props,a=void 0===i?{}:i;if(!n)throw new TypeError("Field component is required");void 0===a.cancelText&&(a.cancelText="取消"),void 0===a.okText&&(a.okText=null===a.cancelText?"关闭":"确定");var c={childComponent:n,data:o,props:a,resolve:null};return new Promise((function(e){c.resolve=e,t.push(c)}))["finally"]((function(){t.splice(t.indexOf(c),1)}))}function s(e){return"number"===typeof e.props.width&&(e.props.width=e.props.width+"px"),c(e,r.modals)}var l=n("bc3a"),u=n.n(l);function f(e){return f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}var p={info:function(e){return o["Message"].info(e)},success:function(e){return o["Message"].success(e)},warning:function(e){return o["Message"].warning(e)},error:function(e){return o["Message"].error(e)},fuck:function(e){if(u.a.isCancel(e))return console.info("Request canceled: ",e.message.url);if("cancel"===e)return console.info("User canceled");if(console.error(e),null==e)return o["Message"].error("未知错误,请联系管理员");if(e instanceof Error)return o["Message"].error(e.message);if("object"!==f(e))return o["Message"].error(e+"");if(e.data||e.response&&e.response.data){var t=e.data||e.response.data;return o["Message"].error(t.detail||t.error||t.message||t.retMsg||JSON.stringify(t))}return o["Message"].error(e.detail||e.error||e.message||e.retMsg||JSON.stringify(e))}},d={};["start","setPercent","increase","decrease","hide","pause","finish","fail","isRunning"].forEach((function(e){d[e]=function(){var t;r&&r.$refs&&(t=r.$refs.progressbar)[e].apply(t,arguments)}}))},"8e9f":function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));var r=getComputedStyle(document.documentElement).getPropertyValue("--primary-color").trim(),o=Object.freeze({serviceName:null,name:"ckman-fe",displayName:"ClickHouse Management Console",environment:"prod",version:null,commitsSinceRelease:null,compileTime:1659658820243,commitSha:"895f27cfa21916a7b504555171af8b3c2bd9945c"});Object.freeze(["Ⅰ","Ⅱ","Ⅲ","Ⅳ","Ⅴ","Ⅵ","Ⅶ","Ⅷ","Ⅸ","Ⅹ"])},"8f12":function(e,t,n){"use strict";n.d(t,"f",(function(){return r})),n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"e",(function(){return a})),n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return s}));n("8e9f");var r=Object.freeze({s:"秒",m:"分钟",h:"小时",d:"天",w:"周",M:"月",y:"年"}),o=Object.freeze([{path:"overview",name:"Overview"},{path:"manage",name:"Manage"},{path:"tables",name:"Tables"},{path:"session",name:"Session"},{path:"query-execution",name:"Query Execution"},{path:"settings",name:"Settings"}]),i=Object.freeze([{path:"overview",name:"Overview"},{path:"manage",name:"Manage"}]),a=Object.freeze([{title:"ClickHouse Table KPIs",metrics:[{expect:"clickhouse Query",metric:'ClickHouseMetrics_Query{instance=~"{{.hosts}}"}'}]},{title:"ClickHouse Node KPIs",metrics:[{expect:"cpu usage",metric:'100 * (1 - sum(increase(node_cpu_seconds_total{mode="idle",instance=~"{{.hosts}}"}[1m])) by (instance) / sum(increase(node_cpu_seconds_total{instance=~"{{.hosts}}"}[1m])) by (instance))'},{expect:"memory usage",metric:'100 * (1 - (node_memory_MemFree_bytes{instance=~"{{.hosts}}"}+node_memory_Buffers_bytes{instance=~"{{.hosts}}"}+node_memory_Cached_bytes{instance=~"{{.hosts}}"})/node_memory_MemTotal_bytes{instance=~"{{.hosts}}"})'},{expect:"disk usage",metric:'100 * (1 - node_filesystem_avail_bytes{fstype !~"tmpfs",instance=~"{{.hosts}}"} / node_filesystem_size_bytes{fstype !~"tmpfs",instance=~"{{.hosts}}"})'},{expect:"IOPS",metric:'irate(node_disk_writes_completed_total{instance=~"{{.hosts}}"}[1m])+irate(node_disk_reads_completed_total{instance=~"{{.hosts}}"}[1m])'}]},{title:"ZooKeeper KPIs",metrics:[{expect:"znode_count",metric:'znode_count{instance=~"{{.hosts}}"}'},{expect:"leader_uptime",metric:'increase(leader_uptime{instance=~"{{.hosts}}"}[1m])'},{expect:"stale_sessions_expired",metric:'stale_sessions_expired{instance=~"{{.hosts}}"}'},{expect:"jvm_gc_collection_seconds_count",metric:'jvm_gc_collection_seconds_count{instance=~"{{.hosts}}"}'},{expect:"jvm_gc_collection_seconds_sum",metric:'jvm_gc_collection_seconds_sum{instance=~"{{.hosts}}"}'}]}]),c=(Object.freeze([{title:"Clickhouse Sinker KPIs",metrics:[{expect:"rate clickhouse_sinker_consume_msgs_total 1m",metric:"sum(rate(clickhouse_sinker_consume_msgs_total[1m])) by(job,task)"},{expect:"rate clickhouse_sinker_flush_msgs_total 1m",metric:"sum(rate(clickhouse_sinker_flush_msgs_total[1m])) by(job,task)"},{expect:"rate clickhouse_sinker_shard_msgs 1m",metric:"sum(clickhouse_sinker_shard_msgs) by(job,task)"},{expect:"rate clickhouse_sinker_ring_msgs 1m",metric:"sum(clickhouse_sinker_ring_msgs) by(job,task)"},{expect:"rate clickhouse_sinker_parsing_pool_backlog 1m",metric:"sum(clickhouse_sinker_parsing_pool_backlog) by(job,task)"},{expect:"rate clickhouse_sinker_writing_pool_backlog 1m",metric:"sum(clickhouse_sinker_writing_pool_backlog) by(job,task)"}]}]),Object.freeze({start:"start",stop:"stop",destroy:"destroy",rebalance:"rebalance",upgrade:"upgrade"})),s=(Object.freeze(["green","red","yellow"]),Object.freeze(["5020"]))},9339:function(e,t,n){},9824:function(e,t,n){},"9df7":function(e,t,n){"use strict";var r=n("49c5"),o=n.n(r);o.a},a239:function(e,t,n){},a56d:function(e,t,n){"use strict";var r=n("a690"),o=n.n(r);o.a},a690:function(e,t,n){},afbc:function(e,t,n){"use strict";var r=n("1e41"),o=n.n(r);o.a},b44f:function(e,t,n){"use strict";var r=n("f09a"),o=n.n(r);o.a},bba2:function(e,t,n){"use strict";var r=n("3050"),o=n.n(r);o.a},c281:function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"e",(function(){return O})),n.d(t,"f",(function(){return a})),n.d(t,"d",(function(){return P})),n.d(t,"c",(function(){return T})),n.d(t,"a",(function(){return E}));n("4668");var r=n("c1df"),o=n.n(r);function i(e){return i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e){switch(i(e)){case"string":var t=+e;if(!isNaN(t))return{type:"absolute",value:t,moment:o()(t),timestamp:t};var n=/^now(?:-((\d+)([smhdwMy])(?:\/([dwMy]))?))?$/.exec(e);if(n){var r=+n[2]||0,a=n[3]||"d",c=n[4],s=+o.a.duration(r,a),l=new Date(Date.now()-s).setMilliseconds(0);return c&&(l=+o()(l).startOf(c),s=+o.a.duration((new Date).setMilliseconds(0)-l)),{type:"relative",value:n[1]||"0d",number:r,unit:a,moment:s,trunc:c,timestamp:l}}var u=Date.parse(e);if(u)return{type:"absolute",value:u,moment:o()(u),timestamp:u};throw new TypeError("不支持的时间类型");case"number":case"object":return{type:"absolute",value:+e,timestamp:+e};default:throw new TypeError("不支持的时间类型")}}function c(e,t){return p(e)||f(e,t)||l(e,t)||s()}function s(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(e,t){if(e){if("string"===typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.toFixed(2).toString().length&&(e=e.toFixed(2)),e+" "+t[r]}},c949:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return l})),n.d(t,"d",(function(){return f})),n.d(t,"c",(function(){return d})),n.d(t,"f",(function(){return y})),n.d(t,"g",(function(){return v})),n.d(t,"e",(function(){return O})),n.d(t,"h",(function(){return w}));var r=n("bc3a"),o=n.n(r),i="/api/login",a={login:function(e){return o.a.post("".concat(i),e)}},c="/api/v1/ck",s="/api/v1/deploy/ck",l={getCluster:function(){return o.a.get("".concat(c,"/cluster"))},getClusterByName:function(e){return o.a.get("".concat(c,"/cluster/").concat(e))},getClusterConfig:function(e){return o.a.get("".concat(c,"/config/").concat(e))},saveClusterConfig:function(e,t){return o.a.post("".concat(c,"/config/").concat(e),t)},getClusterCreateFormSchema:function(){return o.a.get("/api/v1/ui/schema?type=deploy")},getClusterUpdateFormSchema:function(){return o.a.get("/api/v1/ui/schema?type=config")},importCluster:function(e){return o.a.post("".concat(c,"/cluster"),e)},createCluster:function(e){return o.a.post("".concat(s,"/"),e)},updateCluster:function(e){return o.a.put("".concat(c,"/cluster"),e)},deleteCluster:function(e){return o.a["delete"]("".concat(c,"/cluster/").concat(e))},manageCluster:function(e,t,n){var r=t.clusterName,i=t.packageVersion,a=t.skip,s=t.policy;return i?o.a.put("".concat(c,"/").concat(e,"/").concat(r,"?password=").concat(n||""),{packageVersion:i,skip:a,policy:s}):o.a.put("".concat(c,"/").concat(e,"/").concat(r,"?password=").concat(n||""))},getClusterInfo:function(e){return o.a.get("".concat(c,"/get/").concat(e))},addClusterNode:function(e,t,n){return o.a.post("".concat(c,"/node/").concat(e,"?password=").concat(n||""),t)},deleteClusterNode:function(e,t,n){return o.a["delete"]("".concat(c,"/node/").concat(e,"?password=").concat(n||""),{params:t})},onlineClusterNode:function(e,t,n){return o.a.put("".concat(c,"/node/start/").concat(e,"?ip=").concat(t,"&password=").concat(n||""))},offlineClusterNode:function(e,t,n){return o.a.put("".concat(c,"/node/stop/").concat(e,"?ip=").concat(t,"&password=").concat(n||""))},getNodeLog:function(e){var t=e.clusterName,n=e.ip,r=e.logType,i=e.lines,a=void 0===i?1e3:i,s=e.tail,l=void 0===s||s;return o.a.post("".concat(c,"/node/log/").concat(t,"?ip=").concat(n),{lines:a,logType:r,tail:l})}},u="/api/v1",f={getList:function(e){return o.a.get("".concat(u,"/package?pkgType=").concat(e))},upload:function(e,t){return o.a.post("".concat(u,"/package"),e,t)},deletePackage:function(e){return o.a["delete"]("".concat(u,"/package"),{params:e})},getVersion:function(){return o.a.get("".concat(u,"/version"))}},p="/api/v1/metric",d={querymetric:function(e){return o.a.get("".concat(p,"/query"),{params:e})},queryRangeMetric:function(e,t){return o.a.get("".concat(p,"/query_range/").concat(e),{params:t})}},b=n("d710"),h="/api/v1/ck",y={query:function(e){return o.a.get("".concat(h,"/query/").concat(e.clusterName),{params:e,transformResponse:[function(e){try{return b["a"].parse(e)}catch(t){return JSON.parse(e)}}]})},getTableLists:function(e){return o.a.get("".concat(h,"/table_lists/").concat(e))},queryExplain:function(e){return o.a.get("".concat(h,"/query_explain/").concat(e.clusterName),{params:e})},getHistory:function(e){return o.a.get("".concat(h,"/query_history/").concat(e))},deleteHistory:function(e){var t=e.clusterName,n=e.checksum;return o.a["delete"]("".concat(h,"/query_history/").concat(t,"?checksum=").concat(n))}},m="/api/v1",v={zkStatus:function(e){return o.a.get("".concat(m,"/zk/status/").concat(e))},tableMetrics:function(e){return o.a.get("".concat(m,"/ck/table_metric/").concat(e))},deleteTable:function(e,t){return o.a["delete"]("".concat(m,"/ck/table/").concat(e),{params:t})},viewTableCreateSql:function(e,t){return o.a.get("".concat(m,"/ck/table_schema/").concat(e),{params:t})},replicationStatus:function(e){return o.a.get("".concat(m,"/zk/replicated_table/").concat(e))}},g="/api/v1/ck",O={open:function(e){return o.a.get("".concat(g,"/open_sessions/").concat(e))},close:function(e,t){return o.a.get("".concat(g,"/slow_sessions/").concat(e),{params:t})},kill:function(e,t){return o.a.put("".concat(g,"/open_sessions/").concat(e),{params:t})}},j="/api/v1/task",w={getLists:function(){return o.a.get("".concat(j,"/lists"))},getRunningLists:function(){return o.a.get("".concat(j,"/running"))},getTaskStatus:function(e){return o.a.get("".concat(j,"/").concat(e))},deleteTask:function(e){return o.a["delete"]("".concat(j,"/").concat(e))},getTaskDetail:function(e){return o.a.get("".concat(j,"/").concat(e))},stopTask:function(e){return o.a.put("".concat(j,"/").concat(e))}}},c9ff:function(e,t,n){},d4ab:function(e,t,n){"use strict";var r=n("642b"),o=n.n(r);o.a},d823:function(e,t,n){"use strict";var r=n("2812"),o=n.n(r);o.a},e1ae:function(e,t,n){},f09a:function(e,t,n){},f896:function(e,t,n){"use strict";var r=n("6b1b"),o=n.n(r);o.a}}); \ No newline at end of file diff --git a/static/dist/js/chunk-223d8db2.8f60282e.js b/static/dist/js/chunk-223d8db2.617519b5.js similarity index 100% rename from static/dist/js/chunk-223d8db2.8f60282e.js rename to static/dist/js/chunk-223d8db2.617519b5.js diff --git a/static/dist/js/chunk-2d0b9416.8c59deda.js b/static/dist/js/chunk-2d0b9416.57e42491.js similarity index 100% rename from static/dist/js/chunk-2d0b9416.8c59deda.js rename to static/dist/js/chunk-2d0b9416.57e42491.js diff --git a/static/dist/js/chunk-2d0c7310.d1eeb36a.js b/static/dist/js/chunk-2d0c7310.34224f16.js similarity index 100% rename from static/dist/js/chunk-2d0c7310.d1eeb36a.js rename to static/dist/js/chunk-2d0c7310.34224f16.js diff --git a/static/dist/js/chunk-2d0c7d23.c5f599f3.js b/static/dist/js/chunk-2d0c7d23.04c566c0.js similarity index 100% rename from static/dist/js/chunk-2d0c7d23.c5f599f3.js rename to static/dist/js/chunk-2d0c7d23.04c566c0.js diff --git a/static/dist/js/chunk-2d225218.9ee0d32a.js b/static/dist/js/chunk-2d225218.f0094be3.js similarity index 100% rename from static/dist/js/chunk-2d225218.9ee0d32a.js rename to static/dist/js/chunk-2d225218.f0094be3.js diff --git a/static/dist/js/chunk-2ee337c1.6b2c0414.js b/static/dist/js/chunk-2ee337c1.a380d019.js similarity index 100% rename from static/dist/js/chunk-2ee337c1.6b2c0414.js rename to static/dist/js/chunk-2ee337c1.a380d019.js diff --git a/static/dist/js/chunk-3b3169cc.e160c7cd.js b/static/dist/js/chunk-3b3169cc.e160c7cd.js new file mode 100644 index 00000000..6f906264 --- /dev/null +++ b/static/dist/js/chunk-3b3169cc.e160c7cd.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3b3169cc"],{"3bca":function(t,e,n){},"4f69":function(t,e,n){"use strict";var r=n("3bca"),a=n.n(r);a.a},6812:function(t,e,n){"use strict";var r=n("d959"),a=n.n(r);a.a},"8cbb":function(t,e,n){"use strict";var r=n("9ac7"),a=n("0148");function i(t,e){var n=null==t?0:t.length;return!!n&&Object(a["a"])(t,e,0)>-1}var o=i;function l(t,e,n){var r=-1,a=null==t?0:t.length;while(++r=v){var d=e?null:b(t);if(d)return Object(h["a"])(d);u=!1,i=c["a"],p=new r["a"]}else p=e?[]:f;t:while(++a0){if(++e>=w)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var C=_,$=C(y),D=$;function k(t,e){return D(d(t,e,c["a"]),t+"")}var P=k,z=n("b703"),O=n("0148");function j(t,e,n,r){var a=n-1,i=t.length;while(++a-1)l!==t&&M.call(l,s,1),M.call(t,s,1)}return t}var I=F;function Y(t,e){return t&&t.length&&e&&e.length?I(t,e):t}var q=Y,K=P(q),L=K,R=n("c949");function W(t,e,n,r,a,i,o){try{var l=t[i](o),s=l.value}catch(c){return void n(c)}l.done?e(s):Promise.resolve(s).then(r,a)}function H(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var i=t.apply(e,n);function o(t){W(i,r,a,o,l,"next",t)}function l(t){W(i,r,a,o,l,"throw",t)}o(void 0)}))}}var U={data:function(){return{tableData:[]}},computed:{data:function(){var t=this.tableData,e={};return t.forEach((function(t){e[t.host]=t})),e},fields:function(){var t=this.tableData;if(t.length>0)return L(Object.keys(t[0]),"host")},columns:function(){var t=this.tableData,e=[];return t.forEach((function(t){var n=t.host;e.push({field:n,label:n})})),e}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var t=this;return H(s.a.mark((function e(){var n,r;return s.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,R["g"].zkStatus(t.$route.params.id);case 2:n=e.sent,r=n.data.entity,t.tableData=Object.freeze(r);case 5:case"end":return e.stop()}}),e)})))()}}},B=U,J=(n("4f69"),n("2877")),Q=Object(J["a"])(B,i,o,!1,null,"56dfe845",null),Z=Q.exports,V=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"replication-status pb-20"},[n("div",{staticClass:"title flex flex-between flex-vcenter ptb-10 pull-left"},[n("span",{staticClass:"fs-20 font-bold"},[t._v(t._s(t.$t("tables.Table Replication Status")))])]),n("vxe-toolbar",{staticClass:"pull-right",attrs:{zoom:"",custom:""},scopedSlots:t._u([{key:"buttons",fn:function(){return[n("el-input",{staticClass:"width-250 mr-10",attrs:{size:"medium",placeholder:t.$t("common.keyword search"),"suffix-icon":"el-icon-search"},model:{value:t.searchKey,callback:function(e){t.searchKey=e},expression:"searchKey"}})]},proxy:!0}])}),n("vxe-table",t._b({directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"xTable",staticStyle:{clear:"both"},attrs:{columns:t.cols,data:t.currentPageData},on:{"sort-change":t.sortChangeEvent}},"vxe-table",t.gridOptions,!1),t._l(t.cols,(function(e,r){return n(e.prop?"vxe-column":"vxe-colgroup",{key:r,tag:"div",attrs:{sortable:!!e.prop,field:e.prop,title:e.label,align:"center","min-width":e.minWidth||140}},t._l(e.children,(function(e,r){return n("vxe-column",{key:r,attrs:{title:e.label,field:e.prop,width:"auto",align:"center",sortable:"",sortConfig:{trigger:"cell"}},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row,a=e.column;return[n("div",{class:t.getClassName(r,a.property)},[t._v(t._s(r[a.property]))])]}}],null,!0)})})),1)})),1),n("vxe-pager",{attrs:{"current-page":t.pagination.currentPage,"page-size":t.pagination.pageSize,"page-sizes":t.pagination.pageSizes,total:t.pagination.total,layouts:["PrevPage","JumpNumber","NextPage","FullJump","Sizes","Total"]},on:{"update:pageSize":function(e){return t.$set(t.pagination,"pageSize",e)},"update:page-size":function(e){return t.$set(t.pagination,"pageSize",e)},"page-change":t.handlePageChange}})],1)},G=[],X=n("5c8a"),tt=n("8cbb");function et(t,e){return e="function"==typeof e?e:void 0,t&&t.length?Object(tt["a"])(t,void 0,e):[]}var nt=et,rt=n("32e8");function at(t,e){return ct(t)||st(t,e)||ot(t,e)||it()}function it(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ot(t,e){if(t){if("string"===typeof t)return lt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lt(t,e):void 0}}function lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n-1}var o=i;function l(t,e,r){var n=-1,a=null==t?0:t.length;while(++n=v){var d=e?null:m(t);if(d)return Object(h["a"])(d);u=!1,i=c["a"],p=new n["a"]}else p=e?[]:f;t:while(++a0){if(++e>=w)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var _=C,$=_(y),z=$;function D(t,e){return z(d(t,e,c["a"]),t+"")}var k=D,P=r("b703"),O=r("0148");function j(t,e,r,n){var a=r-1,i=t.length;while(++a-1)l!==t&&N.call(l,s,1),N.call(t,s,1)}return t}var K=q;function I(t,e){return t&&t.length&&e&&e.length?K(t,e):t}var R=I,W=k(R),L=W,M=r("c949");function J(t,e,r,n,a,i,o){try{var l=t[i](o),s=l.value}catch(c){return void r(c)}l.done?e(s):Promise.resolve(s).then(n,a)}function U(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var i=t.apply(e,r);function o(t){J(i,n,a,o,l,"next",t)}function l(t){J(i,n,a,o,l,"throw",t)}o(void 0)}))}}var B={data:function(){return{tableData:[]}},computed:{data:function(){var t=this.tableData,e={};return t.forEach((function(t){e[t.host]=t})),e},fields:function(){var t=this.tableData;if(t.length>0)return L(Object.keys(t[0]),"host")},columns:function(){var t=this.tableData,e=[];return t.forEach((function(t){var r=t.host;e.push({field:r,label:r})})),e}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var t=this;return U(s.a.mark((function e(){var r,n;return s.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,M["g"].zkStatus(t.$route.params.id);case 2:r=e.sent,n=r.data.entity,t.tableData=Object.freeze(n);case 5:case"end":return e.stop()}}),e)})))()}}},H=B,Q=(r("4f69"),r("2877")),Z=Object(Q["a"])(H,i,o,!1,null,"56dfe845",null),G=Z.exports,V=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"replication-status pb-20"},[r("div",{staticClass:"title flex flex-between flex-vcenter ptb-10 pull-left"},[r("span",{staticClass:"fs-20 font-bold"},[t._v(t._s(t.$t("tables.Table Replication Status")))])]),r("vxe-toolbar",{staticClass:"pull-right",attrs:{zoom:"",custom:""},scopedSlots:t._u([{key:"buttons",fn:function(){return[r("el-input",{staticClass:"width-250 mr-10",attrs:{size:"medium",placeholder:t.$t("common.keyword search"),"suffix-icon":"el-icon-search"},model:{value:t.searchKey,callback:function(e){t.searchKey=e},expression:"searchKey"}})]},proxy:!0}])}),r("vxe-table",t._b({directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"xTable",staticStyle:{clear:"both"},attrs:{columns:t.cols,data:t.currentPageData},on:{"sort-change":t.sortChangeEvent}},"vxe-table",t.gridOptions,!1),t._l(t.cols,(function(e,n){return r(e.prop?"vxe-column":"vxe-colgroup",{key:n,tag:"div",attrs:{sortable:!!e.prop,field:e.prop,title:e.label,align:"center","min-width":e.minWidth||140}},t._l(e.children,(function(e,n){return r("vxe-column",{key:n,attrs:{title:e.label,field:e.prop,width:"auto",align:"center",sortable:"",sortConfig:{trigger:"cell"}},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row,a=e.column;return[r("div",{class:t.getClassName(n,a.property)},[t._v(t._s(n[a.property]))])]}}],null,!0)})})),1)})),1),r("vxe-pager",{attrs:{"current-page":t.pagination.currentPage,"page-size":t.pagination.pageSize,"page-sizes":t.pagination.pageSizes,total:t.pagination.total,layouts:["PrevPage","JumpNumber","NextPage","FullJump","Sizes","Total"]},on:{"update:pageSize":function(e){return t.$set(t.pagination,"pageSize",e)},"update:page-size":function(e){return t.$set(t.pagination,"pageSize",e)},"page-change":t.handlePageChange}})],1)},X=[],Y=r("5c8a"),tt=r("8cbb");function et(t,e){return e="function"==typeof e?e:void 0,t&&t.length?Object(tt["a"])(t,void 0,e):[]}var rt=et,nt=r("32e8");function at(t,e){return ct(t)||st(t,e)||ot(t,e)||it()}function it(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ot(t,e){if(t){if("string"===typeof t)return lt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lt(t,e):void 0}}function lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r