~ 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~06837ae4.e8a648ac.js |
(function(e){function t(t){for(var s,r,n=t[0],c=t[1],l=t[2],d=0,u=[];d<n.length;d++)r=n[d],Object.prototype.hasOwnProperty.call(i,r)&&i[r]&&u.push(i[r][0]),i[r]=0;for(s in c)Object.prototype.hasOwnProperty.call(c,s)&&(e[s]=c[s]);p&&p(t);while(u.length)u.shift()();return o.push.apply(o,l||[]),a()}function a(){for(var e,t=0;t<o.length;t++){for(var a=o[t],s=!0,r=1;r<a.length;r++){var n=a[r];0!==i[n]&&(s=!1)}s&&(o.splice(t--,1),e=c(c.s=a[0]))}return e}var s={},r={"app~06837ae4":0},i={"app~06837ae4":0},o=[];function n(e){return c.p+"js/"+({"cluster-detail~062cc45a":"cluster-detail~062cc45a","dsh-filters~f2ddec43":"dsh-filters~f2ddec43","dsh-listeners~1eec58a3":"dsh-listeners~1eec58a3","dsh-servers~a204d7be":"dsh-servers~a204d7be","dsh-services~71e885bc":"dsh-services~71e885bc","dsh-sessions~3a91f2c8":"dsh-sessions~3a91f2c8","filter-detail~eb71885e":"filter-detail~eb71885e","listener-detail~d69e0970":"listener-detail~d69e0970","login~08e2bc19":"login~08e2bc19","logs~c667b1c3":"logs~c667b1c3","monitor-detail~7d33e2e2":"monitor-detail~7d33e2e2","not-found-page~cb4b6b25":"not-found-page~cb4b6b25","dsh~9d039f3a":"dsh~9d039f3a","server-detail~112ced2d":"server-detail~112ced2d","service-detail~9452d869":"service-detail~9452d869","settings~942c45a7":"settings~942c45a7","query-page~0f3152c4":"query-page~0f3152c4","users~368a3cdd":"users~368a3cdd","vis-clusters~d4ecaaa3":"vis-clusters~d4ecaaa3","vis-conf~d4ecaaa3":"vis-conf~d4ecaaa3","vis~4a6ae84a":"vis~4a6ae84a"}[e]||e)+"."+{"cluster-detail~062cc45a":"2a83179a","dsh-filters~f2ddec43":"80ff5967","dsh-listeners~1eec58a3":"9a6d90cc","dsh-servers~a204d7be":"7d4b403d","dsh-services~71e885bc":"92387efe","dsh-sessions~3a91f2c8":"d9d4957f","filter-detail~eb71885e":"e760afc0","listener-detail~d69e0970":"c4a17415","login~08e2bc19":"637e3e65","logs~c667b1c3":"84bedda4","monitor-detail~7d33e2e2":"75f66892","not-found-page~cb4b6b25":"cce29836","dsh~9d039f3a":"ae578c17","server-detail~112ced2d":"92c7dca1","service-detail~9452d869":"7da5641f","settings~942c45a7":"54e7d77e","query-page~0f3152c4":"710104d1","users~368a3cdd":"49958640","vis-clusters~d4ecaaa3":"daee749b","vis-conf~d4ecaaa3":"4d2dfd3e","vis~4a6ae84a":"56ff1606"}[e]+".js"}function c(t){if(s[t])return s[t].exports;var a=s[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,c),a.l=!0,a.exports}c.e=function(e){var t=[],a={"cluster-detail~062cc45a":1,"dsh-servers~a204d7be":1,"login~08e2bc19":1,"logs~c667b1c3":1,"monitor-detail~7d33e2e2":1,"server-detail~112ced2d":1,"users~368a3cdd":1,"vis-clusters~d4ecaaa3":1,"vis-conf~d4ecaaa3":1,"vis~4a6ae84a":1};r[e]?t.push(r[e]):0!==r[e]&&a[e]&&t.push(r[e]=new Promise((function(t,a){for(var s="css/"+({"cluster-detail~062cc45a":"cluster-detail~062cc45a","dsh-filters~f2ddec43":"dsh-filters~f2ddec43","dsh-listeners~1eec58a3":"dsh-listeners~1eec58a3","dsh-servers~a204d7be":"dsh-servers~a204d7be","dsh-services~71e885bc":"dsh-services~71e885bc","dsh-sessions~3a91f2c8":"dsh-sessions~3a91f2c8","filter-detail~eb71885e":"filter-detail~eb71885e","listener-detail~d69e0970":"listener-detail~d69e0970","login~08e2bc19":"login~08e2bc19","logs~c667b1c3":"logs~c667b1c3","monitor-detail~7d33e2e2":"monitor-detail~7d33e2e2","not-found-page~cb4b6b25":"not-found-page~cb4b6b25","dsh~9d039f3a":"dsh~9d039f3a","server-detail~112ced2d":"server-detail~112ced2d","service-detail~9452d869":"service-detail~9452d869","settings~942c45a7":"settings~942c45a7","query-page~0f3152c4":"query-page~0f3152c4","users~368a3cdd":"users~368a3cdd","vis-clusters~d4ecaaa3":"vis-clusters~d4ecaaa3","vis-conf~d4ecaaa3":"vis-conf~d4ecaaa3","vis~4a6ae84a":"vis~4a6ae84a"}[e]||e)+"."+{"cluster-detail~062cc45a":"3c3785db","dsh-filters~f2ddec43":"31d6cfe0","dsh-listeners~1eec58a3":"31d6cfe0","dsh-servers~a204d7be":"04ab5056","dsh-services~71e885bc":"31d6cfe0","dsh-sessions~3a91f2c8":"31d6cfe0","filter-detail~eb71885e":"31d6cfe0","listener-detail~d69e0970":"31d6cfe0","login~08e2bc19":"b98a52cd","logs~c667b1c3":"cc1b857a","monitor-detail~7d33e2e2":"2badb192","not-found-page~cb4b6b25":"31d6cfe0","dsh~9d039f3a":"31d6cfe0","server-detail~112ced2d":"07f98fd1","service-detail~9452d869":"31d6cfe0","settings~942c45a7":"31d6cfe0","query-page~0f3152c4":"31d6cfe0","users~368a3cdd":"6f8cb2ac","vis-clusters~d4ecaaa3":"17c6cfe0","vis-conf~d4ecaaa3":"ac62bd85","vis~4a6ae84a":"b11813b0"}[e]+".css",i=c.p+s,o=document.getElementsByTagName("link"),n=0;n<o.length;n++){var l=o[n],d=l.getAttribute("data-href")||l.getAttribute("href");if("stylesheet"===l.rel&&(d===s||d===i))return t()}var u=document.getElementsByTagName("style");for(n=0;n<u.length;n++){l=u[n],d=l.getAttribute("data-href");if(d===s||d===i)return t()}var p=document.createElement("link");p.rel="stylesheet",p.type="text/css",p.onload=t,p.onerror=function(t){var s=t&&t.target&&t.target.src||i,o=new Error("Loading CSS chunk "+e+" failed.\n("+s+")");o.code="CSS_CHUNK_LOAD_FAILED",o.request=s,delete r[e],p.parentNode.removeChild(p),a(o)},p.href=i;var m=document.getElementsByTagName("head")[0];m.appendChild(p)})).then((function(){r[e]=0})));var s=i[e];if(0!==s)if(s)t.push(s[2]);else{var o=new Promise((function(t,a){s=i[e]=[t,a]}));t.push(s[2]=o);var l,d=document.createElement("script");d.charset="utf-8",d.timeout=120,c.nc&&d.setAttribute("nonce",c.nc),d.src=n(e);var u=new Error;l=function(t){d.onerror=d.onload=null,clearTimeout(p);var a=i[e];if(0!==a){if(a){var s=t&&("load"===t.type?"missing":t.type),r=t&&t.target&&t.target.src;u.message="Loading chunk "+e+" failed.\n("+s+": "+r+")",u.name="ChunkLoadError",u.type=s,u.request=r,a[1](u)}i[e]=void 0}};var p=setTimeout((function(){l({type:"timeout",target:d})}),12e4);d.onerror=d.onload=l,document.head.appendChild(d)}return Promise.all(t)},c.m=e,c.c=s,c.d=function(e,t,a){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},c.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(c.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)c.d(a,s,function(t){return e[t]}.bind(null,s));return a},c.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="/",c.oe=function(e){throw console.error(e),e};var l=window["webpackJsonp"]=window["webpackJsonp"]||[],d=l.push.bind(l);l.push=t,l=l.slice();for(var u=0;u<l.length;u++)t(l[u]);var p=d;o.push([0,"npm.vuetify~dde583c9","npm.vuetify~78934547","npm.vuetify~1655f327","npm.vuetify~ff5aaa04","npm.vuetify~ce053847","npm.vuetify~4548d73a","npm.monaco-editor~7f323393","npm.monaco-editor~232a5379","npm.monaco-editor~dc82c3b2","npm.monaco-editor~e69ef85d","npm.monaco-editor~708d4deb","npm.monaco-editor~b6351802","npm.monaco-editor~c682183c","npm.monaco-editor~afac97b9","npm.monaco-editor~f6e880b5","npm.monaco-editor~ba2d52b5","npm.monaco-editor~68080a8a","npm.monaco-editor~c01cf258","npm.monaco-editor~c072c46e","npm.monaco-editor~0616465c","npm.monaco-editor~a03ee73f","npm.monaco-editor~6ddf31e8","npm.monaco-editor~3be69868","npm.monaco-editor~5e1bc0de","npm.monaco-editor~84989cc6","npm.monaco-editor~988ffb2d","npm.monaco-editor~3efbcf91","npm.monaco-editor~85a20469","npm.monaco-editor~e66ff6d3","npm.monaco-editor~239fd193","npm.monaco-editor~c0432481","npm.monaco-editor~64692a41","npm.monaco-editor~a4cc8719","npm.monaco-editor~4d911f2e","npm.monaco-editor~a0249eb0","npm.monaco-editor~d13273ef","npm.monaco-editor~e8d92a51","npm.monaco-editor~73fd9c41","npm.monaco-editor~0da25470","npm.monaco-editor~900aca88","npm.monaco-editor~39c4d835","npm.monaco-editor~fd79f283","npm.monaco-editor~1c28f7ca","npm.monaco-editor~89281111","npm.monaco-editor~28194483","npm.monaco-editor~58c4d15b","npm.monaco-editor~6c43a7dc","npm.monaco-editor~4b5f38f5","npm.monaco-editor~d0306782","npm.monaco-editor~12be0fc8","npm.monaco-editor~f7d19227","npm.monaco-editor~57c220dc","npm.monaco-editor~65e15191","npm.monaco-editor~557e3966","app~d0ae3f07","app~8243f3f5","app~7e5e8261","app~739cf782","app~46fbf940","app~b5906859","app~7d359b94","app~f877049c","app~b6c02074","app~b58f7129","app~1c3a2c3f","app~fdc6512a","app~02576867","app~0605657e","app~05ca0e47","app~d2305125","app~d2612881","app~f6d1a70f","app~30fcdedb","app~be308985","app~8ddf6a32","app~05fdab88","app~d51544e1","app~1683f77b","app~a35be4f5","app~f251ad10","app~4e350ea9"]),a()})({"08d6":function(e,t,a){"use strict";a("a18cd")},4360:function(e,t,a){"use strict";a.r(t);var s=a("2f62"),r=a("c9d9"),i=(a("ddb0"),a("13d5"),{namespaced:!0,state:{all_filters:[],current_filter:{}},mutations:{SET_ALL_FILTERS(e,t){e.all_filters=t},SET_CURRENT_FILTER(e,t){e.current_filter=t}},actions:{async fetchAllFilters({commit:e}){try{let t=await this.vue.$http.get("/filters");t.data.data&&e("SET_ALL_FILTERS",t.data.data)}catch(t){const e=this.vue.$logger("store-filter-fetchAllFilters");e.error(t)}},async fetchFilterById({commit:e},t){try{let a=await this.vue.$http.get("/filters/"+t);a.data.data&&e("SET_CURRENT_FILTER",a.data.data)}catch(a){const e=this.vue.$logger("store-filter-fetchFilterById");e.error(a)}},async createFilter({commit:e},t){try{const a={data:{id:t.id,type:"filters",attributes:{module:t.module,parameters:t.parameters}}};let s=await this.vue.$http.post("/filters",a),r=[`Filter ${t.id} is created`];204===s.status&&(e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:r,type:"success"},{root:!0}),await this.vue.$typy(t.callback).safeFunction())}catch(a){const e=this.vue.$logger("store-filter-createFilter");e.error(a)}},async updateFilterParameters({commit:e},t){try{const a={data:{id:t.id,type:"filters",attributes:{parameters:t.parameters}}};let s=await this.vue.$http.patch("/filters/"+t.id,a);204===s.status&&(e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:[`Parameters of ${t.id} is updated`],type:"success"},{root:!0}),await this.vue.$typy(t.callback).safeFunction())}catch(a){const e=this.vue.$logger("store-filter-updateFilterParameters");e.error(a)}},async destroyFilter({dispatch:e,commit:t},a){try{let s=await this.vue.$http.delete(`/filters/${a}?force=yes`);204===s.status&&(await e("fetchAllFilters"),t("mxsApp/SET_SNACK_BAR_MESSAGE",{text:[`Filter ${a} is destroyed`],type:"success"},{root:!0}))}catch(s){const e=this.vue.$logger("store-filter-destroyFilter");e.error(s)}}},getters:{getTotalFilters:e=>e.all_filters.length,getAllFiltersMap:e=>{let t=new Map;return e.all_filters.forEach(e=>{t.set(e.id,e)}),t},getAllFiltersInfo:e=>{let t=[];return e.all_filters.reduce((e,a,s,r)=>(t.push(r[s].id),{idArr:t}),[])}}}),o={namespaced:!0,state:{all_listeners:[],current_listener:{}},mutations:{SET_ALL_LISTENERS(e,t){e.all_listeners=t},SET_CURRENT_LISTENER(e,t){e.current_listener=t}},actions:{async fetchAllListeners({commit:e}){try{let t=await this.vue.$http.get("/listeners");t.data.data&&e("SET_ALL_LISTENERS",t.data.data)}catch(t){const e=this.vue.$logger("store-listener-fetchAllListeners");e.error(t)}},async fetchListenerById({commit:e},t){try{let a=await this.vue.$http.get("/listeners/"+t);a.data.data&&e("SET_CURRENT_LISTENER",a.data.data)}catch(a){const e=this.vue.$logger("store-listener-fetchListenerById");e.error(a)}},async createListener({commit:e},t){try{const a={data:{id:t.id,type:"listeners",attributes:{parameters:t.parameters},relationships:t.relationships}};let s=await this.vue.$http.post("/listeners",a),r=[`Listener ${t.id} is created`];204===s.status&&(e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:r,type:"success"},{root:!0}),await this.vue.$typy(t.callback).safeFunction())}catch(a){const e=this.vue.$logger("store-listener-createListener");e.error(a)}},async updateListenerParameters({commit:e},t){try{const a={data:{id:t.id,type:"listeners",attributes:{parameters:t.parameters}}};let s=await this.vue.$http.patch("/listeners/"+t.id,a);204===s.status&&(e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:[`Parameters of ${t.id} is updated`],type:"success"},{root:!0}),await this.vue.$typy(t.callback).safeFunction())}catch(a){const e=this.vue.$logger("store-listener-updateListenerParameters");e.error(a)}},async destroyListener({dispatch:e,commit:t},a){try{let s=await this.vue.$http.delete("/listeners/"+a);204===s.status&&(await e("fetchAllListeners"),t("mxsApp/SET_SNACK_BAR_MESSAGE",{text:[`Listeners ${a} is destroyed`],type:"success"},{root:!0}))}catch(s){const e=this.vue.$logger("store-listener-destroyListener");e.error(s)}}},getters:{getTotalListeners:e=>e.all_listeners.length,getAllListenersMap:e=>{let t=new Map;return e.all_listeners.forEach(e=>{t.set(e.id,e)}),t},getAllListenersInfo:e=>{let t=[];return e.all_listeners.reduce((e,a,s,r)=>(t.push(r[s].id),{idArr:t}),[])}}},n=(a("caad"),a("5319"),{namespaced:!0,state:{all_obj_ids:[],maxscale_overview_info:{},all_modules_map:{},thread_stats:[],threads_datasets:[],maxscale_parameters:{},logs_page_size:100,latest_logs:[],prev_log_link:null,log_source:null,prev_log_data:[],prev_filtered_log_link:null,prev_filtered_log_data:[],chosen_log_levels:r["a"].MAXSCALE_LOG_LEVELS},mutations:{SET_ALL_OBJ_IDS(e,t){e.all_obj_ids=t},SET_MAXSCALE_OVERVIEW_INFO(e,t){e.maxscale_overview_info=t},SET_ALL_MODULES_MAP(e,t){e.all_modules_map=t},SET_THREAD_STATS(e,t){e.thread_stats=t},SET_THREADS_DATASETS(e,t){e.threads_datasets=t},SET_MAXSCALE_PARAMETERS(e,t){e.maxscale_parameters=t},SET_LATEST_LOGS(e,t){e.latest_logs=t},SET_PREV_LOG_LINK(e,t){e.prev_log_link=t},SET_LOG_SOURCE(e,t){e.log_source=t},SET_PREV_LOG_DATA(e,t){e.prev_log_data=t},SET_PREV_FILTERED_LOG_LINK(e,t){e.prev_filtered_log_link=t},SET_PREV_FILTERED_LOG_DATA(e,t){e.prev_filtered_log_data=t},SET_CHOSEN_LOG_LEVELS(e,t){e.chosen_log_levels=t}},actions:{async fetchMaxScaleParameters({commit:e}){try{let t=await this.vue.$http.get("/maxscale?fields[maxscale]=parameters");t.data.data.attributes.parameters&&e("SET_MAXSCALE_PARAMETERS",t.data.data.attributes.parameters)}catch(t){const e=this.vue.$logger("store-maxscale-fetchMaxScaleParameters");e.error(t)}},async fetchMaxScaleOverviewInfo({commit:e}){try{let t=await this.vue.$http.get("/maxscale?fields[maxscale]=version,commit,started_at,activated_at,uptime");t.data.data.attributes&&e("SET_MAXSCALE_OVERVIEW_INFO",t.data.data.attributes)}catch(t){const e=this.vue.$logger("store-maxscale-fetchMaxScaleOverviewInfo");e.error(t)}},async fetchAllModules({commit:e}){try{let t=await this.vue.$http.get("/maxscale/modules?load=all");if(t.data.data){const a=t.data.data;let s=this.vue.$helpers.hashMapByPath({arr:a,path:"attributes.module_type"});e("SET_ALL_MODULES_MAP",s)}}catch(t){const e=this.vue.$logger("store-maxscale-fetchAllModules");e.error(t)}},async fetchThreadStats({commit:e}){try{let t=await this.vue.$http.get("/maxscale/threads?fields[threads]=stats");t.data.data&&e("SET_THREAD_STATS",t.data.data)}catch(t){const e=this.vue.$logger("store-maxscale-fetchThreadStats");e.error(t)}},genDataSets({commit:e,state:t}){const{thread_stats:a}=t,{genLineStreamDataset:s}=this.vue.$helpers;if(a.length){let t=[];a.forEach((e,a)=>{const{attributes:{stats:{load:{last_second:r=null}={}}={}}={}}=e;if(null!==r){const i=s({label:"THREAD ID - "+e.id,value:r,colorIndex:a});t.push(i)}}),e("SET_THREADS_DATASETS",t)}},async fetchLatestLogs({commit:e,state:t}){try{const a=await this.vue.$http.get("/maxscale/logs/data?page[size]="+t.logs_page_size),{data:{attributes:{log:s=[],log_source:r=null}={}}={},links:{prev:i=null}={}}=a.data;s.length&&e("SET_LATEST_LOGS",Object.freeze(s)),r&&e("SET_LOG_SOURCE",r),e("SET_PREV_LOG_LINK",i)}catch(a){const e=this.vue.$logger("store-maxscale-fetchLatestLogs");e.error(a)}},async fetchPrevLog({commit:e,state:t}){try{const a=t.prev_log_link.indexOf("/maxscale/logs/"),s=t.prev_log_link.slice(a),r=await this.vue.$http.get(s),{data:{attributes:{log:i=[]}={}}={},links:{prev:o=null}}=r.data;e("SET_PREV_LOG_DATA",i),e("SET_PREV_LOG_LINK",o)}catch(a){this.vue.$logger("store-maxscale-fetchPrevLog").error(a)}},async fetchPrevFilteredLog({commit:e,state:t}){try{const a=t.chosen_log_levels.join(","),s=t.prev_filtered_log_link?t.prev_filtered_log_link:t.prev_log_link,r=s.indexOf("/maxscale/logs/"),i=s.slice(r);let o="";if(i.includes("&priority")){let e=/(alert|debug|error|info|notice|warning),?/g;const t=i.replace(e,"");o=t.replace(/priority=/g,"priority="+a)}else o=`${i}&priority=${a}`;const n=await this.vue.$http.get(o),{data:{attributes:{log:c=[]}={}}={},links:{prev:l=null}}=n.data;e("SET_PREV_FILTERED_LOG_DATA",c),e("SET_PREV_FILTERED_LOG_LINK",l)}catch(a){this.vue.$logger("store-maxscale-fetchPrevFilteredLog").error(a)}},async updateMaxScaleParameters({commit:e},t){try{const a={data:{id:t.id,type:"maxscale",attributes:{parameters:t.parameters}}};let s=await this.vue.$http.patch("/maxscale",a);204===s.status&&(e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:["MaxScale parameters is updated"],type:"success"},{root:!0}),await this.vue.$typy(t.callback).safeFunction())}catch(a){const e=this.vue.$logger("store-maxscale-updateMaxScaleParameters");e.error(a)}},async fetchAllMxsObjIds({commit:e}){const t=["servers","monitors","filters","services","listeners"];let a=[];for(const s of t){const e=await this.vue.$http.get(`/${s}?fields[${s}]=id`);a.push(...e.data.data.map(e=>e.id))}e("SET_ALL_OBJ_IDS",a)}},getters:{getModulesByType:e=>t=>e.all_modules_map[t]||[]}});function c({meta:e,cmdName:t}){let a=!1,s=!1;const r=t.replace("async-",""),i=[r+" is still running",r+" is still pending"];for(const o of e.errors){const e=i.some(e=>o.detail.includes(e)),t=o.detail.includes("cancelled");e&&(a=e),t&&(s=t)}return{isRunning:a,isCancelled:s}}var l={namespaced:!0,state:{all_monitors:[],current_monitor:{},monitor_diagnostics:{},curr_cs_status:{},is_loading_cs_status:!1,cs_no_data_txt:""},mutations:{SET_ALL_MONITORS(e,t){e.all_monitors=t},SET_CURRENT_MONITOR(e,t){e.current_monitor=t},SET_MONITOR_DIAGNOSTICS(e,t){e.monitor_diagnostics=t},SET_CURR_CS_STATUS(e,t){e.curr_cs_status=t},SET_IS_LOADING_CS_STATUS(e,t){e.is_loading_cs_status=t},SET_CS_NO_DATA_TXT(e,t){e.cs_no_data_txt=t}},actions:{async fetchAllMonitors({commit:e}){try{let t=await this.vue.$http.get("/monitors");t.data.data&&e("SET_ALL_MONITORS",t.data.data)}catch(t){const e=this.vue.$logger("store-monitor-fetchAllMonitors");e.error(t)}},async fetchMonitorById({commit:e},t){try{let a=await this.vue.$http.get("/monitors/"+t);a.data.data&&e("SET_CURRENT_MONITOR",a.data.data)}catch(a){const e=this.vue.$logger("store-monitor-fetchMonitorById");e.error(a)}},async fetchMonitorDiagnosticsById({commit:e},t){try{let a=await this.vue.$http.get(`/monitors/${t}?fields[monitors]=monitor_diagnostics`);a.data.data&&e("SET_MONITOR_DIAGNOSTICS",a.data.data)}catch(a){const e=this.vue.$logger("store-monitor-fetchMonitorDiagnosticsById");e.error(a)}},async createMonitor({commit:e},t){try{const a={data:{id:t.id,type:"monitors",attributes:{module:t.module,parameters:t.parameters},relationships:t.relationships}};let s=await this.vue.$http.post("/monitors/",a),r=[`Monitor ${t.id} is created`];204===s.status&&(e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:r,type:"success"},{root:!0}),await this.vue.$typy(t.callback).safeFunction())}catch(a){const e=this.vue.$logger("store-monitor-createMonitor");e.error(a)}},async updateMonitorParameters({commit:e},t){try{const a={data:{id:t.id,type:"monitors",attributes:{parameters:t.parameters}}};let s=await this.vue.$http.patch("/monitors/"+t.id,a);204===s.status&&(e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:[`Monitor ${t.id} is updated`],type:"success"},{root:!0}),await this.vue.$typy(t.callback).safeFunction())}catch(a){const e=this.vue.$logger("store-monitor-updateMonitorParameters");e.error(a)}},async manipulateMonitor({dispatch:e,commit:t,rootState:a},{id:s,type:r,opParams:i,successCb:o,asyncCmdErrCb:n,showSnackbar:c=!0,custAsyncCmdDone:l,pollingResInterval:d=2500}){try{let u,p=`/monitors/${s}/${i}`,m="put";const{STOP:_,START:h,DESTROY:f,SWITCHOVER:S,RESET_REP:v,RELEASE_LOCKS:g,FAILOVER:E,REJOIN:y,CS_GET_STATUS:b,CS_STOP_CLUSTER:A,CS_START_CLUSTER:T,CS_SET_READONLY:R,CS_SET_READWRITE:$,CS_ADD_NODE:x,CS_REMOVE_NODE:O}=a.app_config.MONITOR_OP_TYPES;switch(r){case f:m="delete",p=`/monitors/${s}?force=yes`,u=[`Monitor ${s} is destroyed`];break;case _:u=[`Monitor ${s} is stopped`];break;case h:u=[`Monitor ${s} is started`];break;case S:case v:case g:case E:case y:case b:case A:case T:case R:case $:case x:case O:{m="post";const{moduleType:e,params:t}=i;p=`/maxscale/modules/${e}/${r}?${s}${t}`;break}}const I=await this.vue.$http[m](p);if(204===I.status)switch(r){case S:case v:case g:case E:case y:case b:case A:case T:case R:case $:case x:case O:await e("checkAsyncCmdRes",{cmdName:r,monitorModule:i.moduleType,monitorId:s,successCb:o,asyncCmdErrCb:n,custAsyncCmdDone:l,showSnackbar:c,pollingResInterval:d});break;default:c&&t("mxsApp/SET_SNACK_BAR_MESSAGE",{text:u,type:"success"},{root:!0}),await this.vue.$typy(o).safeFunction();break}}catch(u){const e=this.vue.$logger("store-monitor-manipulateMonitor");e.error(u)}},async checkAsyncCmdRes({dispatch:e},t){try{const{monitorModule:a,monitorId:s,successCb:r,showSnackbar:i,custAsyncCmdDone:o}=t,{status:n,data:{meta:c}={}}=await this.vue.$http.get(`/maxscale/modules/${a}/fetch-cmd-result?${s}`);200===n&&(c.errors?await e("handleAsyncCmdPending",{...t,meta:c}):this.vue.$typy(o).isFunction?await o(c):await e("handleAsyncCmdDone",{meta:c,successCb:r,showSnackbar:i}))}catch(a){this.vue.$logger("store-monitor-checkAsyncCmdRes").error(a)}},async handleAsyncCmdDone({commit:e},{meta:t,successCb:a,showSnackbar:s}){s&&e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:[this.vue.$helpers.capitalizeFirstLetter(t)],type:"success"},{root:!0}),await this.vue.$typy(a).safeFunction(t)},async handleAsyncCmdPending({commit:e,dispatch:t},a){const{cmdName:s,meta:r,showSnackbar:i,asyncCmdErrCb:o,pollingResInterval:n}=a,{isRunning:l,isCancelled:d}=c({meta:r,cmdName:s});if(l&&!d)i&&e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:r.errors.map(e=>this.vue.$helpers.capitalizeFirstLetter(e.detail.replace("No manual command results are available, ",""))),type:"warning"},{root:!0}),await this.vue.$helpers.delay(n).then(async()=>await t("checkAsyncCmdRes",a));else{const t=r.errors.map(e=>e.detail);i&&e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:t,type:"error"},{root:!0}),await this.vue.$typy(o).safeFunction(t)}},async handleFetchCsStatus({state:e,commit:t,dispatch:a,rootGetters:s,rootState:r},{monitorId:i,monitorModule:o,isCsCluster:n,monitorState:c,successCb:l,pollingResInterval:d}){if(s["user/isAdmin"]&&n&&!e.is_loading_cs_status&&"Stopped"!==c){const{CS_GET_STATUS:e}=r.app_config.MONITOR_OP_TYPES;t("SET_IS_LOADING_CS_STATUS",!0),await a("manipulateMonitor",{id:i,type:e,showSnackbar:!1,successCb:async e=>{t("SET_CURR_CS_STATUS",e),t("SET_CS_NO_DATA_TXT",""),await this.vue.$typy(l).safeFunction(e)},asyncCmdErrCb:e=>{t("SET_CURR_CS_STATUS",{}),t("SET_CS_NO_DATA_TXT",e.join(", "))},opParams:{moduleType:o,params:""},pollingResInterval:d}),t("SET_IS_LOADING_CS_STATUS",!1)}},async updateMonitorRelationship({commit:e},t){try{let a,s;a=await this.vue.$http.patch(`/monitors/${t.id}/relationships/servers`,{data:t.servers}),s=[`Servers relationships of ${t.id} is updated`],204===a.status&&(e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:s,type:"success"},{root:!0}),await this.vue.$typy(t.callback).safeFunction())}catch(a){const e=this.vue.$logger("store-monitor-updateMonitorRelationship");e.error(a)}}},getters:{getTotalMonitors:e=>e.all_monitors.length,getAllMonitorsMap:e=>{let t=new Map;return e.all_monitors.forEach(e=>{t.set(e.id,e)}),t},getAllMonitorsInfo:e=>{let t=[];return e.all_monitors.reduce((e,a,s,r)=>(t.push(r[s].id),{idArr:t}),[])},getMonitorOps:(e,t,a)=>{const{STOP:s,START:r,DESTROY:i,SWITCHOVER:o,RESET_REP:n,RELEASE_LOCKS:c,FAILOVER:l,REJOIN:d,CS_GET_STATUS:u,CS_STOP_CLUSTER:p,CS_START_CLUSTER:m,CS_SET_READONLY:_,CS_SET_READWRITE:h,CS_ADD_NODE:f,CS_REMOVE_NODE:S}=a.app_config.MONITOR_OP_TYPES;return({currState:e,scope:t})=>({[s]:{text:t.$mxs_t("monitorOps.actions.stop"),type:s,icon:"$vuetify.icons.mxs_stopped",iconSize:22,color:"primary",params:"stop",disabled:"Stopped"===e},[r]:{text:t.$mxs_t("monitorOps.actions.start"),type:r,icon:"$vuetify.icons.mxs_running",iconSize:22,color:"primary",params:"start",disabled:"Running"===e},[i]:{text:t.$mxs_t("monitorOps.actions.destroy"),type:i,icon:"$vuetify.icons.mxs_delete",iconSize:18,color:"error",disabled:!1},[o]:{text:t.$mxs_t("monitorOps.actions."+o),type:o,icon:"$vuetify.icons.mxs_switchover",iconSize:24,color:"primary",disabled:!1},[n]:{text:t.$mxs_t("monitorOps.actions."+n),type:n,icon:"$vuetify.icons.mxs_reload",iconSize:20,color:"primary",disabled:!1},[c]:{text:t.$mxs_t("monitorOps.actions."+c),type:c,icon:"mdi-lock-open-outline",iconSize:24,color:"primary",disabled:!1},[l]:{text:t.$mxs_t("monitorOps.actions."+l),type:l,icon:"$vuetify.icons.mxs_failover",iconSize:24,disabled:!1},[d]:{text:t.$mxs_t("monitorOps.actions."+d),type:d,disabled:!1},[u]:{type:u,disabled:!1},[p]:{text:t.$mxs_t("monitorOps.actions."+p),type:p,icon:"$vuetify.icons.mxs_stopped",iconSize:22,color:"primary",disabled:!1},[m]:{text:t.$mxs_t("monitorOps.actions."+m),type:m,icon:"$vuetify.icons.mxs_running",iconSize:22,color:"primary",disabled:!1},[_]:{type:_,text:t.$mxs_t("monitorOps.actions."+_),icon:"mdi-database-eye-outline",iconSize:24,color:"primary",disabled:!1},[h]:{type:h,text:t.$mxs_t("monitorOps.actions."+h),icon:"mdi-database-edit-outline",iconSize:24,color:"primary",disabled:!1},[f]:{type:f,text:t.$mxs_t("monitorOps.actions."+f),icon:"mdi-plus",iconSize:24,color:"primary",disabled:!1},[S]:{type:S,text:t.$mxs_t("monitorOps.actions."+S),icon:"$vuetify.icons.mxs_delete",iconSize:18,color:"error",disabled:!1}})}}},d={namespaced:!0,state:{all_servers:[],all_server_names:[],current_server:{},server_connections_datasets:[]},mutations:{SET_ALL_SERVERS(e,t){e.all_servers=t},SET_ALL_SERVER_NAMES(e,t){e.all_server_names=t},SET_CURRENT_SERVER(e,t){e.current_server=t},SET_SERVER_CONNECTIONS_DATASETS(e,t){e.server_connections_datasets=t}},actions:{async fetchAllServers({commit:e}){try{let t=await this.vue.$http.get("/servers");t.data.data&&e("SET_ALL_SERVERS",t.data.data)}catch(t){const e=this.vue.$logger("store-server-fetchAllServers");e.error(t)}},async fetchAllServerNames({commit:e}){try{let t=await this.vue.$http.get("/servers?fields[servers]=name");t.data.data&&e("SET_ALL_SERVER_NAMES",t.data.data.map(e=>e.attributes.name))}catch(t){this.vue.$logger("store-server-fetchAllServerNames").error(t)}},async fetchServerById({commit:e},t){try{let a=await this.vue.$http.get("/servers/"+t);a.data.data&&e("SET_CURRENT_SERVER",a.data.data)}catch(a){const e=this.vue.$logger("store-server-fetchServerById");e.error(a)}},async createServer({commit:e},t){try{const a={data:{id:t.id,type:"servers",attributes:{parameters:t.parameters},relationships:t.relationships}};let s=await this.vue.$http.post("/servers/",a),r=[`Server ${t.id} is created`];204===s.status&&(e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:r,type:"success"},{root:!0}),await this.vue.$typy(t.callback).safeFunction())}catch(a){const e=this.vue.$logger("store-server-createServer");e.error(a)}},async updateServerParameters({commit:e},t){try{const a={data:{id:t.id,type:"servers",attributes:{parameters:t.parameters}}};let s=await this.vue.$http.patch("/servers/"+t.id,a);204===s.status&&(e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:[`Parameters of ${t.id} is updated`],type:"success"},{root:!0}),await this.vue.$typy(t.callback).safeFunction())}catch(a){const e=this.vue.$logger("store-server-updateServerParameters");e.error(a)}},async updateServerRelationship({commit:e},t){try{let a,s;a=await this.vue.$http.patch(`/servers/${t.id}/relationships/${t.type}`,{data:"services"===t.type?t.services:t.monitors}),s=[`${this.vue.$helpers.capitalizeFirstLetter(t.type)} relationships of ${t.id} is updated`],204===a.status&&(e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:s,type:"success"},{root:!0}),await this.vue.$typy(t.callback).safeFunction())}catch(a){const e=this.vue.$logger("store-server-updateServerRelationship");e.error(a)}},async destroyServer({commit:e},t){try{let a=await this.vue.$http.delete(`/servers/${t}?force=yes`);204===a.status&&e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:[`Server ${t} is deleted`],type:"success"},{root:!0})}catch(a){const e=this.vue.$logger("store-server-destroyServer");e.error(a)}},async setOrClearServerState({commit:e},{id:t,type:a,opParams:s,callback:r,forceClosing:i}){try{const o=s.replace(/(clear|set)\?state=/,"");let n=[`Set ${t} to '${o}'`],c=`/servers/${t}/${s}`;switch(a){case"maintain":i&&(c=c.concat("&force=yes"));break;case"clear":n=[`State '${o}' of server ${t} is cleared`];break}const l=await this.vue.$http.put(c);204===l.status&&(e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:n,type:"success"},{root:!0}),await this.vue.$typy(r).safeFunction())}catch(o){const e=this.vue.$logger("store-server-setOrClearServerState");e.error(o)}},genDataSets({commit:e,state:t}){const{all_servers:a}=t,{genLineStreamDataset:s}=this.vue.$helpers;if(a.length){let t=[];a.forEach((e,a)=>{const{id:r,attributes:{statistics:{connections:i=null}={}}={}}=e;if(null!==i){const e=s({label:"Server ID - "+r,value:i,colorIndex:a,id:r});t.push(e)}}),e("SET_SERVER_CONNECTIONS_DATASETS",t)}}},getters:{getTotalServers:e=>e.all_servers.length,getAllServersMap:e=>{let t=new Map;return e.all_servers.forEach(e=>{t.set(e.id,e)}),t},getAllServersInfo:e=>{let t=[],a=[];return e.all_servers.reduce((e,s,r,i)=>(t.push(i[r].id),a.push(i[r].attributes.parameters.port),{idArr:t,portNumArr:a}),[])},getCurrStateMode:()=>e=>{let t=e.toLowerCase();return t.indexOf(",")>0&&(t=t.slice(0,t.indexOf(","))),t},getServerOps:(e,t,a)=>{const{MAINTAIN:s,CLEAR:r,DRAIN:i,DELETE:o}=a.app_config.SERVER_OP_TYPES;return({currStateMode:e,scope:t})=>({[s]:{text:t.$mxs_t("serverOps.actions.maintain"),type:s,icon:"$vuetify.icons.mxs_maintenance",iconSize:22,color:"primary",info:t.$mxs_t("serverOps.info.maintain"),params:"set?state=maintenance",disabled:"maintenance"===e},[r]:{text:t.$mxs_t("serverOps.actions.clear"),type:r,icon:"$vuetify.icons.mxs_restart",iconSize:22,color:"primary",info:"",params:"clear?state="+("drained"===e?"drain":e),disabled:"maintenance"!==e&&"drained"!==e},[i]:{text:t.$mxs_t("serverOps.actions.drain"),type:i,icon:"$vuetify.icons.mxs_drain",iconSize:22,color:"primary",info:t.$mxs_t("serverOps.info.drain"),params:"set?state=drain",disabled:"maintenance"===e||"drained"===e},[o]:{text:t.$mxs_t("serverOps.actions.delete"),type:o,icon:"$vuetify.icons.mxs_delete",iconSize:18,color:"error",info:"",disabled:!1}})}}},u={namespaced:!0,state:{all_services:[],current_service:{},service_connections_datasets:[]},mutations:{SET_ALL_SERVICES(e,t){e.all_services=t},SET_CURRENT_SERVICE(e,t){e.current_service=t},SET_SERVICE_CONNECTIONS_DATASETS(e,t){e.service_connections_datasets=t}},actions:{async fetchServiceById({commit:e},t){try{let a=await this.vue.$http.get("/services/"+t);a.data.data&&e("SET_CURRENT_SERVICE",a.data.data)}catch(a){const e=this.vue.$logger("store-service-fetchServiceById");e.error(a)}},genDataSets({commit:e,state:t}){const{current_service:{attributes:{connections:a=null}={}}}=t;if(null!==a){const{genLineStreamDataset:t}=this.vue.$helpers,s=t({label:"Current connections",value:a,colorIndex:0});e("SET_SERVICE_CONNECTIONS_DATASETS",[s])}},async fetchAllServices({commit:e}){try{let t=await this.vue.$http.get("/services");t.data.data&&e("SET_ALL_SERVICES",t.data.data)}catch(t){const e=this.vue.$logger("store-services-fetchAllServices");e.error(t)}},async createService({commit:e},t){try{const a={data:{id:t.id,type:"services",attributes:{router:t.module,parameters:t.parameters},relationships:t.relationships}};let s=await this.vue.$http.post("/services/",a);204===s.status&&(e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:[`Service ${t.id} is created`],type:"success"},{root:!0}),await this.vue.$typy(t.callback).safeFunction())}catch(a){const e=this.vue.$logger("store-service-createService");e.error(a)}},async updateServiceParameters({commit:e},t){try{const a={data:{id:t.id,type:"services",attributes:{parameters:t.parameters}}};let s=await this.vue.$http.patch("/services/"+t.id,a);204===s.status&&(e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:[`Parameters of ${t.id} is updated`],type:"success"},{root:!0}),await this.vue.$typy(t.callback).safeFunction())}catch(a){const e=this.vue.$logger("store-service-updateServiceParameters");e.error(a)}},async updateServiceRelationship({commit:e},{id:t,data:a,type:s,callback:r}){try{let i,o;i=await this.vue.$http.patch(`/services/${t}/relationships/${s}`,{data:a}),o=[`Update ${t} relationships successfully`],204===i.status&&(e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:o,type:"success"},{root:!0}),await this.vue.$typy(r).safeFunction())}catch(i){const e=this.vue.$logger("store-service-updateServiceRelationship");e.error(i)}},async destroyService({dispatch:e,commit:t},a){try{let s=await this.vue.$http.delete(`/services/${a}?force=yes`);204===s.status&&(await e("fetchAllServices"),t("mxsApp/SET_SNACK_BAR_MESSAGE",{text:[`Service ${a} is deleted`],type:"success"},{root:!0}))}catch(s){const e=this.vue.$logger("store-service-destroyService");e.error(s)}},async stopOrStartService({commit:e},{id:t,mode:a,callback:s}){try{let r,i=await this.vue.$http.put(`/services/${t}/${a}`);switch(a){case"start":r=[`Service ${t} is started`];break;case"stop":r=[`Service${t} is stopped`];break}204===i.status&&(e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:r,type:"success"},{root:!0}),await this.vue.$typy(s).safeFunction())}catch(r){const e=this.vue.$logger("store-service-stopOrStartService");e.error(r)}}},getters:{getTotalServices:e=>e.all_services.length,getAllServicesMap:e=>{let t=new Map;return e.all_services.forEach(e=>{t.set(e.id,e)}),t},getAllServicesInfo:e=>{let t=[];return e.all_services.reduce((e,a,s,r)=>(t.push(r[s].id),{idArr:t}),[])}}};const p=()=>({page:0,itemsPerPage:50});var m={namespaced:!0,state:{pagination_config:p(),current_sessions:[],total_sessions:0,sessions_datasets:[],filtered_sessions:[],total_filtered_sessions:0},mutations:{SET_PAGINATION_CONFIG(e,t){e.pagination_config=t},SET_DEF_PAGINATION_CONFIG(e){e.pagination_config=p()},SET_CURRENT_SESSIONS(e,t){e.current_sessions=t},SET_TOTAL_SESSIONS(e,t){e.total_sessions=t},SET_SESSIONS_DATASETS(e,t){e.sessions_datasets=t},SET_FILTERED_SESSIONS(e,t){e.filtered_sessions=t},SET_TOTAL_FILTERED_SESSIONS(e,t){e.total_filtered_sessions=t}},actions:{async fetchSessions({commit:e,getters:t}){try{const a=t.getPaginateParam;let s=await this.vue.$http.get("/sessions"+(a?"?"+a:""));if(s.data.data){e("SET_CURRENT_SESSIONS",s.data.data);const t=this.vue.$typy(s,"data.meta.total").safeNumber;e("SET_TOTAL_SESSIONS",t||s.data.data.length)}}catch(a){const e=this.vue.$logger("store-sessions-fetchSessions");e.error(a)}},genDataSets({commit:e,state:t}){const{genLineStreamDataset:a}=this.vue.$helpers,s=a({label:"Total sessions",value:t.total_sessions,colorIndex:0});e("SET_SESSIONS_DATASETS",[s])},async fetchSessionsWithFilter({getters:e,commit:t},a){try{const s=e.getPaginateParam;let r=await this.vue.$http.get(`/sessions?${a}${s?"&"+s:""}`);if(r.data.data){t("SET_FILTERED_SESSIONS",r.data.data);const e=this.vue.$typy(r,"data.meta.total").safeNumber;t("SET_TOTAL_FILTERED_SESSIONS",e||r.data.data.length)}}catch(s){const e=this.vue.$logger("store-sessions-fetchSessionsWithFilter");e.error(s)}},async killSession({commit:e},{id:t,callback:a}){try{const s=await this.vue.$http.delete("/sessions/"+t);200===s.status&&(e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:[this.vue.$mxs_t("info.killSessionSuccessfully")],type:"success"},{root:!0}),await this.vue.$typy(a).safeFunction())}catch(s){const e=this.vue.$logger("store-sessions-killSession");e.error(s)}}},getters:{getTotalSessions:e=>e.total_sessions,getTotalFilteredSessions:e=>e.total_filtered_sessions,getPaginateParam:({pagination_config:{itemsPerPage:e,page:t}})=>-1===e?"":`page[size]=${e}&page[number]=${t}`,getFilterParamByServiceId:()=>e=>`filter[relationships.services.data[*].id]="${e}"`,getFilterParamByServerId:()=>e=>`filter[attributes.connections[*].server]="${e}"`}},_=a("9851"),h=a("a18c"),f=a("a002"),S=a.n(f),v=a("a27e"),g={namespaced:!0,state:{logged_in_user:{},login_err_msg:"",all_inet_users:[]},mutations:{SET_LOGGED_IN_USER(e,t){e.logged_in_user=t},SET_LOGIN_ERR_MSG(e,t){e.login_err_msg=t},CLEAR_USER(e){e.logged_in_user=null},SET_ALL_INET_USERS(e,t){e.all_inet_users=t}},actions:{async authCheck({commit:e}){let t=Object(v["c"])();t.interceptors.response.use(e=>e,async t=>{const{response:{status:a=null}={}}=t||{};401===a&&(Object(v["a"])(),e("CLEAR_USER"),h["a"].push("/login"))}),await t.get("/maxscale")},async login({commit:e,dispatch:t},{rememberMe:a,auth:s}){try{let r="/auth?persist=yes",i=await v["b"].get(`${r}${a?"&max-age=86400":""}`,{auth:s});204===i.status&&(e("SET_LOGGED_IN_USER",{name:s.username,rememberMe:a,isLoggedIn:!0}),h["a"].push(h["a"].app.$route.query.redirect||"/dashboard/servers"),await t("fetchLoggedInUserAttrs"))}catch(r){let t="";if(r.response)t=401===r.response.status?this.vue.$mxs_t("errors.wrongCredentials"):r.response.statusText;else{const e=this.vue.$logger("store-user-login");e.error(r),t=r.toString()}e("SET_LOGIN_ERR_MSG",t)}},async logout({commit:e,dispatch:t,rootState:a}){await t("queryConn/disconnectAll",{},{root:!0}),Object(v["a"])(),e("CLEAR_USER"),e("mxsApp/SET_OVERLAY_TYPE",_["b"],{root:!0});const{mxsApp:s,queryPersisted:r,wke:i,querySession:o,persisted:n}=a;s.snackbar_message.status&&e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:s.snackbar_message.text,type:s.snackbar_message.type,status:!1},{root:!0}),await this.vue.$helpers.delay(1500).then(()=>{e("mxsApp/SET_OVERLAY_TYPE",null,{root:!0}),"login"!==h["a"].app.$route.name&&h["a"].push("/login")});const c=this.vue.$helpers.lodash.cloneDeep({queryPersisted:r,wke:{worksheets_arr:i.worksheets_arr,active_wke_id:i.active_wke_id},querySession:{active_session_by_wke_id_map:o.active_session_by_wke_id_map,query_sessions:o.query_sessions}}),l=this.vue.$helpers.lodash.cloneDeep({persisted:n});await S.a.clear(),await S.a.setItem("query-editor",c),await S.a.setItem("maxgui-app",l)},async fetchLoggedInUserAttrs({commit:e,state:t}){try{const a=await v["b"].get("/users/inet/"+t.logged_in_user.name);200===a.status&&e("SET_LOGGED_IN_USER",{...t.logged_in_user,attributes:a.data.data.attributes})}catch(a){const e=this.vue.$logger("store-user-fetchLoggedInUserAttrs");e.error(a)}},async fetchAllNetworkUsers({commit:e}){try{const t=await this.vue.$http.get("/users/inet");200===t.status&&e("SET_ALL_INET_USERS",t.data.data)}catch(t){const e=this.vue.$logger("store-user-fetchAllNetworkUsers");e.error(t)}},async manageInetUser({commit:e,rootState:t},a){try{let s,r;const{ADD:i,UPDATE:o,DELETE:n}=t.app_config.USER_ADMIN_ACTIONS;switch(a.mode){case i:s=await this.vue.$http.post("/users/inet",{data:{id:a.id,type:"inet",attributes:{password:a.password,account:a.role}}}),r=[`Network User ${a.id} is created`];break;case o:s=await this.vue.$http.patch("/users/inet/"+a.id,{data:{attributes:{password:a.password}}}),r=[`Network User ${a.id} is updated`];break;case n:s=await this.vue.$http.delete("/users/inet/"+a.id),r=[`Network user ${a.id} is deleted`];break}204===s.status&&(e("mxsApp/SET_SNACK_BAR_MESSAGE",{text:r,type:"success"},{root:!0}),await this.vue.$typy(a.callback).safeFunction())}catch(s){const e=this.vue.$logger("store-user-manageInetUser");e.error(s)}}},getters:{getLoggedInUserRole:e=>{const{attributes:{account:t=""}={}}=e.logged_in_user||{};return t},isAdmin:(e,t,a)=>t.getLoggedInUserRole===a.app_config.USER_ROLES.ADMIN,getUserAdminActions:(e,t,a)=>{const{DELETE:s,UPDATE:r,ADD:i}=a.app_config.USER_ADMIN_ACTIONS;return({scope:e})=>({[r]:{text:e.$mxs_t("userOps.actions."+r),type:r,icon:"$vuetify.icons.mxs_edit",iconSize:18,color:"primary"},[s]:{text:e.$mxs_t("userOps.actions."+s),type:s,icon:" $vuetify.icons.mxs_delete",iconSize:18,color:"error"},[i]:{text:e.$mxs_t("userOps.actions."+i),type:i,color:"accent-dark"}})}}},E={namespaced:!0,state:{refresh_rate_by_route_group:r["a"].DEF_REFRESH_RATE_BY_GROUP},mutations:{UPDATE_REFRESH_RATE_BY_ROUTE_GROUP(e,{group:t,payload:a}){e.refresh_rate_by_route_group[t]=a}}},y=a("0abc"),b={namespaced:!0,state:{clusters:{},current_cluster:{},config_graph_data:[]},mutations:{SET_CLUSTERS(e,t){e.clusters=t},SET_CURR_CLUSTER(e,t){e.current_cluster=t},SET_CONFIG_GRAPH_DATA(e,t){e.config_graph_data=t}},actions:{async discoveryClusters({commit:e,dispatch:t,rootState:a,getters:s}){try{await Promise.all([t("server/fetchAllServers",{},{root:!0}),t("monitor/fetchAllMonitors",{},{root:!0})]);let r={};a.monitor.all_monitors.forEach(e=>{"mariadbmon"===e.attributes.module&&(r[e.id]=s.genCluster(e))}),e("SET_CLUSTERS",r)}catch(r){const e=this.vue.$logger("store-visualization-discoveryClusters");e.error(r)}},async fetchClusterById({commit:e,dispatch:t,rootState:a,getters:s},r){try{await Promise.all([t("server/fetchAllServers",{},{root:!0}),t("monitor/fetchMonitorById",r,{root:!0})]);let i={};const o=a.monitor.current_monitor;"mariadbmon"===o.attributes.module&&(i=s.genCluster(o)),e("SET_CURR_CLUSTER",i)}catch(i){const e=this.vue.$logger("store-visualization-fetchClusterById");e.error(i)}},async fetchConfigData({commit:e,dispatch:t,getters:a}){try{await Promise.all([t("monitor/fetchAllMonitors",{},{root:!0}),t("server/fetchAllServers",{},{root:!0}),t("service/fetchAllServices",{},{root:!0}),t("filter/fetchAllFilters",{},{root:!0}),t("listener/fetchAllListeners",{},{root:!0})]),e("SET_CONFIG_GRAPH_DATA",a.getConfigGraphData)}catch(s){const e=this.vue.$logger("store-visualization-fetchConfigData");e.error(s)}},async chooseActiveQueryEditorWke({commit:e,dispatch:t,rootState:a,rootGetters:s},{type:r,conn_name:i}){const o=s["queryConn/getWkeConns"].find(e=>e.name===i),n=a.wke.worksheets_arr.find(e=>e.id===this.vue.$typy(o,"wke_id_fk").safeString);if(n)a.wke.active_wke_id!==n.id&&e("wke/SET_ACTIVE_WKE_ID",n.id,{root:!0}),e("querySession/SET_ACTIVE_SESSION_BY_WKE_ID_MAP",{id:n.id,payload:a.querySession.active_session_by_wke_id_map[n.id]},{root:!0});else{const s=a.querySession.query_sessions.find(e=>this.vue.$typy(e,"active_sql_conn").isEmptyObject),o=a.wke.worksheets_arr.find(e=>e.id===this.vue.$typy(s,"wke_id_fk").safeString);o?(e("wke/SET_ACTIVE_WKE_ID",o.id,{root:!0}),e("querySession/SET_ACTIVE_SESSION_BY_WKE_ID_MAP",{id:o.id,payload:s.id},{root:!0})):await t("wke/addNewWs",{root:!0}),e("queryConn/SET_PRE_SELECT_CONN_RSRC",{type:r,id:i},{root:!0})}}},getters:{getServerData:(e,t,a,s)=>e=>s["server/getAllServersMap"].get(e),genNode:(e,t)=>({server:e,masterServerName:a})=>{let s={id:e.name,name:e.name,serverData:t.getServerData(e.name),linkColor:"#0e9bc0",isMaster:Boolean(!a)};return a&&(s.masterServerName=a,s.server_info=e),s},genCluster:(e,t)=>e=>{const{id:a,attributes:{monitor_diagnostics:{master:s,server_info:r}={},state:i,module:o}}=e;let n={id:a,name:a,state:i,module:o,linkColor:"#0e9bc0",children:[],monitorData:e.attributes};if(s){const e=r.reduce((e,a)=>(a.name===s?e.push(t.genNode({server:a})):a.slave_connections.forEach(s=>{e.push(t.genNode({server:a,masterServerName:s.master_server_name}))}),e),[]),a=[],i=y["lodash"].keyBy(e,"id");e.forEach(e=>{if(e.masterServerName){const t=i[e.masterServerName];t&&(t.children||(t.children=[]),t.children.push(e))}else a.push(e)}),n.children=a}return n},getConfigGraphData:(e,t,a)=>{const{service:{all_services:s},server:{all_servers:r},monitor:{all_monitors:i},listener:{all_listeners:o}}=a;let n=[];const{SERVICES:c,SERVERS:l,LISTENERS:d}=a.app_config.RELATIONSHIP_TYPES,u=[s,r,o,i];return u.forEach(e=>e.forEach(e=>{const{id:t,type:a,relationships:s}=e;let r={id:t,type:a,nodeData:e,parentIds:[]},i=[];switch(a){case c:i=["servers","services","monitors"];break;case l:i=["monitors"];break;case d:i=["services"];break}Object.keys(s).forEach(e=>{i.includes(e)&&s[e].data.forEach(e=>{r.parentIds.push(e.id)})}),n.push(r)})),n}}},A=a("8002"),T={mxsApp:A["a"],filter:i,listener:o,maxscale:n,monitor:l,server:d,service:u,session:m,user:g,persisted:E,visualization:b},R=a("2b0e"),$=a("bfa9"),x=a("1ee1");const O=new $["a"]({key:"maxgui-app",storage:S.a,asyncStorage:!0,reducer:e=>({persisted:e.persisted,user:{logged_in_user:e.user.logged_in_user}})});var I=[e=>{e.vue=R["default"].prototype},O.plugin,x["a"]];const C=new s["a"].Store({plugins:I,state:{app_config:r["a"],search_keyword:"",update_availability:!1,prev_route:null,module_parameters:[],form_type:"",should_refresh_resource:!1},mutations:{SET_SEARCH_KEYWORD(e,t){e.search_keyword=t},SET_UPDATE_AVAILABILITY(e,t){e.update_availability=t},SET_PREV_ROUTE(e,t){e.prev_route=t},SET_MODULE_PARAMETERS(e,t){e.module_parameters=t},SET_FORM_TYPE(e,t){e.form_type=t},SET_REFRESH_RESOURCE(e,t){e.should_refresh_resource=t}},actions:{async checkingForUpdate({commit:e}){const t=this.vue.$logger("index-store"),a=await this.vue.$http.get("/");t.info("Checking for update");const s=(new DOMParser).parseFromString(a.data,"text/html"),r=s.getElementsByName("commitId")[0].content,i=document.getElementsByName("commitId")[0].getAttribute("content");t.info("MaxGUI commit id:",i),t.info("MaxGUI new commit id:",r),i!==r&&(e("SET_UPDATE_AVAILABILITY",!0),t.info("New version is available"))},async getResourceState(e,{resourceId:t,resourceType:a,caller:s}){try{let e,s=[];return e=t?await this.vue.$http.get(`/${a}/${t}?fields[${a}]=state`):await this.vue.$http.get(`/${a}?fields[${a}]=state`),e.data.data&&(s=e.data.data),s}catch(r){const e=this.vue.$logger(s);e.error(r)}},async fetchModuleParameters({commit:e},t){try{let a=[],s=await this.vue.$http.get(`/maxscale/modules/${t}?fields[modules]=parameters`);if(s.data.data){const{attributes:{parameters:e=[]}={}}=s.data.data;a=e}e("SET_MODULE_PARAMETERS",a)}catch(a){const e=this.vue.$logger("fetchModuleParameters-for-"+t);e.error(a)}}},modules:T});t["default"]=C},"56d7":function(e,t,a){"use strict";a.r(t);var s={};a.r(s),a.d(s,"isNotEmptyObj",(function(){return m})),a.d(s,"isNotEmptyArray",(function(){return _})),a.d(s,"range",(function(){return h})),a.d(s,"serviceStateIcon",(function(){return f})),a.d(s,"serverStateIcon",(function(){return S})),a.d(s,"repStateIcon",(function(){return v})),a.d(s,"monitorStateIcon",(function(){return g})),a.d(s,"listenerStateIcon",(function(){return E})),a.d(s,"hashMapByPath",(function(){return y})),a.d(s,"convertType",(function(){return b})),a.d(s,"objToTree",(function(){return A})),a.d(s,"flattenExpandableTree",(function(){return T})),a.d(s,"findAncestor",(function(){return R})),a.d(s,"updateNode",(function(){return $})),a.d(s,"treeToObj",(function(){return x})),a.d(s,"convertSize",(function(){return O})),a.d(s,"convertDuration",(function(){return I})),a.d(s,"getSuffixFromValue",(function(){return C})),a.d(s,"genLineStreamDataset",(function(){return w})),a.d(s,"preventNonInteger",(function(){return L})),a.d(s,"getMin",(function(){return N})),a.d(s,"getMostFreq",(function(){return M})),a.d(s,"getRepStats",(function(){return k})),a.d(s,"getAddress",(function(){return D}));a("a79d");var r=a("2b0e"),i=a("f309"),o=a("5888"),n=a("7f66"),c=a("da06"),l=a("51e3"),d=a("64a7"),u=a("5da3"),p=(a("caad"),a("ddb0"),a("13d5"),a("0abc"));function m(e){return null!==e&&!Array.isArray(e)&&"object"===typeof e&&!p["lodash"].isEmpty(e)}function _(e){return null!==e&&Array.isArray(e)&&e.length>0}function h(e,t){if(!isNaN(e)&&!isNaN(t))return Math.floor(Math.random()*(t-e+1))+e}function f(e){return e?e.includes("Started")?1:e.includes("Stopped")?2:e.includes("Allocated")||e.includes("Failed")?0:"":""}function S(e){let t=2;return e&&("Running"===e||e.includes("Down")?t=0:e.includes("Running")&&(t=1),e.includes("Maintenance")&&(t=2)),t}function v(e){if(e)return"Stopped"===e?0:"Running"===e?1:2}function g(e){return e?e.includes("Running")?1:e.includes("Stopped")?0:"":""}function E(e){return e?"Running"===e?1:"Stopped"===e?2:"Failed"===e?0:"":""}function y({arr:e,path:t}){let a={};return e.forEach(e=>{const s=p["lodash"].get(e,t);void 0===a[s]&&(a[s]=[]),a[s].push(e)}),a}function b(e){const t=typeof e;let a=e;return"undefined"===t&&(a=t),null===e&&(a="null"),a}function A(e){let t=0;function a(e){const{obj:s,keepPrimitiveValue:r,level:i,parentNodeId:o=0}=e;let n=[];if(m(s)){const e=p["lodash"].cloneDeep(s);Object.keys(e).forEach(s=>{const c=r?e[s]:b(e[s]);let l={nodeId:++t,parentNodeId:o,level:i,id:s,value:c,originalValue:c};const d=_(c)||m(c);l.leaf=!d,d&&(l.value="",l.expanded=!1),m(c)&&(l.children=a({obj:c,keepPrimitiveValue:r,level:i+1,parentNodeId:l.nodeId})),_(c)&&(l.children=a({obj:{...c},keepPrimitiveValue:r,level:i+1,parentNodeId:l.nodeId})),n.push(l)})}return n}return a(e)}function T(e){let t=[],a=p["lodash"].cloneDeep(e);return a.forEach(e=>{e.children&&e.children.length>0?(e.expanded=!0,t.push(e),t=[...t,...T(e.children)]):t.push(e)}),t}function R({node:e,treeMap:t}){const{nodeId:a}=e;let s=[],r=t.get(a)&&t.get(a).parentNodeId;while(r)s.push(r),r=t.get(r)&&t.get(r).parentNodeId;return s.length?Math.min(...s):0}function $({obj:e,node:t}){const{id:a,value:s}=t;if(void 0!==e[a])e[a]=s;else for(const r in e)e[r]&&"object"===typeof e[r]&&$({obj:e[r],node:t})}function x({changedNodes:e,tree:t}){let a={};if(_(e)){let s={};const r=p["lodash"].cloneDeep(e);let i=new Map;const o=T(t);o.forEach(e=>i.set(e.nodeId,e)),r.forEach(e=>{const{parentNodeId:t}=e;if(t){const t=R({node:e,treeMap:i}),r=i.get(t);if(r){const{originalValue:t,id:i}=r;s[i]=t,$({obj:s[i],node:e}),a[i]=s[i]}}else e.leaf&&(a[e.id]=e.value)})}return a}function O({suffix:e,val:t,isIEC:a=!1,reverse:s=!1}){let r,i=t,o=a?1024:1e3;switch(e){case"Ki":case"k":r=Math.pow(o,1);break;case"Mi":case"M":r=Math.pow(o,2);break;case"Gi":case"G":r=Math.pow(o,3);break;case"Ti":case"T":r=Math.pow(o,4);break;default:r=Math.pow(o,0)}return s?Math.floor(i/r):i*r}function I({suffix:e,val:t,toMilliseconds:a=!0}){let s;switch(e){case"s":s=a?1e3*t:t/1e3;break;case"m":s=a?60*t*1e3:t/6e4;break;case"h":s=a?60*t*60*1e3:t/36e5;break;case"ms":default:s=t}return Math.floor(s)}function C(e,t){let a=null,s=null;for(let r=0;r<t.length;++r)if(e.value.includes(t[r])){a=t[r],s=e.value.indexOf(a);break}return{suffix:a,indexOfSuffix:s}}function w({label:e,value:t,colorIndex:a,timestamp:s,id:r,data:i}){const o=Object(p["dynamicColors"])(a),n=o.lastIndexOf(")")-1,c=Object(p["strReplaceAt"])({str:o,index:n,newChar:"0.1"});let l=Date.now();s&&(l=s);let d={label:e,id:e,type:"line",backgroundColor:c,borderColor:o,borderWidth:1,lineTension:0,data:[{x:l,y:t}]};return r&&(d.resourceId=r),i&&(d.data=i),d}function L(e){e.key.match(/^[-]?\d*$/g)||e.preventDefault()}function N({arr:e,pickBy:t}){return Math.min(...e.map(e=>e[t]))}function M({arr:e,pickBy:t}){let a=p["lodash"].countBy(e,t);return Object.keys(a).reduce((e,t)=>a[e]>a[t]?e:t,[])}function k(e){if(!e||!e.slave_connections.length)return[];const t=[];return e.slave_connections.forEach(a=>{const{seconds_behind_master:s,slave_io_running:r,slave_sql_running:i}=a;let o="Lagging";"No"===r||"No"===i?o="Stopped":0===s&&(o="Yes"===i&&"Yes"===r?"Running":"Yes"!==r?r:i),t.push({name:e.name,replication_state:o,...a})}),t}function D(e){const{socket:t,address:a,port:s}=e;return""+(t||`${a}:${s}`)}var P=a("5395"),U=a("2f62"),F=a("2b88"),V=a.n(F),G=a("2ead"),B=a.n(G),j=a("4623"),z=a.n(j),q=a("a925"),K=a("3065");r["default"].use(q["a"]),r["default"].use(d["a"],{i18n:a("0550").default}),r["default"].use(i["a"]),r["default"].use(o["a"],{addon:{...s,...P}}),r["default"].use(c["a"]),r["default"].use(l["a"]),r["default"].use(n["a"]),r["default"].use(u["a"]),r["default"].use(U["a"]),r["default"].use(V.a),r["default"].use(B.a),z()(r["default"].moment);const Y=a("4360").default;r["default"].use(a("10ff").default,{store:Y}),r["default"].use(K["a"],{store:Y});var H=a("0550"),W=a("4a5f"),X=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-app",[a("overlay"),a(e.$route.meta.layout,{tag:"component"}),a("mxs-dlg",{attrs:{onSave:e.confirmUpdate,title:""+e.$mxs_t("newUpdateAvailable"),saveText:"update",isForceAccept:""},model:{value:e.updateExists,callback:function(t){e.updateExists=t},expression:"updateExists"}}),a("mxs-truncate-tooltip")],1)},J=[],Z=(a("fb98"),a("4360")),Q=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"fill-height"},[a("app-header"),a("navigation"),a("snackbars",{attrs:{msgObj:e.snackbar_message}}),a("v-main",{staticClass:"fill-height"},[a("transition",{attrs:{name:"fade",mode:"out-in"}},[e.$route.meta.requiresAuth?a("router-view"):e._e()],1)],1),a("v-footer",{staticClass:"pl-2 d-flex mxs-color-helper white border-top-separator justify-center",attrs:{padless:"",app:"",height:"40",inset:""}},[a("span",{staticClass:"footer-text mxs-color-helper text-code-color align-center text-truncate"},[e._v(" © 2023 MariaDB. All rights reserved. "),a("span",{staticClass:"footer__separator"}),a("a",{staticClass:"rsrc-link",attrs:{target:"_blank",rel:"noopener noreferrer",href:"https://mariadb.com/privacy-policy/"}},[e._v(" Privacy Policy")]),a("span",{staticClass:"footer__separator"}),a("a",{staticClass:"rsrc-link",attrs:{target:"_blank",rel:"noopener noreferrer",href:"https://mariadb.com/product-terms-condition/"}},[e._v(" Terms of Use ")])])])],1)},ee=[],te=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-navigation-drawer",{staticClass:"main-nav mxs-color-helper bg-navigation",attrs:{"mini-variant":e.isMini,color:"navigation",width:"250","mini-variant-width":"50",fixed:"",left:"",clipped:"",app:"",permanent:""},on:{"update:miniVariant":function(t){e.isMini=t},"update:mini-variant":function(t){e.isMini=t}},nativeOn:{mouseover:function(t){e.isMini=!1},mouseout:function(t){e.isMini=!0}}},[a("v-list",e._l(e.items,(function(t){return a("v-list-item-group",{key:t.label},[a("v-list-item",{class:{navitem:!0,active:e.currentPath.includes(t.path)},on:{click:function(a){return e.navigate(t)}}},[a("v-list-item-icon",{staticClass:"mx-0"},[a("v-icon",{attrs:{size:t.meta.size,color:"white"}},[e._v(e._s(t.meta.icon))])],1),a("v-list-item-content",[a("v-list-item-title",{staticClass:"text-capitalize"},[e._v(" "+e._s("dashboards"===t.label?e.$mxs_tc(""+t.label,1):e.$mxs_tc(""+t.label,2))+" ")])],1)],1),a("v-divider",{key:"divider-"+t.label})],1)})),1)],1)},ae=[],se=a("d046"),re={name:"navigation",data(){return{isMini:!0,items:se["c"]}},computed:{currentPath:function(){return this.$route.path}},methods:{navigate(e){const{path:t,meta:a}=e,s=this.currentPath.includes(a.redirect||t);t&&t!==this.currentPath&&!s&&this.$router.push(t)}}},ie=re,oe=(a("c9eb"),a("2877")),ne=a("6544"),ce=a.n(ne),le=a("ce7e"),de=a("132d"),ue=a("8860"),pe=a("da13"),me=a("5d23"),_e=a("1baa"),he=a("34c3"),fe=a("f774"),Se=Object(oe["a"])(ie,te,ae,!1,null,"569cf074",null),ve=Se.exports;ce()(Se,{VDivider:le["a"],VIcon:de["a"],VList:ue["a"],VListItem:pe["a"],VListItemContent:me["a"],VListItemGroup:_e["a"],VListItemIcon:he["a"],VListItemTitle:me["c"],VNavigationDrawer:fe["a"]});var ge=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("v-app-bar",{staticClass:"header pl-12 pr-2",attrs:{height:"50px",fixed:"","clipped-left":"",app:"",flat:"",color:"deep-ocean"}},[s("v-toolbar-title",{staticClass:"app-headline text-h5"},[s("router-link",{attrs:{to:"/dashboard/servers"}},[s("img",{attrs:{src:a("6254"),alt:"MariaDB Logo"}}),s("span",{staticClass:"product-name tk-azo-sans-web font-weight-medium white--text"},[e._v(" MaxScale ")])])],1),s("v-spacer"),s("v-menu",{attrs:{"allow-overflow":"",transition:"slide-y-transition","offset-y":"","content-class":"mariadb-select-v-menu mariadb-select-v-menu--no-border"},scopedSlots:e._u([{key:"activator",fn:function(t){var a=t.on;return[s("v-btn",e._g({staticClass:"mr-0 arrow-toggle",attrs:{dark:"",text:"",tile:""}},a),[s("v-icon",{staticClass:"mr-1 ",attrs:{size:"30"}},[e._v(" $vuetify.icons.mxs_user ")]),s("span",{staticClass:"user-name tk-adrianna text-capitalize font-weight-regular"},[e._v(" "+e._s(e.logged_in_user?e.logged_in_user.name:"")+" ")]),s("v-icon",{staticClass:"mr-0 ml-1 ",class:[e.isProfileOpened?"rotate-up":"rotate-down"],attrs:{size:"14",left:""}},[e._v(" $vuetify.icons.mxs_arrowDown ")])],1)]}}]),model:{value:e.isProfileOpened,callback:function(t){e.isProfileOpened=t},expression:"isProfileOpened"}},[s("v-list",{staticClass:"mxs-color-helper bg-navigation",attrs:{dark:""}},[s("v-list-item",{on:{click:e.logout}},[s("v-list-item-title",[e._v(e._s(e.$mxs_t("logout")))])],1)],1)],1)],1)},Ee=[],ye={name:"app-header",data(){return{items:[],isProfileOpened:!1}},computed:{...Object(U["e"])("user",{logged_in_user:e=>e.logged_in_user})},methods:{...Object(U["b"])("user",["logout"])}},be=ye,Ae=(a("7c40"),a("40dc")),Te=a("8336"),Re=a("e449"),$e=a("2fa4"),xe=a("2a7f"),Oe=Object(oe["a"])(be,ge,Ee,!1,null,"59cc6a07",null),Ie=Oe.exports;ce()(Oe,{VAppBar:Ae["a"],VBtn:Te["a"],VIcon:de["a"],VList:ue["a"],VListItem:pe["a"],VListItemTitle:me["c"],VMenu:Re["a"],VSpacer:$e["a"],VToolbarTitle:xe["a"]});var Ce=a("258d"),we={name:"app-layout",components:{navigation:ve,"app-header":Ie,snackbars:Ce["a"]},computed:{...Object(U["e"])({snackbar_message:e=>e.mxsApp.snackbar_message})}},Le=we,Ne=(a("08d6"),a("553a")),Me=a("f6c4"),ke=Object(oe["a"])(Le,Q,ee,!1,null,null,null),De=ke.exports;ce()(ke,{VFooter:Ne["a"],VMain:Me["a"]});var Pe=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.$route.meta.requiresAuth?e._e():a("router-view")},Ue=[],Fe={name:"no-layout"},Ve=Fe,Ge=Object(oe["a"])(Ve,Pe,Ue,!1,null,null,null),Be=Ge.exports,je=a("5a7a"),ze={store:Z["default"],components:{Overlay:je["a"],AppLayout:De,NoLayout:Be},computed:{...Object(U["e"])(["update_availability"]),updateExists:function(){return this.update_availability},logger:function(){return this.$logger("main")}},watch:{$route:function(){this.SET_SEARCH_KEYWORD("")}},mounted(){let e=document.getElementById("global-overlay");e&&(e.style.display="none")},async created(){this.logger.info(this.$store.state.app_config.asciiLogo),this.logger.info("Loaded Version: 1.0.0"),await this.authCheck()},methods:{...Object(U["d"])(["SET_UPDATE_AVAILABILITY","SET_SEARCH_KEYWORD"]),...Object(U["b"])({authCheck:"user/authCheck"}),confirmUpdate(){this.SET_UPDATE_AVAILABILITY(!1),window.location.reload(),this.logger.info("App is updated")}}},qe=ze,Ke=a("7496"),Ye=Object(oe["a"])(qe,X,J,!1,null,null,null),He=Ye.exports;ce()(Ye,{VApp:Ke["a"]});var We=a("a18c"),Xe=a("ba78");Object.keys(Xe["a"]).forEach(e=>{r["default"].component(e,Xe["a"][e])}),r["default"].config.productionTip=!1,new r["default"]({vuetify:W["a"],router:We["a"],i18n:H["default"],render:e=>e(He)}).$mount("#app")},"7c40":function(e,t,a){"use strict";a("d0d6")},a18c:function(e,t,a){"use strict";a("ddb0");var s=a("2b0e"),r=a("8c4f"),i=a("d046"),o=a("9851"),n=a("4360");s["default"].use(r["a"]);let c=new r["a"]({routes:i["b"]});async function l(e){n["default"].commit("mxsApp/SET_OVERLAY_TYPE",e,{root:!0}),await n["default"].vue.$helpers.delay(400).then(()=>n["default"].commit("mxsApp/SET_OVERLAY_TYPE",null,{root:!0}))}async function d(e,t,a){const{vue:{$typy:s},state:r}=n["default"],i=s(r,"user.logged_in_user.isLoggedIn").safeBoolean;i?("login"===t.name&&await l(o["a"]),a()):("/"!==t.path&&await l(o["b"]),a({path:"/login",query:{redirect:e.path}}))}c.beforeEach(async(e,t,a)=>{await n["default"].restored,n["default"].commit("SET_PREV_ROUTE",t);const s=e.matched.some(e=>e.meta.requiresAuth);s?await d(e,t,a):await Promise.all([n["default"].dispatch("checkingForUpdate"),a()])}),t["a"]=c},a18cd:function(e,t,a){},a27e:function(e,t,a){"use strict";a.d(t,"b",(function(){return d})),a.d(t,"d",(function(){return u})),a.d(t,"a",(function(){return c})),a.d(t,"c",(function(){return l}));var s=a("bc3a"),r=a.n(s),i=a("9a35"),o=a("a18c");let n=new AbortController;const c=()=>{n.abort(),n=new AbortController};function l(){return r.a.create({baseURL:"/",headers:{"X-Requested-With":"XMLHttpRequest","Content-Type":"application/json","Cache-Control":"no-cache"}})}const d=l();function u(e){let t=l();return t.interceptors.request.use(e=>({...e,signal:n.signal}),e=>Promise.reject(e)),t.interceptors.response.use(e=>e,async t=>{const{response:{status:a=null}={}}=t||{};switch(a){case 401:c(),await e.dispatch("user/logout");break;case 404:await o["a"].push("/404");break;case null:Object(i["b"])({store:e,error:t});break;default:Object(i["a"])({store:e,error:t})}}),t}d.interceptors.request.use(e=>({...e}),e=>Promise.reject(e))},b5e2:function(e,t,a){e.exports=function(){return new Worker(a.p+"232f8e5df6cfb0f39f7a.worker.js")}},c9d9:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));const s=Object.freeze({asciiLogo:"\n.___ ___. ___ ___ ___ _______. ______ ___ __ _______\n| \\/ | / \\ \\ \\ / / / | / | / \\ | | | ____|\n| \\ / | / ^ \\ \\ V / | (----'| ,----' / ^ \\ | | | |__\n| |\\/| | / /_\\ \\ > < \\ \\ | | / /_\\ \\ | | | __|\n| | | | / _____ \\ / . \\ .----) | | '----. / _____ \\ | '----.| |____\n|__| |__| /__/ \\__\\ /__/ \\__\\ |_______/ \\______|/__/ \\__\\ |_______||_______|\n",ICON_SHEETS:{monitors:{frames:["$vuetify.icons.mxs_stopped","$vuetify.icons.mxs_good"],colorClasses:["text-grayed-out","text-success"]},services:{frames:["$vuetify.icons.mxs_critical","$vuetify.icons.mxs_good","$vuetify.icons.mxs_stopped"],colorClasses:["text-error","text-success","text-grayed-out"]},listeners:{frames:["$vuetify.icons.mxs_critical","$vuetify.icons.mxs_good","$vuetify.icons.mxs_stopped"],colorClasses:["text-error","text-success","text-grayed-out"]},servers:{frames:["$vuetify.icons.mxs_criticalServer","$vuetify.icons.mxs_goodServer","$vuetify.icons.mxs_maintenance"],colorClasses:["text-error","text-success","text-grayed-out"]},replication:{frames:["$vuetify.icons.mxs_stopped","$vuetify.icons.mxs_good","$vuetify.icons.mxs_statusWarning"],colorClasses:["text-grayed-out","text-success","text-warning"]},logPriorities:{frames:{alert:"$vuetify.icons.mxs_alertWarning",error:"$vuetify.icons.mxs_critical",warning:"$vuetify.icons.mxs_statusInfo",notice:"$vuetify.icons.mxs_reports",info:"$vuetify.icons.mxs_statusInfo",debug:"mdi-bug"},colorClasses:{alert:"text-error",error:"text-error",warning:"text-warning",notice:"text-info",info:"text-info",debug:"text-accent"}}},ROUTING_TARGET_RELATIONSHIP_TYPES:["servers","services","monitors"],ROUTE_GROUP:Object.freeze({DASHBOARD:"dashboard",VISUALIZATION:"visualization",CLUSTER:"cluster",DETAIL:"detail"}),DEF_REFRESH_RATE_BY_GROUP:Object.freeze({dashboard:10,visualization:60,cluster:60,detail:10}),RESOURCE_FORM_TYPES:Object.freeze({SERVICE:"Service",SERVER:"Server",MONITOR:"Monitor",LISTENER:"Listener",FILTER:"Filter"}),RELATIONSHIP_TYPES:Object.freeze({SERVICES:"services",SERVERS:"servers",MONITORS:"monitors",LISTENERS:"listeners",FILTERS:"filters"}),MAXSCALE_LOG_LEVELS:["alert","error","warning","notice","info","debug"],SERVER_OP_TYPES:Object.freeze({MAINTAIN:"maintain",CLEAR:"clear",DRAIN:"drain",DELETE:"delete"}),MONITOR_OP_TYPES:Object.freeze({STOP:"stop",START:"start",DESTROY:"destroy",SWITCHOVER:"async-switchover",RESET_REP:"async-reset-replication",RELEASE_LOCKS:"async-release-locks",FAILOVER:"async-failover",REJOIN:"async-rejoin",CS_GET_STATUS:"async-cs-get-status",CS_STOP_CLUSTER:"async-cs-stop-cluster",CS_START_CLUSTER:"async-cs-start-cluster",CS_SET_READONLY:"async-cs-set-readonly",CS_SET_READWRITE:"async-cs-set-readwrite",CS_ADD_NODE:"async-cs-add-node",CS_REMOVE_NODE:"async-cs-remove-node"}),USER_ROLES:Object.freeze({ADMIN:"admin",BASIC:"basic"}),USER_ADMIN_ACTIONS:Object.freeze({DELETE:"delete",UPDATE:"update",ADD:"add"}),DURATION_SUFFIXES:["ms","s","m","h"]})},c9eb:function(e,t,a){"use strict";a("e4da")},d046:function(e,t,a){"use strict";a.d(t,"a",(function(){return I})),a.d(t,"d",(function(){return C})),a.d(t,"c",(function(){return w})),a.d(t,"b",(function(){return L}));a("ddb0");var s=a("c9d9");const r=()=>a.e("login~08e2bc19").then(a.bind(null,"31e4")),i=()=>a.e("not-found-page~cb4b6b25").then(a.bind(null,"6fba")),o=()=>Promise.all([a.e("npm.vuetify~dde583c9"),a.e("npm.vuetify~78934547"),a.e("npm.vuetify~1655f327"),a.e("npm.vuetify~ff5aaa04"),a.e("npm.vuetify~ce053847"),a.e("npm.vuetify~4548d73a"),a.e("dsh~9d039f3a")]).then(a.bind(null,"6693")),n=()=>a.e("dsh-servers~a204d7be").then(a.bind(null,"0377")),c=()=>a.e("dsh-services~71e885bc").then(a.bind(null,"2e96")),l=()=>a.e("dsh-sessions~3a91f2c8").then(a.bind(null,"9d46")),d=()=>a.e("dsh-listeners~1eec58a3").then(a.bind(null,"e39f")),u=()=>a.e("dsh-filters~f2ddec43").then(a.bind(null,"724e")),p=()=>a.e("vis~4a6ae84a").then(a.bind(null,"8e46")),m=()=>a.e("vis-conf~d4ecaaa3").then(a.bind(null,"78da")),_=()=>a.e("vis-clusters~d4ecaaa3").then(a.bind(null,"8ace")),h=()=>a.e("query-page~0f3152c4").then(a.bind(null,"8874")),f=()=>a.e("users~368a3cdd").then(a.bind(null,"fa88")),S=()=>a.e("logs~c667b1c3").then(a.bind(null,"f061")),v=()=>Promise.all([a.e("npm.vuetify~dde583c9"),a.e("npm.vuetify~78934547"),a.e("npm.vuetify~1655f327"),a.e("npm.vuetify~ff5aaa04"),a.e("npm.vuetify~ce053847"),a.e("npm.vuetify~4548d73a"),a.e("settings~942c45a7")]).then(a.bind(null,"4399")),g=()=>Promise.all([a.e("npm.vuetify~dde583c9"),a.e("npm.vuetify~78934547"),a.e("npm.vuetify~1655f327"),a.e("npm.vuetify~ff5aaa04"),a.e("npm.vuetify~ce053847"),a.e("npm.vuetify~4548d73a"),a.e("server-detail~112ced2d")]).then(a.bind(null,"c9ef")),E=()=>Promise.all([a.e("npm.vuetify~dde583c9"),a.e("npm.vuetify~78934547"),a.e("npm.vuetify~1655f327"),a.e("npm.vuetify~ff5aaa04"),a.e("npm.vuetify~ce053847"),a.e("npm.vuetify~4548d73a"),a.e("service-detail~9452d869")]).then(a.bind(null,"742b")),y=()=>a.e("monitor-detail~7d33e2e2").then(a.bind(null,"6beb")),b=()=>a.e("listener-detail~d69e0970").then(a.bind(null,"529c")),A=()=>a.e("filter-detail~eb71885e").then(a.bind(null,"a746")),T=()=>a.e("cluster-detail~062cc45a").then(a.bind(null,"195a")),{DASHBOARD:R,VISUALIZATION:$,CLUSTER:x,DETAIL:O}=s["a"].ROUTE_GROUP,I=[{path:"/dashboard/servers",component:n,meta:{requiresAuth:!0,layout:"app-layout",group:R},name:"servers",text:"servers",isTabRoute:!0},{path:"/dashboard/sessions",component:l,meta:{requiresAuth:!0,layout:"app-layout",group:R},name:"sessions",text:"currentSessions",isTabRoute:!0},{path:"/dashboard/services",component:c,meta:{requiresAuth:!0,layout:"app-layout",group:R},name:"services",text:"services",isTabRoute:!0},{path:"/dashboard/listeners",component:d,meta:{requiresAuth:!0,layout:"app-layout",group:R},name:"listeners",text:"listeners",isTabRoute:!0},{path:"/dashboard/filters",component:u,meta:{requiresAuth:!0,layout:"app-layout",group:R},name:"filters",text:"filters",isTabRoute:!0}],C=[{path:"/visualization/configuration",component:m,meta:{requiresAuth:!0,layout:"app-layout",group:$},name:"configuration",text:"configuration"},{path:"/visualization/clusters",component:_,meta:{requiresAuth:!0,layout:"app-layout",group:$},name:"clusters",text:"clusters"}],w=[{path:"/dashboard",component:o,meta:{requiresAuth:!0,keepAlive:!0,layout:"app-layout",size:22,icon:"$vuetify.icons.mxs_tachometer",redirect:"/dashboard/servers",group:R},name:"dashboard",label:"dashboards",children:I},{path:"/visualization",component:p,meta:{requiresAuth:!0,keepAlive:!0,layout:"app-layout",size:22,icon:"$vuetify.icons.mxs_reports",redirect:"/visualization/configuration",group:$},name:"visualization",label:"visualization",children:C},{path:"/query",component:h,meta:{requiresAuth:!0,layout:"app-layout",size:22,icon:"$vuetify.icons.mxs_queryEditor"},name:"queryEditor",label:"queryEditor"},{path:"/users",component:f,meta:{requiresAuth:!0,layout:"app-layout",size:22,icon:"$vuetify.icons.mxs_users"},name:"users",label:"users"},{path:"/logs",component:S,meta:{requiresAuth:!0,layout:"app-layout",size:22,icon:"$vuetify.icons.mxs_logs"},name:"logsArchive",label:"logsArchive"},{path:"/settings",component:v,meta:{requiresAuth:!0,layout:"app-layout",size:22,icon:"$vuetify.icons.mxs_settings"},name:"settings",label:"settings"}],L=[{path:"/",redirect:"/dashboard/servers"},{path:"/dashboard",redirect:"/dashboard/servers"},{path:"/dashboard/monitors",redirect:"/dashboard/servers"},{path:"/visualization",redirect:"/visualization/configuration"},{path:"*",redirect:"/404"},{path:"/login",name:"login",component:r,meta:{requiresAuth:!1,guest:!0,layout:"no-layout"}},{path:"/404",name:"not-found",component:i,meta:{requiresAuth:!0,layout:"app-layout"}},...w,{path:"/dashboard/services/:id",component:E,meta:{requiresAuth:!0,layout:"app-layout",group:O},name:"service"},{path:"/dashboard/servers/:id",component:g,meta:{requiresAuth:!0,layout:"app-layout",group:O},name:"server"},{path:"/dashboard/monitors/:id",component:y,meta:{requiresAuth:!0,layout:"app-layout",group:O},name:"monitor"},{path:"/dashboard/listeners/:id",component:b,meta:{requiresAuth:!0,layout:"app-layout",group:O},name:"listener"},{path:"/dashboard/filters/:id",component:A,meta:{requiresAuth:!0,layout:"app-layout",group:O},name:"filter"},{path:"/visualization/clusters/:id",component:T,meta:{requiresAuth:!0,layout:"app-layout",group:x},name:"cluster"}]},d0d6:function(e,t,a){},e4da:function(e,t,a){},fb98:function(e,t,a){}});
Coded by KALI :v Greetz to DR HARD ../ kali.zbi@hotmail.com