~ K A L I ~
UNAME : Linux web63.extendcp.co.uk 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64SERVER IP : 10.0.187.63 -________-
CLIENT IP : 216.73.216.230 MINI SHELL D ZAB '
Current File : //usr/share/maxscale/gui/js/app~f6d1a70f.ebf40c17.js |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["app~f6d1a70f"],{"05c1":function(e,t,s){},"0b03":function(e,t,s){"use strict";s("6800")},"0d40":function(e,t,s){},"1fd7":function(e,t,s){"use strict";var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("mxs-dlg",{attrs:{title:e.queryErrMsg,minBodyWidth:"624px",onSave:e.handleReconnect,cancelText:"disconnect",saveText:"reconnect",showCloseIcon:!1},on:{"on-cancel":e.deleteConn},scopedSlots:e._u([{key:"form-body",fn:function(){return[e.showReconnDialog?s("table",{staticClass:"tbl-code pa-4"},e._l(e.getLostCnnErrMsgObj,(function(t,i){return s("tr",{key:i},[s("td",[s("b",[e._v(e._s(i))])]),s("td",[e._v(e._s(t))])])})),0):e._e()]},proxy:!0}]),model:{value:e.showReconnDialog,callback:function(t){e.showReconnDialog=t},expression:"showReconnDialog"}})},r=[],a=s("2f62"),n={name:"reconn-dlg-ctr",props:{onReconnectCb:{type:Function,default:()=>null}},computed:{...Object(a["c"])({getLostCnnErrMsgObj:"queryConn/getLostCnnErrMsgObj",getCurrWkeConn:"queryConn/getCurrWkeConn",getActiveSessionId:"querySession/getActiveSessionId"}),queryErrMsg(){return this.$typy(this.getLostCnnErrMsgObj,"message").safeString},showReconnDialog:{get(){return Boolean(this.queryErrMsg)},set(){this.PATCH_LOST_CNN_ERR_MSG_OBJ_MAP({id:this.getActiveSessionId})}}},methods:{...Object(a["d"])({PATCH_LOST_CNN_ERR_MSG_OBJ_MAP:"queryConn/PATCH_LOST_CNN_ERR_MSG_OBJ_MAP"}),...Object(a["b"])({reconnect:"queryConn/reconnect",disconnect:"queryConn/disconnect"}),async deleteConn(){await this.disconnect({id:this.getCurrWkeConn.id})},async handleReconnect(){await this.reconnect(),await this.onReconnectCb()}}},o=n,l=s("2877"),c=Object(l["a"])(o,i,r,!1,null,null,null);t["a"]=c.exports},"322d":function(e,t,s){"use strict";var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("mxs-conf-dlg",e._g({attrs:{title:e.title,smallInfo:e.smallInfo,saveText:"execute",minBodyWidth:"768px",hasSavingErr:e.hasSavingErr,allowEnterToSubmit:!1,onSave:e.onSave},scopedSlots:e._u([{key:"body-prepend",fn:function(){return[e.hasSavingErr?s("table",{staticClass:"tbl-code pa-4"},[s("tr",[s("td",[s("b",[e._v("sql")])]),s("td",[e._v(e._s(e.currSql))])]),e._l(e.errMsgObj,(function(t,i){return s("tr",{key:i},[s("td",[s("b",[e._v(e._s(i))])]),s("td",[e._v(e._s(t))])])}))],2):s("div",{staticClass:"mb-4 pt-2 pl-2 mxs-color-helper all-border-table-border",style:{height:e.editorHeight+"px"}},[e.isConfDlgOpened?s("sql-editor",{class:"fill-height",attrs:{cmplList:e.dbCmplList,options:{fontSize:10,contextmenu:!1,wordWrap:"on"},skipRegCompleters:e.skipRegCompleters},model:{value:e.currSql,callback:function(t){e.currSql=t},expression:"currSql"}}):e._e()],1)]},proxy:!0}]),model:{value:e.isConfDlgOpened,callback:function(t){e.isConfDlgOpened=t},expression:"isConfDlgOpened"}},e.$listeners))},r=[],a=s("e272"),n={name:"execute-sql-dialog",components:{"sql-editor":a["a"]},props:{value:{type:Boolean,required:!0},title:{type:String,required:!0},smallInfo:{type:String,default:""},hasSavingErr:{type:Boolean,required:!0},errMsgObj:{type:Object,required:!0},sqlTobeExecuted:{type:String,required:!0},editorHeight:{type:Number,default:250},dbCmplList:{type:Array,required:!0},skipRegCompleters:{type:Boolean,required:!0},onSave:{type:Function,required:!0}},computed:{isConfDlgOpened:{get(){return this.value},set(e){this.$emit("input",e)}},currSql:{get(){return this.sqlTobeExecuted},set(e){this.$emit("update:sqlTobeExecuted",e)}}}},o=n,l=s("2877"),c=Object(l["a"])(o,i,r,!1,null,null,null);t["a"]=c.exports},3748:function(e,t,s){},4070:function(e,t,s){"use strict";s("61a6")},"547a":function(e,t,s){"use strict";s("3748")},"5f47":function(e,t,s){},"61a6":function(e,t,s){},"639e":function(e,t,s){"use strict";s("05c1")},6800:function(e,t,s){},"71c9":function(e,t,s){"use strict";var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("mxs-tooltip-btn",{attrs:{btnClass:"query-setting-btn",icon:"",small:""},on:{click:function(t){e.queryConfigDialog=!e.queryConfigDialog}},scopedSlots:e._u([{key:"btn-content",fn:function(){return[s("v-icon",{attrs:{size:"16",color:"accent-dark"}},[e._v("$vuetify.icons.mxs_settings")]),s("query-cnf-dlg-ctr",{model:{value:e.queryConfigDialog,callback:function(t){e.queryConfigDialog=t},expression:"queryConfigDialog"}})]},proxy:!0}])},[e._v(" "+e._s(e.$mxs_tc("settings",2))+" ")])},r=[],a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("query-cnf-dlg",e._g(e._b({attrs:{cnf:{query_row_limit:e.query_row_limit,query_confirm_flag:e.query_confirm_flag,query_history_expired_time:e.query_history_expired_time,query_show_sys_schemas_flag:e.query_show_sys_schemas_flag,tab_moves_focus:e.tab_moves_focus,max_statements:e.max_statements}},on:{"confirm-save":e.save}},"query-cnf-dlg",Object.assign({},e.$attrs),!1),e.$listeners))},n=[],o=s("2f62"),l=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("mxs-dlg",{attrs:{onSave:e.onSave,title:e.$mxs_t("queryConfig"),lazyValidation:!1,minBodyWidth:"512px",hasChanged:e.hasChanged},scopedSlots:e._u([{key:"form-body",fn:function(){return[s("div",{staticClass:"px-1 py-2"},[s("label",{staticClass:"field__label mxs-color-helper text-small-text label-required"},[e._v(" "+e._s(e.$mxs_t("rowLimit"))+" ")]),s("row-limit-ctr",{key:e.isOpened,staticClass:"vuetify-input--override error--text__bottom mb-2 rowLimit",attrs:{height:36,"hide-details":"auto"},on:{change:function(t){e.config.rowLimit=t}}}),s("v-icon",{staticClass:"mr-2",attrs:{size:"16",color:"warning"}},[e._v(" $vuetify.icons.mxs_alertWarning ")]),s("small",{domProps:{innerHTML:e._s(e.$mxs_t("info.rowLimit"))}})],1),s("div",{staticClass:"px-1 py-2"},[s("label",{staticClass:"field__label mxs-color-helper text-small-text label-required"},[e._v(" "+e._s(e.$mxs_t("maxStatements"))+" ")]),s("v-text-field",{staticClass:"vuetify-input--override error--text__bottom mb-2 maxStatements",attrs:{type:"number",rules:[function(t){return e.validatePositiveNumber({v:t,inputName:e.$mxs_t("maxStatements")})}],dense:"",height:36,"hide-details":"auto",outlined:"",required:""},on:{keypress:function(t){return e.$helpers.preventNonNumericalVal(t)}},model:{value:e.config.maxStatements,callback:function(t){e.$set(e.config,"maxStatements",e._n(t))},expression:"config.maxStatements"}}),s("v-icon",{staticClass:"mr-2",attrs:{size:"16",color:"warning"}},[e._v(" $vuetify.icons.mxs_alertWarning ")]),s("small",{domProps:{innerHTML:e._s(e.$mxs_t("info.maxStatements"))}})],1),s("div",{staticClass:"px-1 py-2"},[s("label",{staticClass:"field__label mxs-color-helper text-small-text label-required"},[e._v(" "+e._s(e.$mxs_t("queryHistoryRetentionPeriod"))+" ("+e._s(e.$mxs_t("inDays"))+") ")]),s("v-text-field",{staticClass:"vuetify-input--override error--text__bottom mb-2 queryHistoryRetentionPeriod",attrs:{type:"number",rules:[function(t){return e.validatePositiveNumber({v:t,inputName:e.$mxs_t("queryHistoryRetentionPeriod")})}],dense:"",height:36,"hide-details":"auto",outlined:"",required:""},on:{keypress:function(t){return e.$helpers.preventNonNumericalVal(t)}},model:{value:e.config.queryHistoryRetentionPeriod,callback:function(t){e.$set(e.config,"queryHistoryRetentionPeriod",e._n(t))},expression:"config.queryHistoryRetentionPeriod"}})],1),e._l(e.$helpers.lodash.pick(e.config,["showQueryConfirm","showSysSchemas","tabMovesFocus"]),(function(t,i){return s("div",{key:i,staticClass:"pa-1"},[s("v-checkbox",{staticClass:"v-checkbox--custom-label pa-0 ma-0",class:[i],attrs:{dense:"",color:"primary","hide-details":"auto"},scopedSlots:e._u([{key:"label",fn:function(){return[s("label",{staticClass:"v-label pointer"},[e._v(e._s(e.$mxs_t(i)))]),"tabMovesFocus"===i?s("v-tooltip",{attrs:{top:"",transition:"slide-y-transition","content-class":"shadow-drop mxs-color-helper white text-navigation py-1 px-4","max-width":"400"},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[s("v-icon",e._g({staticClass:"ml-1 material-icons-outlined pointer",attrs:{size:"16",color:"#9DB4BB"}},i),[e._v(" mdi-information-outline ")])]}}],null,!0)},[s("i18n",{attrs:{path:e.config[i]?"mxs.info.tabMovesFocus":"mxs.info.tabInsetChar",tag:"span"},scopedSlots:e._u([{key:"shortcut",fn:function(){return[s("b",[e._v(" "+e._s(e.OS_KEY+" "+(e.$helpers.isMAC()?"+ SHIFT":""))+" + M ")])]},proxy:!0}],null,!0)})],1):e._e()]},proxy:!0}],null,!0),model:{value:e.config[i],callback:function(t){e.$set(e.config,i,t)},expression:"config[key]"}})],1)}))]},proxy:!0}]),model:{value:e.isOpened,callback:function(t){e.isOpened=t},expression:"isOpened"}})},c=[],d=s("e643"),u={name:"query-cnf-dlg",components:{RowLimitCtr:d["a"]},props:{value:{type:Boolean,required:!0},cnf:{type:Object,validator(e){return"query_row_limit"in e&&"number"===typeof e.query_row_limit&&"query_confirm_flag"in e&&"number"===typeof e.query_confirm_flag&&"query_history_expired_time"in e&&"number"===typeof e.query_history_expired_time&&"query_show_sys_schemas_flag"in e&&"number"===typeof e.query_show_sys_schemas_flag&&"tab_moves_focus"in e&&"boolean"===typeof e.tab_moves_focus&&"max_statements"in e&&"number"===typeof e.max_statements},required:!0}},data(){return{config:{}}},computed:{...Object(o["e"])({OS_KEY:e=>e.queryEditorConfig.config.OS_KEY}),isOpened:{get(){return this.value},set(e){this.$emit("input",e)}},defCnf(){return{rowLimit:this.cnf.query_row_limit,showQueryConfirm:Boolean(this.cnf.query_confirm_flag),queryHistoryRetentionPeriod:this.$helpers.daysDiff({moment:this.$moment,timestamp:this.cnf.query_history_expired_time}),showSysSchemas:Boolean(this.cnf.query_show_sys_schemas_flag),tabMovesFocus:this.cnf.tab_moves_focus,maxStatements:this.cnf.max_statements}},hasChanged(){return!this.$helpers.lodash.isEqual(this.defCnf,this.config)}},watch:{isOpened:{immediate:!0,handler(e){e&&(this.config=this.$helpers.lodash.cloneDeep(this.defCnf))}}},methods:{validatePositiveNumber({v:e,inputName:t}){return this.$typy(e).isEmptyString?this.$mxs_t("errors.requiredInput",{inputName:t}):e<=0?this.$mxs_t("errors.largerThanZero",{inputName:t}):e>0},onSave(){this.$emit("confirm-save",{query_row_limit:this.config.rowLimit,query_confirm_flag:Number(this.config.showQueryConfirm),query_history_expired_time:this.$helpers.addDaysToNow(this.config.queryHistoryRetentionPeriod),query_show_sys_schemas_flag:Number(this.config.showSysSchemas),tab_moves_focus:this.config.tabMovesFocus,max_statements:this.config.maxStatements})}}},_=u,h=s("2877"),m=s("6544"),p=s.n(m),f=s("ac7c"),y=s("132d"),v=s("8654"),S=s("3a2f"),b=Object(h["a"])(_,l,c,!1,null,null,null),x=b.exports;p()(b,{VCheckbox:f["a"],VIcon:y["a"],VTextField:v["a"],VTooltip:S["a"]});var g={name:"query-cnf-dlg-ctr",components:{QueryCnfDlg:x},inheritAttrs:!1,computed:{...Object(o["e"])({query_row_limit:e=>e.queryPersisted.query_row_limit,query_confirm_flag:e=>e.queryPersisted.query_confirm_flag,query_history_expired_time:e=>e.queryPersisted.query_history_expired_time,query_show_sys_schemas_flag:e=>e.queryPersisted.query_show_sys_schemas_flag,tab_moves_focus:e=>e.queryPersisted.tab_moves_focus,max_statements:e=>e.queryPersisted.max_statements})},methods:{...Object(o["d"])({SET_QUERY_ROW_LIMIT:"queryPersisted/SET_QUERY_ROW_LIMIT",SET_QUERY_CONFIRM_FLAG:"queryPersisted/SET_QUERY_CONFIRM_FLAG",SET_QUERY_SHOW_SYS_SCHEMAS_FLAG:"queryPersisted/SET_QUERY_SHOW_SYS_SCHEMAS_FLAG",SET_QUERY_HISTORY_EXPIRED_TIME:"queryPersisted/SET_QUERY_HISTORY_EXPIRED_TIME",SET_TAB_MOVES_FOCUS:"queryPersisted/SET_TAB_MOVES_FOCUS",SET_MAX_STATEMENTS:"queryPersisted/SET_MAX_STATEMENTS"}),save(e){this.SET_QUERY_ROW_LIMIT(e.query_row_limit),this.SET_QUERY_CONFIRM_FLAG(e.query_confirm_flag),this.SET_QUERY_HISTORY_EXPIRED_TIME(e.query_history_expired_time),this.SET_QUERY_SHOW_SYS_SCHEMAS_FLAG(e.query_show_sys_schemas_flag),this.SET_TAB_MOVES_FOCUS(e.tab_moves_focus),this.SET_MAX_STATEMENTS(e.max_statements)}}},E=g,T=Object(h["a"])(E,a,n,!1,null,null,null),O=T.exports,w={name:"query-cnf-gear-btn",components:{QueryCnfDlgCtr:O},data(){return{queryConfigDialog:!1}}},R=w,C=Object(h["a"])(R,i,r,!1,null,null,null);t["a"]=C.exports;p()(C,{VIcon:y["a"]})},"7e23":function(e,t,s){"use strict";var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("mxs-conf-dlg",{attrs:{minBodyWidth:"768px",title:e.file_dlg_data.title,closeImmediate:!0,lazyValidation:!1,onSave:e.file_dlg_data.on_save,cancelText:"dontSave",saveText:"save"},on:{"on-cancel":e.file_dlg_data.dont_save},scopedSlots:e._u([{key:"form-body",fn:function(){return[s("p",{domProps:{innerHTML:e._s(e.file_dlg_data.confirm_msg)}})]},proxy:!0}]),model:{value:e.isOpened,callback:function(t){e.isOpened=t},expression:"isOpened"}})},r=[],a=s("2f62"),n={name:"file-dlg-ctr",computed:{...Object(a["e"])({file_dlg_data:e=>e.editor.file_dlg_data}),isOpened:{get(){return this.file_dlg_data.is_opened},set(e){this.SET_FILE_DLG_DATA({...this.file_dlg_data,is_opened:e})}}},methods:{...Object(a["d"])({SET_FILE_DLG_DATA:"editor/SET_FILE_DLG_DATA"})}},o=n,l=s("2877"),c=Object(l["a"])(o,i,r,!1,null,null,null);t["a"]=c.exports},9650:function(e,t,s){"use strict";s("0d40")},a11e:function(e,t,s){"use strict";s("5f47")},a4a6:function(e,t,s){"use strict";var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{ref:"tableTools",staticClass:"table-tools pb-2 d-inline-flex align-center"},[e._t("left-table-tools-prepend"),s("v-text-field",{staticClass:"vuetify-input--override filter-result mr-2",attrs:{name:"filter",dense:"",outlined:"",height:"28",placeholder:e.$mxs_t("filterResult"),"hide-details":""},model:{value:e.filterKeyword,callback:function(t){e.filterKeyword=t},expression:"filterKeyword"}}),s("mxs-filter-list",{attrs:{selectAllOnActivated:"",label:e.$mxs_t("filterBy"),items:e.tableHeaders,maxHeight:e.tableHeight-20},model:{value:e.filterHeaderIdxs,callback:function(t){e.filterHeaderIdxs=t},expression:"filterHeaderIdxs"}}),e._t("left-table-tools-append"),s("v-spacer"),e._t("right-table-tools-prepend"),e.showEditBtn?s("v-btn",{staticClass:"mr-2 pa-1 text-capitalize font-weight-medium",attrs:{"x-small":"",outlined:"",depressed:"",color:"accent-dark"},on:{click:e.handleEdit}},[e._v(" "+e._s(e.isEditing?e.$mxs_t("doneEditing"):e.$mxs_t("edit"))+" ")]):e._e(),e.selectedItems.length?s("mxs-tooltip-btn",{attrs:{btnClass:"mr-2 pa-1 text-capitalize font-weight-medium","x-small":"",outlined:"",depressed:"",color:"error"},on:{click:function(t){return e.$emit("on-delete-selected",e.selectedItems)}},scopedSlots:e._u([{key:"btn-content",fn:function(){return[e._v(" "+e._s(e.$mxs_t("delete"))+" ("+e._s(e.selectedItems.length)+") ")]},proxy:!0}],null,!1,2650540428)},[e._v(" "+e._s(e.$mxs_t("deleteSelectedRows"))+" ")]):e._e(),s("result-export",{attrs:{rows:e.filteredRows_wo_idx,headers:e.visHeaders_wo_idx,defExportFileName:e.defExportFileName}}),s("mxs-filter-list",{attrs:{selectAllOnActivated:"",label:e.$mxs_t("columns"),items:e.tableHeaders,maxHeight:e.tableHeight-20},model:{value:e.visHeaderIdxs,callback:function(t){e.visHeaderIdxs=t},expression:"visHeaderIdxs"}}),s("mxs-tooltip-btn",{attrs:{btnClass:"ml-2 pa-1","x-small":"",outlined:"",depressed:"",color:"accent-dark",disabled:e.isGrouping},on:{click:function(t){e.isVertTable=!e.isVertTable}},scopedSlots:e._u([{key:"btn-content",fn:function(){return[s("v-icon",{class:{"rotate-left":!e.isVertTable},attrs:{size:"14",color:"accent-dark"}},[e._v(" mdi-format-rotate-90 ")])]},proxy:!0}])},[e._v(" "+e._s(e.$mxs_t(e.isVertTable?"switchToHorizTable":"switchToVertTable"))+" ")]),e._t("right-table-tools-append")],2),s("keep-alive",[e.tableHeight>0?s("mxs-virtual-scroll-tbl",e._g({staticClass:"pb-2",attrs:{headers:e.visibleHeaders,rows:e.filteredRows,itemHeight:30,maxHeight:e.tableHeight,boundingWidth:e.width,isVertTable:e.isVertTable,showSelect:e.showSelect,groupBy:e.groupBy,activeRow:e.activeRow,search:e.filterKeyword},on:{"selected-rows":function(t){e.selectedItems=t},"is-grouping":function(t){e.isGrouping=t},"on-cell-right-click":e.onCellRClick},scopedSlots:e._u([e._l(e.visibleHeaders,(function(t){return{key:t.text,fn:function(i){var r=i.data;return[e.isEditing&&t.editableCol?s("editable-cell",{key:t.text+"-"+r.cell,attrs:{cellItem:e.toCellItem({rowData:r.rowData,cell:r.cell,colName:t.text}),changedCells:e.changedCells},on:{"update:changedCells":function(t){e.changedCells=t},"update:changed-cells":function(t){e.changedCells=t}}}):e._t(""+t.text,null,{data:r})]}}})),e._l(e.visibleHeaders,(function(t){return{key:"header-"+t.text,fn:function(s){var i=s.data;return[e._t("header-"+t.text,null,{data:i})]}}}))],null,!0)},e.$listeners)):e._e()],1),e.$typy(e.ctxMenuData).isEmptyObject?e._e():s("mxs-sub-menu",{key:e.ctxMenuActivator,attrs:{left:"",items:e.menuItems,activator:e.ctxMenuActivator},on:{"item-click":e.onChooseOpt},model:{value:e.showCtxMenu,callback:function(t){e.showCtxMenu=t},expression:"showCtxMenu"}})],1)},r=[],a=(s("ddb0"),s("caad"),s("13d5"),function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("mxs-tooltip-btn",{attrs:{btnClass:"mr-2","x-small":"",outlined:"",depressed:"",color:"accent-dark"},on:{click:e.openConfigDialog},scopedSlots:e._u([{key:"btn-content",fn:function(){return[s("v-icon",{attrs:{size:"14",color:"accent-dark"}},[e._v("mdi-download")]),s("mxs-dlg",{attrs:{onSave:e.onExport,title:e.$mxs_t("exportResults"),saveText:"export",minBodyWidth:"512px",lazyValidation:!1},on:{"is-form-valid":function(t){e.isFormValid=t}},scopedSlots:e._u([{key:"form-body",fn:function(){return[s("v-container",{staticClass:"pa-1"},[s("v-row",{staticClass:"ma-n1"},[s("v-col",{staticClass:"pa-1",attrs:{cols:"12",md:"12"}},[s("label",{staticClass:"field__label mxs-color-helper text-small-text label-required"},[e._v(" "+e._s(e.$mxs_t("fileName"))+" ")]),s("v-text-field",{staticClass:"vuetify-input--override error--text__bottom",attrs:{name:"file-name",dense:"",outlined:"",height:36,rules:[function(t){return!!t||e.$mxs_t("errors.requiredInput",{inputName:"File name"})}],required:"","hide-details":"auto"},model:{value:e.fileName,callback:function(t){e.fileName=t},expression:"fileName"}})],1),s("v-col",{staticClass:"pa-1",attrs:{cols:"12",md:"12"}},[s("label",{staticClass:"field__label mxs-color-helper text-small-text label-required"},[e._v(" "+e._s(e.$mxs_t("fileFormat"))+" ")]),s("v-select",{staticClass:"vuetify-input--override mariadb-select-input error--text__bottom",attrs:{items:e.fileFormats,outlined:"",dense:"",height:36,"menu-props":{contentClass:"mariadb-select-v-menu",bottom:!0,offsetY:!0},"return-object":"","item-text":"extension","item-value":"contentType",rules:[function(t){return!!t||e.$mxs_t("errors.requiredInput",{inputName:"File format"})}],"hide-details":"auto",required:""},model:{value:e.selectedFormat,callback:function(t){e.selectedFormat=t},expression:"selectedFormat"}})],1)],1),"csv"===e.$typy(e.selectedFormat,"extension").safeObject?[s("v-row",{staticClass:"ma-n1"},e._l(e.csvOpts,(function(t,i){return s("v-col",{key:i,staticClass:"pa-1",attrs:{cols:"12",md:"12"}},["withHeaders"===i?[s("v-checkbox",{staticClass:"pa-0 mt-2 v-checkbox--custom-label",attrs:{color:"primary","hide-details":"auto",label:e.$mxs_t(i)},model:{value:e.csvOpts[i],callback:function(t){e.$set(e.csvOpts,i,t)},expression:"csvOpts[key]"}})]:[s("label",{staticClass:"field__label mxs-color-helper text-small-text"},[e._v(" "+e._s(e.$mxs_t(i))+" ")]),s("v-text-field",{staticClass:"vuetify-input--override error--text__bottom",attrs:{dense:"",outlined:"",height:36,rules:[function(t){return!!t||e.$mxs_t("errors.requiredInput",{inputName:e.$mxs_t(i)})}],"hide-details":"auto",required:""},model:{value:e.csvOpts[i],callback:function(t){e.$set(e.csvOpts,i,t)},expression:"csvOpts[key]"}})]],2)})),1)]:e._e()],2)]},proxy:!0}]),model:{value:e.isConfigDialogOpened,callback:function(t){e.isConfigDialogOpened=t},expression:"isConfigDialogOpened"}})]},proxy:!0}])},[e._v(" "+e._s(e.$mxs_t("exportResults"))+" ")])}),n=[],o=(s("5319"),{name:"result-export",props:{rows:{type:Array,required:!0},defExportFileName:{type:String,required:!0},headers:{type:Array,validator:e=>!e.length||e.filter(e=>"text"in e).length===e.length,required:!0}},data(){return{isFormValid:!1,isConfigDialogOpened:!1,selectedFormat:null,fileName:"",csvOpts:{fieldsTerminatedBy:"",linesTerminatedBy:"",nullReplacedBy:"",withHeaders:!1}}},computed:{fileFormats(){return[{contentType:"data:text/csv;charset=utf-8;",extension:"csv"},{contentType:"data:application/json;charset=utf-8;",extension:"json"}]},jsonData(){let e=[];for(let t=0;t<this.rows.length;++t){let s={};for(const[e,i]of this.headers.entries())s[""+i.text]=this.rows[t][e];e.push(s)}return JSON.stringify(e)},csvData(){let e=this.unescapedUserInput(this.csvOpts.fieldsTerminatedBy),t=this.unescapedUserInput(this.csvOpts.linesTerminatedBy),s="";if(this.csvOpts.withHeaders){let i=this.headers.map(e=>this.escapeCell(e.text));s=`${i.join(e)}${t}`}return s+=this.rows.map(t=>t.map(e=>this.escapeCell(e)).join(e)).join(t),`${s}${t}`}},watch:{isConfigDialogOpened(e){e?this.assignDefOpt():Object.assign(this.$data,this.$options.data())}},methods:{unescapedUserInput(e){try{let t=e;return t.includes("\\\\")&&(t=this.escapeCell(t)),JSON.parse('"'+t.replace(/"/g,'\\"')+'"')}catch(t){this.$logger("unescapedUserInput",t)}},escapeCell(e){return this.$typy(e).isNull?this.csvOpts.nullReplacedBy:this.$typy(e).isString?e.replace(/\\/g,"\\\\"):e},getData(e){switch(e){case"json":return this.jsonData;case"csv":return this.csvData}},getDefFileName(){return`${this.defExportFileName} - ${this.$helpers.dateFormat({moment:this.$moment,value:new Date,formatType:"DATE_RFC2822"})}`},openConfigDialog(){this.isConfigDialogOpened=!this.isConfigDialogOpened,this.fileName=this.getDefFileName()},onExport(){const{contentType:e,extension:t}=this.selectedFormat;let s=document.createElement("a");s.href=`${e},${encodeURIComponent(this.getData(t))}`,s.download=`${this.fileName}.${t}`,document.body.appendChild(s),s.click(),document.body.removeChild(s)},assignDefOpt(){this.csvOpts={fieldsTerminatedBy:"\\t",linesTerminatedBy:"\\n",nullReplacedBy:"\\N",withHeaders:!1},this.selectedFormat=this.fileFormats[0]}}}),l=o,c=s("2877"),d=s("6544"),u=s.n(d),_=s("ac7c"),h=s("62ad"),m=s("a523"),p=s("132d"),f=s("0fd9"),y=s("b974"),v=s("8654"),S=Object(c["a"])(l,a,n,!1,null,null,null),b=S.exports;u()(S,{VCheckbox:_["a"],VCol:h["a"],VContainer:m["a"],VIcon:p["a"],VRow:f["a"],VSelect:y["a"],VTextField:v["a"]});var x=s("2c3f"),g=s("2f62"),E={name:"result-data-table",components:{ResultExport:b,EditableCell:x["a"]},props:{headers:{type:Array,validator:e=>!e.length||e.filter(e=>"text"in e).length===e.length,required:!0},rows:{type:Array,required:!0},height:{type:Number,required:!0},width:{type:Number,required:!0},showSelect:{type:Boolean,default:!1},groupBy:{type:String,default:""},showGroupBy:{type:Boolean,default:!1},menuOpts:{type:Array,default:()=>[]},showEditBtn:{type:Boolean,default:!1},defExportFileName:{type:String,default:"MaxScale Query Results"}},data(){return{filterHeaderIdxs:[],visHeaderIdxs:[],filterKeyword:"",tableToolsHeight:0,isVertTable:!1,isGrouping:!1,selectedItems:[],showCtxMenu:!1,ctxMenuData:{},isEditing:!1,changedCells:[]}},computed:{...Object(g["e"])({SQL_RES_TBL_CTX_OPT_TYPES:e=>e.queryEditorConfig.config.SQL_RES_TBL_CTX_OPT_TYPES}),tableHeight(){return this.height-this.tableToolsHeight-8},draggable(){return!this.isEditing},tableHeaders(){let e=[];return this.headers.length&&(e=[{text:"#",maxWidth:"max-content"},...this.headers.map(e=>this.showGroupBy&&!this.$typy(e,"groupable").isDefined?{...e,groupable:!0,draggable:this.draggable}:{...e,draggable:this.draggable})]),e},rowsWithIndex(){return this.rows.map((e,t)=>[t+1,...e])},filteredRows_wo_idx(){return this.filteredRows.map(e=>e.filter((e,t)=>0!==t))},visHeaders_wo_idx(){return this.visibleHeaders.filter(e=>"#"!==e.text)},filteredRows(){return this.rowsWithIndex.filter(e=>{let t=!1;for(const[s,i]of e.entries())if((this.filterHeaderIdxs.includes(s)||!this.filterHeaderIdxs.length)&&this.handleFilter(i,this.filterKeyword,s)){t=!0;break}return t})},visibleHeaders(){return this.tableHeaders.map((e,t)=>this.visHeaderIdxs.includes(t)?e:{...e,hidden:!0})},activeRow(){return this.$typy(this.ctxMenuData,"row").safeArray},ctxMenuActivator(){return"#"+this.$typy(this.ctxMenuData,"activatorID").safeString},clipboardOpts(){const{CLIPBOARD:e}=this.SQL_RES_TBL_CTX_OPT_TYPES;return this.genTxtOpts(e)},insertOpts(){const{TXT_EDITOR:{INSERT:e}}=this.SQL_RES_TBL_CTX_OPT_TYPES;return this.genTxtOpts(e)},baseOpts(){return[{text:this.$mxs_t("placeToEditor"),children:this.insertOpts},{text:this.$mxs_t("copyToClipboard"),children:this.clipboardOpts}]},menuItems(){if(this.menuOpts.length){const{mergeWith:e,keyBy:t,values:s}=this.$helpers.lodash,i=s(e(t(this.baseOpts,"text"),t(this.menuOpts,"text"),(e,t)=>{if(Array.isArray(e))return e.concat(t)}));return i}return this.baseOpts}},watch:{showCtxMenu(e){e||(this.ctxMenuData={})}},activated(){this.setTableToolsHeight()},methods:{setTableToolsHeight(){this.$refs.tableTools&&(this.tableToolsHeight=this.$refs.tableTools.clientHeight)},handleFilter(e,t,s){const i=this.$typy(this.tableHeaders[s]).safeObjectOrEmpty;return i.filter?i.filter(e,t):this.$helpers.ciStrIncludes(""+e,t)},onCellRClick(e){const{activatorID:t}=e;this.$typy(this.ctxMenuData,"activatorID").safeString===t?(this.showCtxMenu=!1,this.ctxMenuData={}):(this.showCtxMenu=!0,this.ctxMenuData=e)},genTxtOpts(e){return[this.$mxs_t("fieldQuoted"),this.$mxs_t("field")].map(t=>({text:t,action:({opt:e,data:t})=>this.handleTxtOpt({opt:e,data:t}),type:e}))},processField(e){return this.$typy(e).isObject?""+e.name:""+e},handleTxtOpt({opt:e,data:t}){const{CLIPBOARD:s,TXT_EDITOR:{INSERT:i}}=this.SQL_RES_TBL_CTX_OPT_TYPES;let r="";switch(e.text){case this.$mxs_t("fieldQuoted"):r=this.$helpers.escapeIdentifiers(this.processField(t.cell));break;case this.$mxs_t("field"):r=this.processField(t.cell);break}switch(e.type){case i:this.$emit("place-to-editor",r);break;case s:this.$helpers.copyTextToClipboard(r);break}},onChooseOpt(e){e.action({opt:e,data:this.ctxMenuData})},handleEdit(){this.isEditing=!this.isEditing,this.isEditing||this.$emit("on-done-editing",this.changedCells)},toCellItem({rowData:e,cell:t,colName:s}){const i=this.tableHeaders.reduce((t,s,i)=>(t[s.text]=e[i],t),{}),r=i["#"],a={id:`rowId-${r}_colName-${s}`,rowId:r,colName:s,value:t,objRow:i};return a}}},T=E,O=(s("639e"),s("8336")),w=s("2fa4"),R=Object(c["a"])(T,i,r,!1,null,"bf90d264",null);t["a"]=R.exports;u()(R,{VBtn:O["a"],VIcon:p["a"],VSpacer:w["a"],VTextField:v["a"]})},b59b:function(e,t,s){"use strict";var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("mxs-tooltip-btn",{attrs:{btnClass:"toolbar-square-btn load-sql-btn",text:"",type:"file"},on:{click:e.handleFileOpen},scopedSlots:e._u([{key:"btn-content",fn:function(){return[s("v-icon",{attrs:{size:"18",color:"accent-dark"}},[e._v(" "+e._s(e.hasFileSystemReadOnlyAccess?"mdi-file-outline":"mdi-file-upload-outline")+" ")]),s("input",{ref:"uploader",staticClass:"d-none",attrs:{type:"file"},on:{input:e.onFileLoadChanged}})]},proxy:!0}])},[e._v(" "+e._s(e.$mxs_t("openScript"))+" "),s("br"),e._v(" "+e._s(e.OS_KEY)+" + O ")]),e.hasFileSystemRWAccess?s("mxs-tooltip-btn",{attrs:{btnClass:"toolbar-square-btn save-sql-btn",text:"",disabled:e.isSaveFileDisabled},on:{click:function(t){return e.saveFileToDisk(e.session)}},scopedSlots:e._u([{key:"btn-content",fn:function(){return[s("v-icon",{attrs:{size:"20",color:"accent-dark"}},[e._v("mdi-content-save-outline")])]},proxy:!0}],null,!1,3216756684)},[e._v(" "+e._s(e.$mxs_t("saveScript"))+" "),s("br"),e._v(" "+e._s(e.OS_KEY)+" + S ")]):e._e(),s("mxs-tooltip-btn",{attrs:{btnClass:"toolbar-square-btn save-sql-btn",text:"",disabled:e.isSaveFileAsDisabled},on:{click:function(t){return e.handleSaveFileAs(e.session)}},scopedSlots:e._u([{key:"btn-content",fn:function(){return[s("v-icon",{attrs:{size:"20",color:"accent-dark"}},[e._v("mdi-content-save-edit-outline")])]},proxy:!0}])},[e._v(" "+e._s(e.$mxs_t("saveScriptAs"))+" "),s("br"),e._v(" "+e._s(e.OS_KEY)+" + SHIFT + S ")])],1)},r=[],a=(s("b7ef"),s("2f62")),n=s("9771"),o=s("f67c"),l=s("cd52"),c={name:"file-btns-ctr",mixins:[l["a"]],props:{session:{type:Object,required:!0}},computed:{...Object(a["e"])({file_dlg_data:e=>e.editor.file_dlg_data,OS_KEY:e=>e.queryEditorConfig.config.OS_KEY}),...Object(a["c"])({getIsFileUnsavedBySessionId:"editor/getIsFileUnsavedBySessionId",hasFileSystemReadOnlyAccess:"editor/hasFileSystemReadOnlyAccess",hasFileSystemRWAccess:"editor/hasFileSystemRWAccess",checkSessFileHandleValidity:"editor/checkSessFileHandleValidity"}),isFileUnsaved(){return this.getIsFileUnsavedBySessionId(this.session.id)},isSaveFileDisabled(){return!this.isFileUnsaved||!this.checkSessFileHandleValidity(this.session)},isSaveFileAsDisabled(){return!this.isFileUnsaved},eventBus(){return o["a"]}},activated(){this.eventBus.$on("shortkey",this.shortKeyHandler)},deactivated(){this.eventBus.$off("shortkey")},methods:{...Object(a["d"])({SET_SNACK_BAR_MESSAGE:"mxsApp/SET_SNACK_BAR_MESSAGE",SET_QUERY_TXT:"editor/SET_QUERY_TXT",UPDATE_SESSION:"querySession/UPDATE_SESSION",SET_BLOB_FILE:"editor/SET_BLOB_FILE",SET_FILE_DLG_DATA:"editor/SET_FILE_DLG_DATA"}),getFileTextLegacy(e){const t=new FileReader;return new Promise((s,i)=>{t.onerror=()=>{t.abort(),i(new DOMException("Problem parsing input file.")),this.SET_SNACK_BAR_MESSAGE({text:[t.error],type:"error"})},t.onload=()=>{s(t.result)},t.readAsText(e)})},async getFileTxt(e){if(this.hasFileSystemReadOnlyAccess){const t=await e.getFile();return await t.text()}return this.getFileTextLegacy(e)},async onFileLoadChanged(e){const t={handle:e.target.files[0]};await this.handleLoadFile(t)},async openFileLegacy(){await this.$refs.uploader.click()},async openFile(){const e=await Object(n["a"])({description:"Text files"});await this.handleLoadFile(e)},async handleFileOpen(){this.hasFileSystemReadOnlyAccess?this.openFile():this.openFileLegacy()},async handleLoadFile(e){this.isFileUnsaved?this.SET_FILE_DLG_DATA({is_opened:!0,title:this.$mxs_t("openScript"),confirm_msg:this.$mxs_t("confirmations.openScript",{targetId:this.session.name,fileNameToBeOpened:e.handle.name}),on_save:async()=>{await this.handleSaveFile(this.session),await this.loadFileToActiveSession(e)},dont_save:async()=>{await this.loadFileToActiveSession(e),this.SET_FILE_DLG_DATA({...this.file_dlg_data,is_opened:!1})}}):await this.loadFileToActiveSession(e)},async loadFileToActiveSession(e){const t=await this.getFileTxt(e.handle);this.UPDATE_SESSION({...this.session,name:e.handle.name}),this.SET_QUERY_TXT({payload:t,id:this.session.id}),this.hasFileSystemReadOnlyAccess||(this.$refs.uploader.value=""),this.SET_BLOB_FILE({payload:{file_handle:e.handle,txt:t},id:this.session.id})},shortKeyHandler(e){switch(e){case"ctrl-o":case"mac-cmd-o":this.handleFileOpen();break;case"ctrl-s":case"mac-cmd-s":!this.isSaveFileDisabled&&this.hasFileSystemRWAccess&&this.saveFileToDisk(this.session);break;case"ctrl-shift-s":case"mac-cmd-shift-s":this.isSaveFileAsDisabled||this.handleSaveFileAs(this.session);break}}}},d=c,u=s("2877"),_=s("6544"),h=s.n(_),m=s("132d"),p=Object(u["a"])(d,i,r,!1,null,null,null);t["a"]=p.exports;h()(p,{VIcon:m["a"]})},cd3f:function(e,t,s){"use strict";var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("mxs-tooltip-btn",{attrs:{btnClass:"min-max-btn",icon:"",small:""},on:{click:function(t){return e.SET_FULLSCREEN(!e.is_fullscreen)}},scopedSlots:e._u([{key:"btn-content",fn:function(){return[s("v-icon",{attrs:{size:"22",color:"accent-dark"}},[e._v(" mdi-fullscreen"+e._s(e.is_fullscreen?"-exit":"")+" ")])]},proxy:!0}])},[e._v(" "+e._s(e.is_fullscreen?e.$mxs_t("minimize"):e.$mxs_t("maximize"))+" ")])},r=[],a=s("2f62"),n={name:"min-max-btn-ctr",computed:{...Object(a["e"])({is_fullscreen:e=>e.wke.is_fullscreen})},methods:{...Object(a["d"])({SET_FULLSCREEN:"wke/SET_FULLSCREEN"})}},o=n,l=s("2877"),c=s("6544"),d=s.n(c),u=s("132d"),_=Object(l["a"])(o,i,r,!1,null,null,null);t["a"]=_.exports;d()(_,{VIcon:u["a"]})},e643:function(e,t,s){"use strict";var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("row-limit",e._g(e._b({attrs:{items:e.SQL_DEF_ROW_LIMIT_OPTS},model:{value:e.value,callback:function(t){e.value=t},expression:"value"}},"row-limit",Object.assign({},e.$attrs),!1),e.$listeners))},r=[],a=s("2f62"),n=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("v-combobox",e._b({staticClass:"vuetify-input--override mariadb-select-input row-limit-dropdown row-limit-dropdown--fieldset-border",attrs:{outlined:"",dense:"","menu-props":{contentClass:"mariadb-select-v-menu",bottom:!0,offsetY:!0},rules:[function(t){return e.validate(t)}]},on:{keypress:function(t){return e.$helpers.preventNonNumericalVal(t)}},nativeOn:{input:function(t){return e.onInput.apply(null,arguments)}},scopedSlots:e._u([{key:"prepend-inner",fn:function(){return[e._t("prepend-inner")]},proxy:!0}],null,!0),model:{value:e.rowLimit,callback:function(t){e.rowLimit=e._n(t)},expression:"rowLimit"}},"v-combobox",Object.assign({},e.$attrs),!1))},o=[],l={name:"row-limit",inheritAttrs:!1,props:{value:{type:Number,required:!0}},computed:{rowLimit:{get(){return this.value},set(e){this.$typy(e).isNumber&&this.$typy(e).safeNumber>0&&this.$emit("input",e)}}},methods:{validate(e){const t=Number(e);return this.$typy(t).isNull?this.$mxs_t("errors.requiredInput",{inputName:this.$mxs_t("rowLimit")}):t<=0?this.$mxs_t("errors.largerThanZero",{inputName:"Value"}):!!this.$typy(t).isNumber||this.$mxs_t("errors.nonInteger")},onInput(e){this.rowLimit=Number(e.srcElement.value)}}},c=l,d=(s("9650"),s("2877")),u=s("6544"),_=s.n(u),h=s("2b5d"),m=Object(d["a"])(c,n,o,!1,null,null,null),p=m.exports;_()(m,{VCombobox:h["a"]});var f={name:"row-limit-ctr",components:{RowLimit:p},inheritAttrs:!1,computed:{...Object(a["e"])({SQL_DEF_ROW_LIMIT_OPTS:e=>e.queryEditorConfig.config.SQL_DEF_ROW_LIMIT_OPTS,query_row_limit:e=>e.queryPersisted.query_row_limit}),value:{get(){return this.query_row_limit},set(e){this.$emit("change",e)}}}},y=f,v=Object(d["a"])(y,i,r,!1,null,null,null);t["a"]=v.exports},f67c:function(e,t,s){"use strict";s.d(t,"a",(function(){return r}));var i=s("2b0e");const r=new i["default"]},fa7a:function(e,t,s){"use strict";var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"fill-height mxs-color-helper border-top-table-border"},[s("v-tabs",{staticClass:"v-tabs--mariadb-style",attrs:{height:24},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[s("v-tab",{attrs:{disabled:e.getIsConnBusy&&e.isLoading,color:"primary",href:"#"+e.SQL_QUERY_MODES.QUERY_VIEW}},[s("span",[e._v(" "+e._s(e.$mxs_t("results"))+" ")])]),s("v-tab",{attrs:{disabled:e.getIsConnBusy&&e.isLoading,color:"primary",href:"#"+e.SQL_QUERY_MODES.PRVW_DATA}},[s("span",[e._v(e._s(e.$mxs_t("dataPrvw"))+" ")])]),s("v-tab",{attrs:{color:"primary",href:"#"+e.SQL_QUERY_MODES.HISTORY}},[s("span",[e._v(e._s(e.$mxs_t("historyAndSnippets"))+" ")])])],1),s("v-slide-x-transition",[s("keep-alive",[e.activeTab===e.SQL_QUERY_MODES.QUERY_VIEW?s("results-tab",e._g({class:e.tabItemClass,style:{height:"calc(100% - 24px)"},attrs:{dynDim:e.componentDynDim,isLoading:e.isLoading,data:e.queryData,requestSentTime:e.requestSentTime,execTime:e.execTime,totalDuration:e.totalDuration}},e.$listeners)):e.activeTab===e.SQL_QUERY_MODES.PRVW_DATA||e.activeTab===e.SQL_QUERY_MODES.PRVW_DATA_DETAILS?s("data-prvw",e._g({class:e.tabItemClass,style:{height:"calc(100% - 24px)"},attrs:{dynDim:e.componentDynDim,currQueryMode:e.curr_query_mode,activePrvwTblNodeId:e.activePrvwTblNodeId,isLoading:e.isLoading,data:e.queryData,requestSentTime:e.requestSentTime,execTime:e.execTime,totalDuration:e.totalDuration}},e.$listeners)):s("history-and-snippets-ctr",e._g({class:e.tabItemClass,style:{height:"calc(100% - 24px)"},attrs:{dynDim:e.componentDynDim}},e.$listeners))],1)],1)],1)},r=[],a=s("2f62"),n=s("3f17"),o=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"fill-height"},[s("div",{ref:"header",staticClass:"pb-2 result-header d-flex align-center d-flex flex-row"},[e.isLoading?e._e():[e.queryTxt?s("v-menu",{attrs:{"offset-y":"",top:"",transition:"slide-y-transition","close-on-content-click":!1,"content-class":"shadow-drop mxs-color-helper text-navigation ","open-on-hover":"","nudge-left":"16"},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[s("span",e._g({staticClass:"mr-4 pointer mxs-color-helper text-anchor "},i),[e._v(" "+e._s(e.$mxs_t("queryTxt"))+" ")])]}}],null,!1,3460354464)},[s("v-sheet",{staticClass:"text-body-2 py-2 px-4 mxs-color-helper text-navigation"},[e._v(" "+e._s(e.queryTxt)+" ")])],1):s("i18n",{staticClass:"d-flex align-center",attrs:{path:"mxs.resultTabGuide",tag:"div"},scopedSlots:e._u([{key:"shortcut",fn:function(){return[e._v(" "),s("b",[e._v(e._s(e.OS_KEY)+" + SHIFT + ENTER")]),e._v(" ")]},proxy:!0},{key:"icon",fn:function(){return[e._v(" "),s("v-icon",{attrs:{color:"accent-dark",size:"16"}},[e._v("$vuetify.icons.mxs_running")]),e._v(" ")]},proxy:!0}],null,!1,3201134646)})],e.resultSetItems.length?s("v-menu",{attrs:{transition:"slide-y-transition","offset-y":"",left:"","content-class":"mariadb-select-v-menu mariadb-select-v-menu--full-border","close-on-content-click":""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,r=t.attrs,a=t.value;return[s("v-btn",e._g(e._b({staticClass:"text-capitalize font-weight-medium",attrs:{"x-small":"",outlined:"",depressed:"",color:e.isErrorTab?"error":"accent-dark"}},"v-btn",r,!1),i),[e._v(" "+e._s(e.activeResSet)+" "),s("v-icon",{class:[a?"rotate-up":"rotate-down"],attrs:{size:"24"}},[e._v(" mdi-menu-down ")])],1)]}}],null,!1,4055827587),model:{value:e.isResultSetsMenuOpened,callback:function(t){e.isResultSetsMenuOpened=t},expression:"isResultSetsMenuOpened"}},[s("virtual-list",{ref:"resultSetItems",staticClass:"result-sets-list",style:{maxHeight:"300px"},attrs:{"data-key":"id","data-sources":e.resultSetItems,"data-component":e.ResultSetItem,"item-class":"result-set-item","extra-props":{activeId:e.activeResSet,errorTabId:e.errorTabId,onClick:e.onClickResSetTab},"estimate-size":36},model:{value:e.activeResSet,callback:function(t){e.activeResSet=t},expression:"activeResSet"}})],1):e._e(),s("v-spacer"),s("keep-alive",[e.requestSentTime?s("duration-timer",{attrs:{startTime:e.requestSentTime,executionTime:e.execTime,totalDuration:e.totalDuration}}):e._e()],1),e.$typy(e.resultData[e.activeResSet],"data").isDefined&&!e.resultData[e.activeResSet].complete?s("v-tooltip",{attrs:{top:"",transition:"slide-y-transition","content-class":"shadow-drop mxs-color-helper white text-navigation py-1 px-4"},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[s("div",e._g({staticClass:"ml-4 d-flex align-center"},i),[s("v-icon",{staticClass:"mr-2",attrs:{size:"16",color:"error"}},[e._v(" $vuetify.icons.mxs_alertWarning ")]),e._v(" "+e._s(e.$mxs_t("incomplete"))+" ")],1)]}}],null,!1,964479689)},[s("span",[e._v(" "+e._s(e.$mxs_t("info.queryIncomplete")))])]):e._e()],2),e.isLoading?s("v-skeleton-loader",{attrs:{loading:e.isLoading,type:"table: table-thead, table-tbody",height:e.resultTableHeight}}):e._l(e.resultData,(function(t,i){return s("keep-alive",{key:i},[e.activeResSet===i?[e.$typy(t,"data").isDefined?s("result-data-table",e._g({attrs:{height:e.resultTableHeight,width:e.dynDim.width,headers:t.fields.map((function(e){return{text:e}})),rows:t.data,showGroupBy:""}},e.$listeners)):s("div",{style:{height:e.resultTableHeight+"px"}},e._l(t,(function(t,i){return s("div",{key:i},[s("b",[e._v(e._s(i)+":")]),s("span",{staticClass:"d-inline-block ml-4"},[e._v(e._s(t))])])})),0)]:e._e()],2)}))],2)},l=[],c=(s("ddb0"),s("89c1")),d=s.n(c),u=s("a4a6"),_=s("786a"),h=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("v-list-item",{staticClass:"result-set-item pointer mxs-color-helper",class:{"text-error":e.isErrorTab,"result-set-item--active":e.activeId===e.source.id},on:{click:function(t){return e.onClick(e.source)}}},[e._v(" "+e._s(e.source.id)+" ")])},m=[],p={name:"result-set-item",props:{source:{type:Object,required:!0},activeId:{type:String,default:""},errorTabId:{type:String,default:""},onClick:{type:Function}},computed:{isErrorTab(){return this.source.id===this.errorTabId}}},f=p,y=(s("4070"),s("2877")),v=s("6544"),S=s.n(v),b=s("da13"),x=Object(y["a"])(f,h,m,!1,null,"ffbc1276",null),g=x.exports;S()(x,{VListItem:b["a"]});var E={name:"results-tab",components:{ResultDataTable:u["a"],DurationTimer:_["a"],VirtualList:d.a},props:{dynDim:{type:Object,validator(e){return"width"in e&&"height"in e},required:!0},isLoading:{type:Boolean,required:!0},data:{type:Object,required:!0},requestSentTime:{type:Number,required:!0},execTime:{type:Number,required:!0},totalDuration:{type:Number,required:!0}},data(){return{headerHeight:0,activeResSet:"",runSeconds:0,isResultSetsMenuOpened:!1}},computed:{...Object(a["e"])({OS_KEY:e=>e.queryEditorConfig.config.OS_KEY}),ResultSetItem(){return g},queryTxt(){return this.$typy(this.data,"data.attributes.sql").safeObject},resultSetItems(){return Object.keys(this.resultData).map(e=>({id:e}))},resultData(){if(this.$typy(this.data,"data.attributes.results").isDefined){let e={},t=0,s=0;for(const i of this.data.data.attributes.results)this.$typy(i,"data").isDefined?(++t,e["Result set "+t]=i):this.$typy(i,"errno").isDefined?e[this.errorTabId]=i:(++s,e["Result "+s]=i);return e}return{}},resultTableHeight(){return this.dynDim.height-this.headerHeight},errorTabId(){return"Error"},isErrorTab(){return this.activeResSet===this.errorTabId}},watch:{isResultSetsMenuOpened(e){e&&this.$helpers.doubleRAF(()=>{this.isErrorTab&&this.$refs.resultSetItems.scrollToBottom()})}},activated(){this.setHeaderHeight(),this.watch_resultSetItems()},deactivated(){this.$typy(this.unwatch_resultSetItems).safeFunction()},methods:{watch_resultSetItems(){this.unwatch_resultSetItems=this.$watch("resultSetItems",e=>{if(e.length){const t=e.findIndex(e=>e.id===this.errorTabId);this.activeResSet=t>=0?e[t].id:e[0].id}},{immediate:!0})},setHeaderHeight(){this.$refs.header&&(this.headerHeight=this.$refs.header.clientHeight)},onClickResSetTab(e){this.activeResSet=e.id}}},T=E,O=(s("0b03"),s("8336")),w=s("132d"),R=s("e449"),C=s("8dd9"),D=s("3129"),q=s("2fa4"),I=s("3a2f"),$=Object(y["a"])(T,o,l,!1,null,"63f13b94",null),k=$.exports;S()($,{VBtn:O["a"],VIcon:w["a"],VMenu:R["a"],VSheet:C["a"],VSkeletonLoader:D["a"],VSpacer:q["a"],VTooltip:I["a"]});var L=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"fill-height"},[s("div",{ref:"header",staticClass:"pb-2 result-header d-flex align-center"},[s("v-tabs",{staticClass:"v-tabs--query-editor-style",attrs:{"hide-slider":"",height:20},model:{value:e.activeView,callback:function(t){e.activeView=t},expression:"activeView"}},[s("v-tab",{key:e.SQL_QUERY_MODES.HISTORY,staticClass:"tab-btn px-3 text-uppercase",attrs:{href:"#"+e.SQL_QUERY_MODES.HISTORY,"active-class":"tab-btn--active font-weight-medium"}},[e._v(" "+e._s(e.$mxs_t("history"))+" ")]),s("v-tab",{key:e.SQL_QUERY_MODES.SNIPPETS,staticClass:"tab-btn px-3 text-uppercase",attrs:{href:"#"+e.SQL_QUERY_MODES.SNIPPETS,"active-class":"tab-btn--active font-weight-medium"}},[e._v(" "+e._s(e.$mxs_t("snippets"))+" ")])],1)],1),s("keep-alive",[e.persistedQueryData.length?[e.activeView===e.SQL_QUERY_MODES.HISTORY||e.activeView===e.SQL_QUERY_MODES.SNIPPETS?s("table-list",e._g({key:e.activeView,attrs:{height:e.dynDim.height-e.headerHeight,width:e.dynDim.width,headers:e.headers,rows:e.currRows,showSelect:"",showGroupBy:"",groupBy:"date",menuOpts:e.menuOpts,showEditBtn:e.activeView===e.SQL_QUERY_MODES.SNIPPETS,defExportFileName:"MaxScale Query "+(e.activeView===e.SQL_QUERY_MODES.HISTORY?"History":"Snippets")},on:{"on-delete-selected":e.handleDeleteSelectedRows,"on-done-editing":e.onDoneEditingSnippets},scopedSlots:e._u([{key:"header-connection_name",fn:function(e){var t=e.data,i=t.maxWidth,r=t.activatorID;return[s("mxs-truncate-str",{attrs:{tooltipItem:{txt:"Connection Name",activatorID:r},maxWidth:i}})]}},e.activeView===e.SQL_QUERY_MODES.SNIPPETS?{key:"header-name",fn:function(){return[e._v(" "+e._s(e.$mxs_t("prefix"))+" ")]},proxy:!0}:null,{key:"date",fn:function(t){var i=t.data,r=i.cell,a=i.maxWidth,n=i.activatorID,o=i.isDragging,l=i.search;return[s("mxs-truncate-str",{directives:[{name:"mxs-highlighter",rawName:"v-mxs-highlighter",value:{keyword:l,txt:e.formatDate(r)},expression:"{ keyword: search, txt: formatDate(cell) }"}],key:r,attrs:{disabled:o,tooltipItem:{txt:""+e.formatDate(r),activatorID:n},maxWidth:a}})]}},{key:"action",fn:function(t){var i=t.data,r=i.cell,a=i.maxWidth,n=i.isDragging,o=i.search;return[s("v-tooltip",{key:r.name,attrs:{top:"",transition:"slide-y-transition","content-class":"shadow-drop mxs-color-helper white text-navigation pa-2 pb-4",disabled:n},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[s("span",e._g({directives:[{name:"mxs-highlighter",rawName:"v-mxs-highlighter",value:{keyword:o,txt:r.name},expression:"{ keyword: search, txt: cell.name }"}],staticClass:"d-inline-block text-truncate",style:{maxWidth:a+"px"}},i),[e._v(" "+e._s(r.name)+" ")])]}}],null,!0)},[s("table",{staticClass:"action-table-tooltip px-1"},[s("caption",{staticClass:"text-left font-weight-bold mb-3 pl-1"},[e._v(" "+e._s(e.$mxs_t("queryResInfo"))+" "),s("v-divider",{staticClass:"mxs-color-helper border-separator"})],1),e._l(r,(function(t,i){return s("tr",{key:""+i},["type"!==i?[s("td",[e._v(" "+e._s(i)+" ")]),s("td",{class:{"text-truncate":"response"!==i},style:{maxWidth:"600px",whiteSpace:"response"!==i?"nowrap":"pre-line"}},[e._v(" "+e._s(t)+" ")])]:e._e()],2)}))],2)])]}},e.activeView===e.SQL_QUERY_MODES.HISTORY?{key:"left-table-tools-append",fn:function(){return[s("div",{staticClass:"ml-2"},[s("mxs-filter-list",{attrs:{selectAllOnActivated:"",label:e.$mxs_t("logTypes"),items:e.queryLogTypes,returnObject:"",maxHeight:200},model:{value:e.selectedLogTypes,callback:function(t){e.selectedLogTypes=t},expression:"selectedLogTypes"}})],1)]},proxy:!0}:null],null,!0)},e.$listeners)):e._e()]:s("i18n",{staticClass:"d-flex align-center",attrs:{path:e.activeView===e.SQL_QUERY_MODES.HISTORY?"mxs.historyTabGuide":"mxs.snippetTabGuide",tag:"span"},scopedSlots:e._u([{key:"shortcut",fn:function(){return[e._v(" "),s("b",[e._v(e._s(e.OS_KEY)+" + S")]),e._v(" ")]},proxy:!0},{key:"icon",fn:function(){return[e._v(" "),s("v-icon",{attrs:{color:"accent-dark",size:"16"}},[e._v("mdi-star-plus-outline")]),e._v(" ")]},proxy:!0}])})],2),s("mxs-conf-dlg",{attrs:{title:e.activeView===e.SQL_QUERY_MODES.HISTORY?e.$mxs_t("clearSelectedQueries",{targetType:e.$mxs_t("queryHistory")}):e.$mxs_t("deleteSnippets"),saveText:"delete",minBodyWidth:"624px",onSave:e.deleteSelectedRows},scopedSlots:e._u([{key:"confirm-text",fn:function(){return[s("p",[e._v(" "+e._s(e.$mxs_t("info.clearSelectedQueries",{quantity:e.itemsToBeDeleted.length===e.rows.length?e.$mxs_t("entire"):e.$mxs_t("selected"),targetType:e.$mxs_t(e.activeView===e.SQL_QUERY_MODES.HISTORY?"queryHistory":"snippets")}))+" ")])]},proxy:!0}]),model:{value:e.isConfDlgOpened,callback:function(t){e.isConfDlgOpened=t},expression:"isConfDlgOpened"}})],1)},Q=[],M=(s("caad"),{name:"history-and-snippets-ctr",components:{"table-list":u["a"]},props:{dynDim:{type:Object,validator(e){return"width"in e&&"height"in e},required:!0}},data(){return{headerHeight:0,itemsToBeDeleted:[],selectedLogTypes:[],isConfDlgOpened:!1}},computed:{...Object(a["e"])({OS_KEY:e=>e.queryEditorConfig.config.OS_KEY,SQL_QUERY_MODES:e=>e.queryEditorConfig.config.SQL_QUERY_MODES,QUERY_LOG_TYPES:e=>e.queryEditorConfig.config.QUERY_LOG_TYPES,SQL_RES_TBL_CTX_OPT_TYPES:e=>e.queryEditorConfig.config.SQL_RES_TBL_CTX_OPT_TYPES,curr_query_mode:e=>e.queryResult.curr_query_mode,query_history:e=>e.queryPersisted.query_history,query_snippets:e=>e.queryPersisted.query_snippets}),...Object(a["c"])({getActiveSessionId:"querySession/getActiveSessionId"}),activeView:{get(){return this.curr_query_mode},set(e){this.curr_query_mode!==this.SQL_QUERY_MODES.HISTORY&&this.curr_query_mode!==this.SQL_QUERY_MODES.SNIPPETS||this.SET_CURR_QUERY_MODE({payload:e,id:this.getActiveSessionId})}},queryLogTypes(){return Object.values(this.QUERY_LOG_TYPES).map(e=>({text:e}))},headers(){let e=[];switch(this.activeView){case this.SQL_QUERY_MODES.HISTORY:e=this.query_history;break;case this.SQL_QUERY_MODES.SNIPPETS:e=this.query_snippets}return Object.keys(this.$typy(e[0]).safeObjectOrEmpty).map(e=>{let t={text:e,capitalize:!0};switch(e){case"date":t.width=150,t.customGroup=e=>{const{rows:t,idx:s}=e;let i=new Map;return t.forEach(e=>{const t=this.$helpers.dateFormat({moment:this.$moment,value:e[s],formatType:"ddd, DD MMM YYYY"});let r=i.get(t)||[];r.push(e),i.set(t,r)}),i},t.filter=(e,t)=>this.$helpers.ciStrIncludes(this.$helpers.dateFormat({moment:this.$moment,value:e,formatType:"ddd, DD MMM YYYY"}),t);break;case"connection_name":t.width=215;break;case"time":t.width=90,t.groupable=!1;break;case"action":t.groupable=!1,t.filter=(e,t)=>this.$helpers.ciStrIncludes(JSON.stringify(e),t);break;case"name":t.width=240,this.activeView===this.SQL_QUERY_MODES.SNIPPETS&&(t.editableCol=!0);break;case"sql":this.activeView===this.SQL_QUERY_MODES.SNIPPETS&&(t.editableCol=!0)}return t})},persistedQueryData(){switch(this.activeView){case this.SQL_QUERY_MODES.HISTORY:return this.query_history;case this.SQL_QUERY_MODES.SNIPPETS:return this.query_snippets;default:return[]}},rows(){return this.persistedQueryData.map(e=>Object.values(e))},currRows(){let e=this.persistedQueryData;switch(this.activeView){case this.SQL_QUERY_MODES.HISTORY:{const t=this.selectedLogTypes.map(e=>e.text);e=e.filter(e=>t.includes(e.action.type));break}}return e.map(e=>Object.values(e))},menuOpts(){const{CLIPBOARD:e,TXT_EDITOR:{INSERT:t}}=this.SQL_RES_TBL_CTX_OPT_TYPES;return[{text:this.$mxs_t("copyToClipboard"),children:[{text:"SQL",type:e,action:({opt:e,data:t})=>this.txtOptHandler({opt:e,data:t})}]},{text:this.$mxs_t("placeToEditor"),children:[{text:"SQL",type:t,action:({opt:e,data:t})=>this.txtOptHandler({opt:e,data:t})}]}]}},activated(){this.setHeaderHeight()},methods:{...Object(a["d"])({SET_CURR_QUERY_MODE:"queryResult/SET_CURR_QUERY_MODE",SET_QUERY_HISTORY:"queryPersisted/SET_QUERY_HISTORY",SET_QUERY_SNIPPETS:"queryPersisted/SET_QUERY_SNIPPETS"}),setHeaderHeight(){this.$refs.header&&(this.headerHeight=this.$refs.header.clientHeight)},handleDeleteSelectedRows(e){this.itemsToBeDeleted=e,this.isConfDlgOpened=!0},deleteSelectedRows(){const{cloneDeep:e,xorWith:t,isEqual:s}=this.$helpers.lodash;let i=e(this.itemsToBeDeleted).map(e=>e.filter((e,t)=>0!==t));const r=t(this.rows,i,s),a=this.$helpers.getObjectRows({columns:this.headers.map(e=>e.text),rows:r});this["SET_QUERY_"+this.activeView](a)},txtOptHandler({opt:e,data:t}){let s,i,r=this.$helpers.getObjectRows({columns:this.headers.map(e=>e.text),rows:[t.row.filter((e,t)=>0!==t)]});switch(this.activeView){case this.SQL_QUERY_MODES.HISTORY:i=r[0].action.name,s=r[0].action.sql;break;case this.SQL_QUERY_MODES.SNIPPETS:s=r[0].sql}const{TXT_EDITOR:{INSERT:a},CLIPBOARD:n}=this.SQL_RES_TBL_CTX_OPT_TYPES;let o=s||i;switch(e.type){case n:this.$helpers.copyTextToClipboard(o);break;case a:this.$emit("place-to-editor",o);break}},onDoneEditingSnippets(e){const{cloneDeep:t,isEqual:s}=this.$helpers.lodash;let i=t(e),r=t(this.query_snippets);i.forEach(e=>{delete e.objRow["#"];const t=this.query_snippets.findIndex(t=>s(t,e.objRow));t>-1&&(r[t]={...r[t],[e.colName]:e.value})}),this.SET_QUERY_SNIPPETS(r)},formatDate(e){return this.$helpers.dateFormat({moment:this.$moment,value:e,formatType:"ddd, DD MMM YYYY"})}}}),Y=M,A=(s("a11e"),s("ce7e")),F=s("71a3"),H=s("fe57"),P=Object(y["a"])(Y,L,Q,!1,null,"5a7cd7ef",null),N=P.exports;S()(P,{VDivider:A["a"],VIcon:w["a"],VTab:F["a"],VTabs:H["a"],VTooltip:I["a"]});var U={name:"query-result-ctr",components:{DataPrvw:n["a"],ResultsTab:k,HistoryAndSnippetsCtr:N},props:{dynDim:{type:Object,validator(e){return"width"in e&&"height"in e},required:!0}},data(){return{tabItemClass:"pt-2 px-5 query-result-ctr-fontStyle mxs-color-helper text-small-text"}},computed:{...Object(a["e"])({SQL_QUERY_MODES:e=>e.queryEditorConfig.config.SQL_QUERY_MODES,curr_query_mode:e=>e.queryResult.curr_query_mode}),...Object(a["c"])({getIsConnBusy:"queryConn/getIsConnBusy",getUserQueryRes:"queryResult/getUserQueryRes",getPrvwData:"queryResult/getPrvwData",getActiveSessionId:"querySession/getActiveSessionId",getActivePrvwTblNode:"schemaSidebar/getActivePrvwTblNode"}),componentDynDim(){return{width:this.dynDim.width-40,height:this.dynDim.height-24-8}},activeTab:{get(){switch(this.curr_query_mode){case this.SQL_QUERY_MODES.PRVW_DATA_DETAILS:case this.SQL_QUERY_MODES.PRVW_DATA:return this.SQL_QUERY_MODES.PRVW_DATA;case this.SQL_QUERY_MODES.SNIPPETS:case this.SQL_QUERY_MODES.HISTORY:return this.SQL_QUERY_MODES.HISTORY;default:return this.curr_query_mode}},set(e){this.SET_CURR_QUERY_MODE({payload:e,id:this.getActiveSessionId})}},isLoading(){return this.$typy(this.queryData,"is_loading").safeBoolean},queryData(){const{QUERY_VIEW:e,PRVW_DATA:t,PRVW_DATA_DETAILS:s}=this.SQL_QUERY_MODES;switch(this.curr_query_mode){case e:return this.getUserQueryRes;case t:case s:return this.getPrvwData(this.curr_query_mode);default:return{}}},requestSentTime(){return this.$typy(this.queryData,"request_sent_time").safeNumber},execTime(){if(this.isLoading)return-1;const e=this.$typy(this.queryData,"data.attributes.execution_time").safeNumber;return e?parseFloat(e.toFixed(4)):0},totalDuration(){return this.$typy(this.queryData,"total_duration").safeNumber},activePrvwTblNodeId(){return this.$typy(this.getActivePrvwTblNode,"id").safeString}},methods:{...Object(a["d"])({SET_CURR_QUERY_MODE:"queryResult/SET_CURR_QUERY_MODE"})}},V=U,B=(s("547a"),s("0789")),j=Object(y["a"])(V,i,r,!1,null,"5a19da3b",null);t["a"]=j.exports;S()(j,{VSlideXTransition:B["d"],VTab:F["a"],VTabs:H["a"]})}}]);
Coded by KALI :v Greetz to DR HARD ../ kali.zbi@hotmail.com