File: /www/server/panel/BTPanel/static/js/useStore-legacy9.js
!function(){function t(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var n,o,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",c=r.toStringTag||"@@toStringTag";function s(t,r,a,c){var s=r&&r.prototype instanceof l?r:l,i=Object.create(s.prototype);return e(i,"_invoke",function(t,e,r){var a,c,s,l=0,i=r||[],p=!1,g={p:0,n:0,v:n,a:f,f:f.bind(n,4),d:function(t,e){return a=t,c=0,s=n,g.n=e,u}};function f(t,e){for(c=t,s=e,o=0;!p&&l&&!r&&o<i.length;o++){var r,a=i[o],f=g.p,d=a[2];t>3?(r=d===e)&&(s=a[(c=a[4])?5:(c=3,3)],a[4]=a[5]=n):a[0]<=f&&((r=t<2&&f<a[1])?(c=0,g.v=e,g.n=a[1]):f<d&&(r=t<3||a[0]>e||e>d)&&(a[4]=t,a[5]=e,g.n=d,c=0))}if(r||t>1)return u;throw p=!0,e}return function(r,i,d){if(l>1)throw TypeError("Generator is already running");for(p&&1===i&&f(i,d),c=i,s=d;(o=c<2?n:s)||!p;){a||(c?c<3?(c>1&&(g.n=-1),f(c,s)):g.n=s:g.v=s);try{if(l=2,a){if(c||(r="next"),o=a[r]){if(!(o=o.call(a,s)))throw TypeError("iterator result is not an object");if(!o.done)return o;s=o.value,c<2&&(c=0)}else 1===c&&(o=a.return)&&o.call(a),c<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),c=1);a=n}else if((o=(p=g.n<0)?s:t.call(e,g))!==u)break}catch(o){a=n,c=1,s=o}finally{l=1}}return{value:o,done:p}}}(t,a,c),!0),i}var u={};function l(){}function i(){}function p(){}o=Object.getPrototypeOf;var g=[][a]?o(o([][a]())):(e(o={},a,function(){return this}),o),f=p.prototype=l.prototype=Object.create(g);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,e(t,c,"GeneratorFunction")),t.prototype=Object.create(f),t}return i.prototype=p,e(f,"constructor",p),e(p,"constructor",i),i.displayName="GeneratorFunction",e(p,c,"GeneratorFunction"),e(f),e(f,c,"Generator"),e(f,a,function(){return this}),e(f,"toString",function(){return"[object Generator]"}),(t=function(){return{w:s,m:d}})()}function e(t,n,o,r){var a=Object.defineProperty;try{a({},"",{})}catch(t){a=0}e=function(t,n,o,r){function c(n,o){e(t,n,function(t){return this._invoke(n,o,t)})}n?a?a(t,n,{value:o,enumerable:!r,configurable:!r,writable:!r}):t[n]=o:(c("next",0),c("throw",1),c("return",2))},e(t,n,o,r)}function n(t,e,n,o,r,a,c){try{var s=t[a](c),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(o,r)}function o(t){return function(){var e=this,o=arguments;return new Promise(function(r,a){var c=t.apply(e,o);function s(t){n(c,r,a,s,u,"next",t)}function u(t){n(c,r,a,s,u,"throw",t)}s(void 0)})}}System.register(["./base-lib-legacy.js?v=1777008528","./utils-lib-legacy.js?v=1777008528"],function(e,n){"use strict";var r,a,c,s,u,l,i,p,g,f,d;return{setters:[function(t){r=t.aJ,a=t.aI,c=t.r,s=t.V,u=t.H,l=t.b},function(t){i=t.u,p=t.k,g=t.o,f=t.M,d=t.eF}],execute:function(){e("g",function(t){return i.post("/mod/ssh/com/get_ssh_list",{data:t,customType:"model",check:"array",skipPending:!0})}),e("l",function(){return i.post("monitor/soft/soft_log_list",{customType:"model",check:"array"})}),e("n",function(t){return i.post("monitor/soft/get_log",{data:t,customType:"model",check:"object"})}),e("y",function(t){return i.post("logs/panel/get_slow_logs",{data:t,customType:"model",check:"object"})}),e("z",function(t){return i.post("database/GetErrorLog",{check:"string",data:t})});var n=e("u",function(t){return i.post("data/getData",{data:t,check:"object"})}),m=(e("p",function(t){return i.post("logs/ftp/set_ftp_log",{check:"msg",customType:"model",data:t})}),e("q",function(t){return i.post("ftp/get_login_logs",{data:t,check:"object"})}),e("t",function(t){return i.post("logs/ftp/get_action_log",{check:"object",customType:"model",data:t})}),e("v",function(t){return i.post("monitor/soft/get_docker_log?name=Docker",{data:t,customType:"model",check:"object"})}),e("m",function(t){return i.post("monitor/soft/get_log",{data:t,customType:"model",check:"array"})}),e("x",function(t){return i.post("monitor/soft/get_bt_security_log?name=bt_security",{data:t,customType:"model",check:"object"})}),e("w",function(t){return i.post("monitor/soft/get_syssafe_log?name=syssafe",{data:t,customType:"model",check:"object"})}),function(t,e){var n={};return n.limit=t,e&&(n.search=e),i.post("logs/panel/get_panel_error_logs",{data:n,check:"object",customType:"model"})}),y=function(){return i.post("config/clean_panel_error_logs",{check:"msg"})},h=function(){return i.post("ajax/delClose",{check:"msg"})},v=function(){return i.post("logs/panel/IP_geolocation",{customType:"model",check:"array"})},_=function(t){return i.post("crontab/GetLogs",{data:t,check:"object"})},b=(e("k",function(){return i.post("/logs/site/get_site_list",{check:"object",customType:"model"})}),e("E",function(t){return i.post("logs/site/get_site_access_logs",{data:t,customType:"model",check:"msg"})}),e("D",function(t){return i.post("logs/site/get_site_error_logs",{data:t,customType:"model",check:"msg"})}),e("H",function(t){return i.post("logs/panel/get_logs_bytype",{data:t,customType:"model",check:"object"})}),e("d",function(t){return i.post("logs/site/get_site_log_file",{data:t,customType:"model",check:"object"})}),e("s",function(t){return i.post("ajax/set_cron_task",{check:"msg",data:t})}),e("e",function(t){return i.post("ajax/get_result",{data:t,check:"object"})}),e("f",function(t){return i.post("ajax/log_analysis",{data:t,check:"msg"})}),e("h",function(t){return i.post("ajax/speed_log",{data:t,check:"object"})}),e("j",function(t){return i.post("ajax/get_detailed",{data:t,check:"object"})}),function(t){return i.post("crontab/download_logs",{data:t,check:"msg"})}),k=function(t){return i.post("crontab/clear_logs",{data:t,check:"msg"})},T=(e("C",function(t){return i.post("logs/site/download_logs",{data:t,customType:"model",check:"msg"})}),e("B",function(t){return i.post("logs/site/clear_logs",{data:t,check:"object",customType:"model"})}),e("a",function(t){return i.post("safe/syslog/export_ssh_log",{data:t,customType:"model",check:"object"})}),function(){return i.post("/logs/panel/clear_panel_login_log",{check:"object",customType:"model"})}),w=e("b",function(t){return i.post("/logs/panel/get_panel_login_log",{check:"object",customType:"model",data:t,skipPending:!0})}),j=function(t){return i.post("/logs/panel/export_panel_log",{data:t,check:"object",customType:"model"})},E=(e("O",function(){return i.post("logs/logserver/collect_list",{customType:"model",check:"array"})}),e("N",function(t){return i.post("logs/logserver/add_source",{data:t,customType:"model",check:"array"})}),e("J",function(t){return i.post("logs/logserver/remove_source",{data:t,customType:"model",check:"msg"})}),e("K",function(t){return i.post("logs/logserver/modify_logserver",{data:t,customType:"model",check:"msg"})}),e("M",function(t){return i.post("logs/logserver/add_logserver",{data:t,customType:"model",check:"msg"})}),e("P",function(){return i.post("logs/logserver/server_list",{customType:"model",check:"array"})}),e("F",function(t){return i.post("/monitor/sitelogpush/get_site_log_push_status",{data:t,check:"object",customType:"model"})}),e("G",function(t){return i.post("/monitor/sitelogpush/set_push_task",{data:t,check:"msg",customType:"model"})}),e("I",function(t){return i.post("/logs/panel/export_domain_log",{data:t,check:"object",customType:"model"})}),e("i",function(t){return i.post("/ajax?action=remove_analysis",{data:t,check:"object",customType:"model"})}),e("o",function(t){return i.post("/monitor/soft/del_soft_log",{data:t,check:"msg",customType:"model"})}),function(t){return i.post("/logs/panel/export_penel_login_log",{data:t,check:"object",customType:"model"})}),L=(e("c",function(t){return i.post("safe/syslog/create_ip_rules",{data:t,check:"array",customType:"model"})}),e("r",function(t){return i.post("safe/syslog/remove_ip_rules",{data:t,check:"array",customType:"model"})}),e("Q",r("LOG-PANEL-STORE",function(){var e=O(),r=a(e),l=r.outDataForm,i=r.searchValue,d=c(!1),L=c("全部"),S=c(""),x=c(0),q=c(""),A=function(){var e=o(t().m(function e(){var n,o,r,a=arguments;return t().w(function(t){for(;;)switch(t.p=t.n){case 0:return n=a.length>0&&void 0!==a[0]?a[0]:"",t.p=1,t.n=2,p({loading:"正在导出日志,请稍后...",request:j({search:n})});case 2:return o=t.v,t.a(2,{data:o.data,status:!0});case 3:return t.p=3,r=t.v,console.log(r),t.a(2,{data:{},status:!1,msg:"导出错误"})}},e,null,[[1,3]])}));return function(){return e.apply(this,arguments)}}(),D=function(){var e=o(t().m(function e(o){var r,a;return t().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,p({request:n(o),data:{data:Array,page:String}});case 1:return r=t.v,t.a(2,{data:r.data,total:g(r.page),other:{}});case 2:return t.p=2,a=t.v,console.log(a),t.a(2,{data:[],total:0,other:{}})}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}(),F=function(){var e=o(t().m(function e(){var n;return t().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,p({loading:"正在清空面板操作日志,请稍后...",request:h(),message:!0});case 1:return t.a(2,{msg:"清空日志成功",status:!0});case 2:return t.p=2,n=t.v,console.log(n),f.error("清空日志失败"),t.a(2,{data:{},status:!1,msg:"清空错误"})}},e,null,[[0,2]])}));return function(){return e.apply(this,arguments)}}(),G=function(){var e=o(t().m(function e(){var n,o;return t().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,p({loading:"正在获取ip数据,请稍后...",request:v(),data:Array});case 1:return n=t.v,t.a(2,{data:n,total:0,other:{}});case 2:return t.p=2,o=t.v,console.log(o),t.a(2,{data:[],total:0,other:{}})}},e,null,[[0,2]])}));return function(){return e.apply(this,arguments)}}(),P=function(){var e=o(t().m(function e(n){var o,r,a,c,s;return t().w(function(t){for(;;)switch(t.p=t.n){case 0:return o=n.count,r=n.type,c={Accepted:"success",Failed:"failure"},"all"===(a={limit:o,type:r}).type&&delete a.type,"Accepted"!==a.type&&"Failed"!==a.type||(a.type=c[a.type]),t.p=1,p({loading:"正在导出日志,请稍后...",request:E(a),success:function(t){window.open("/download?filename="+t.data.output_file,"_blank","noopener,noreferrer")}}),t.a(2,{status:!0,msg:"导出成功"});case 2:return t.p=2,s=t.v,console.log(s),t.a(2,{status:!1,msg:"导出失败"})}},e,null,[[1,2]])}));return function(t){return e.apply(this,arguments)}}(),I=function(){var e=o(t().m(function e(){var n;return t().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,p({loading:"正在清空日志,请稍后...",request:T(),message:!0});case 1:return t.a(2,{msg:"清空日志成功",status:!0});case 2:return t.p=2,n=t.v,console.log(n),t.a(2,{status:!1,msg:"清空日志失败"})}},e,null,[[0,2]])}));return function(){return e.apply(this,arguments)}}(),z=function(){var e=o(t().m(function e(n){var o,r;return t().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,p({request:w(n),data:{data:Array,total:Number}});case 1:return o=t.v,t.a(2,{data:o.data,total:o.total,other:{}});case 2:return t.p=2,r=t.v,console.log(r),t.a(2,{data:[],total:0,other:{}})}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}(),M=function(){var e=o(t().m(function e(n){var o;return t().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,p({loading:"正在获取日志数据,请稍后...",request:m(500,n),data:{data:[String,S],size:[Number,x]},success:function(t){return{data:t.data,size:t.size}}});case 1:t.n=3;break;case 2:return t.p=2,o=t.v,console.log(o),t.a(2,{data:"暂无日志",size:0});case 3:return t.a(2)}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}(),R=function(){var e=o(t().m(function e(){var n;return t().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,p({loading:"正在清空日志,请稍后...",request:y(),message:!0,success:M});case 1:return t.a(2,{msg:"清空日志成功",status:!0});case 2:return t.p=2,n=t.v,console.log(n),t.a(2,{status:!1,msg:"清空日志失败"})}},e,null,[[0,2]])}));return function(){return e.apply(this,arguments)}}(),N=c("暂无数据"),V=s({id:0,name:"",type:""}),W=u({time_search:[],type:""}),B=function(){var e=o(t().m(function e(o){var r,a;return t().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,p({request:n({search:i.value,limit:9999,table:"crontab",p:1}),data:{data:Array}});case 1:return r=t.v,t.a(2,{data:r.data,status:!0});case 2:return t.p=2,a=t.v,console.log(a),t.a(2,{data:[],status:!1,msg:"获取日志菜单失败"})}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}(),C=function(){var e=o(t().m(function e(n){var o,r;return t().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,p({request:_(n),data:{msg:[String,N]}});case 1:return o=t.v,t.a(2,{data:o.msg||"当前日志为空!",status:!0});case 2:return t.p=2,r=t.v,console.log(r),t.a(2,{msg:"当前日志为空!",status:!1})}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}(),H=function(){var e=o(t().m(function e(n){var o,r,a,c;return t().w(function(t){for(;;)switch(t.p=t.n){case 0:return o=n.id,r=n.day,t.p=1,t.n=2,p({loading:"正在清理日志,请稍后...",request:k({id:o,day:r}),message:!0});case 2:return a=t.v,C(V.value),t.a(2,{msg:a.msg,status:a.status});case 3:return t.p=3,c=t.v,console.log(c),t.a(2,{status:!1,msg:"清理日志失败"})}},e,null,[[1,3]])}));return function(t){return e.apply(this,arguments)}}(),J=function(){var e=o(t().m(function e(){var n,o,r,a,c;return t().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,n=l.value,o=n.isOutError,r=n.day,t.n=1,p({loading:"正在导出日志,请稍后...",request:b({type:o?"warring":"",day:"all"===r?"":r,id:V.value.id}),data:{status:Boolean,msg:String}});case 1:return a=t.v,window.open("/download?filename="+a.msg,"_blank","noopener,noreferrer"),t.a(2,{data:a,status:a.status});case 2:return t.p=2,c=t.v,console.log(c),t.a(2,{status:!1,msg:"导出日志失败"})}},e,null,[[0,2]])}));return function(){return e.apply(this,arguments)}}();return{isRefreshList:d,logType:L,clearOpLogsEvent:F,getLogsInfoEvent:D,getLoginLogsEvent:z,search:q,logMsg:S,size:x,getRunDataEvent:M,clearRunLogsEvent:R,logsMsg:N,currentItem:V,crontabForm:W,getLogsMenu:B,getLogsDataEvent:C,getIpDataEvent:G,outWebSiteEvent:A,clearShellLogEvent:H,outShellLogEvent:J,outLoginLogEvent:P,clearLoginLogEvent:I}}))),O=(e("R",function(){var t=L();return a(t)}),e("L",r("LOG-STORE",function(){var e=c(""),n=c("panel"),r=c("operateLog"),a=c("WebLogs"),i=c(),p=function(){var e=o(t().m(function e(){var o;return t().w(function(t){for(;;)switch(t.n){case 0:o=l(),n.value=o.name||"panel-log";case 1:return t.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),g=s([{label:"所有日志",value:"all"},{label:"仅保留近7天日志",value:"7"},{label:"仅保留近30天日志",value:"30"},{label:"仅保留近180天日志",value:"180"}]),f=u({type:"access",day:"all"}),m=c(""),y=c(!1),h=c(""),v=c(["ssh","login"]),_=u({type:"all",day:"all",isOutError:"",count:100});return{selectedWebSite:e,tabActive:n,panelTabActive:r,webTabActive:a,cutTabs:function(t){n.value=t,d("/logs/"+t)},init:p,clearOptions:g,clearDataForm:f,searchValue:m,logLoading:y,selectedItem:h,searchSubmit:function(){L().searchMenuData(m.value)},countType:v,outDataForm:_,configData:i,getType:function(t){return v.value.includes(t)?"all":"access"},$reset_out:function(){_.type="all",_.day="all",_.isOutError="",_.count=100}}})));e("A",function(){var t=O();return a(t)})}}})}();