← Back
Editing: index-legacy283.js
!function(){function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}function r(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function e(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?r(Object(o),!0).forEach((function(r){n(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(o,r))}))}return t}function n(r,e,n){return(e=function(r){var e=function(r,e){if("object"!=t(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"==t(e)?e:e+""}(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return e};var r,e={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(r){f=function(t,r,e){return t[r]=e}}function p(t,r,e,n){var o=r&&r.prototype instanceof b?r:b,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:P(t,e,c)}),i}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var y="suspendedStart",d="suspendedYield",v="executing",m="completed",g={};function b(){}function w(){}function _(){}var j={};f(j,u,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(D([])));O&&O!==n&&i.call(O,u)&&(j=O);var L=_.prototype=b.prototype=Object.create(j);function E(t){["next","throw","return"].forEach((function(r){f(t,r,(function(t){return this._invoke(r,t)}))}))}function k(r,e){function n(o,a,c,u){var l=h(r[o],r,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==t(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return n("throw",t,c,u)}))}u(l.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}})}function P(t,e,n){var o=y;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:r,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(t,e,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function S(t,e){var n=e.method,o=t.iterator[n];if(o===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,S(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=h(o,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,g;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,g):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function G(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function N(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(G,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o<e.length;)if(i.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return w.prototype=_,a(L,"constructor",{value:_,configurable:!0}),a(_,"constructor",{value:w,configurable:!0}),w.displayName=f(_,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===w||"GeneratorFunction"===(r.displayName||r.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,f(t,s,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},E(k.prototype),f(k.prototype,l,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(p(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(L),f(L,s,"Generator"),f(L,u,(function(){return this})),f(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(N),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),N(e),g}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;N(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:D(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),g}},e}function i(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void e(t)}c.done?r(u):Promise.resolve(u).then(n,o)}function a(t){return function(){var r=this,e=arguments;return new Promise((function(n,o){var a=t.apply(r,e);function c(t){i(a,n,o,c,u,"next",t)}function u(t){i(a,n,o,c,u,"throw",t)}c(void 0)}))}}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./index-legacy103.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./firewall-legacy.js?v=VERSION_NUMBER","./column-legacy.js?v=VERSION_NUMBER","./useMethod-legacy6.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER","./index-legacy104.js?v=VERSION_NUMBER","./useStore-legacy5.js?v=VERSION_NUMBER","./validator-legacy.js?v=VERSION_NUMBER"],(function(t,r){"use strict";var n,i,c,u,l,s,f,p,h,y,d,v,m,g,b,w,_,j,x,O,L,E,k,P,S,G;return{setters:[function(t){n=t.N,i=t.dG,c=t.K,u=t.n,l=t.L,s=t.p,f=t.l},function(t){p=t._},function(t){h=t.c,y=t.r,d=t.e,v=t.B,m=t.p,g=t.G,b=t.q,w=t.v,_=t.A,j=t.H,x=t.x,O=t.D},function(t){L=t.ad,E=t.ae,k=t.af},function(t){P=t.u},function(t){S=t.m,G=t.o},null,null,null,null],execute:function(){t("default",h({__name:"index",setup:function(t){var h=y(!1),N=y(),C=function(){var t=a(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c({loading:h,request:L(),data:[Array,N]});case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),D=function(){u({title:"自定义词库",area:44,component:function(){return l((function(){return r.import("./own-thesaurus-legacy.js?v=VERSION_NUMBER")}),void 0,r.meta.url)}})},T=function(){var t=a(o().mark((function t(r){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s({icon:"warning-filled",title:"删除监控【"+r.name+"】",width:"34rem",content:"删除后无法继续监控该网站,是否继续?"});case 2:return t.next=4,c({loading:"正在删除监控,请稍后...",request:E({id:r.id}),message:!0});case 4:C();case 5:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}(),F=function(){var t=a(o().mark((function t(e){var n,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c({request:k({id:e.id})});case 2:i=t.sent,u({title:"检测详情",area:[64,50],btn:["停止检测"],component:function(){return l((function(){return r.import("./scan-details-legacy.js?v=VERSION_NUMBER")}),void 0,r.meta.url)},compData:{name:e.name,id:e.id,path_info:null===(n=i.data)||void 0===n?void 0:n.path_info}});case 4:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}(),A=function(t){u({title:"添加监控",area:68,showFooter:!0,compData:e(e({},t),{},{refreshEvent:C}),component:function(){return l((function(){return r.import("./add-monitor-legacy.js?v=VERSION_NUMBER")}),void 0,r.meta.url)}})},q=[{label:"监控名",prop:"name"},{label:"网站/URL",prop:"url"},{label:"监控方式",prop:"method",render:function(t){return S[t.method]}},{label:"上一次检测时间",minWidth:110,render:function(t){return n(t.last_scan_time)&&!t.last_scan_time.length?"未检测":t.last_scan_time?i(t.last_scan_time):"未检测"}},{label:"上一次风险",minWidth:90,render:function(t){return[t.last_risk_count>0?d("span",{class:"bt-link !text-danger",onClick:function(){return G(t)}},[t.last_risk_count]):d("span",null,[v("无风险")])]}},{label:"计划任务状态",prop:"crontab_status",minWidth:100,render:function(t){return[1===t.crontab_status?d("span",null,[v("正常")]):d("span",{style:"color:#f0ad4e;cursor:pointer",onClick:function(){return function(t){return u({isAsync:!0,title:"修复计划任务【".concat(t.name,"】"),area:64,component:function(){return l((function(){return r.import("./repair-crontab-legacy.js?v=VERSION_NUMBER")}),void 0,r.meta.url)},compData:e(e({},t),{},{refreshEvent:C}),showFooter:!0})}(t)}},[v("未设置")])]}},{label:"发送告警",prop:"send_msg",render:function(t){return d("span",{style:"color:".concat(1===t.send_msg?"#20a53a":"#f0ad4e",";cursor:pointer"),onClick:function(){return A(t)}},[1===t.send_msg?"已开启":"未开启"])}},{label:"检测频率",prop:"crontab_info",render:function(t){return t.crontab_info?t.crontab_info.cycle:t.crontab_info}},P([{onClick:F,title:"立即检测",width:70},{onClick:A,title:"编辑"},{onClick:T,title:"删除"}])];return m((function(){return C()})),function(t,r){var e=O,n=f,o=p,i=g("bt-loading");return b(),w("div",null,[d(o,null,{"header-left":_((function(){return[d(e,{type:"primary",onClick:r[0]||(r[0]=function(t){return A()})},{default:_((function(){return r[1]||(r[1]=[v("添加监控")])})),_:1}),d(e,{onClick:D},{default:_((function(){return r[2]||(r[2]=[v("自定义词库")])})),_:1})]})),content:_((function(){return[j(d(n,{ref:"portTable",column:q,data:x(N),description:"监控列表为空"},null,8,["data"]),[[i,x(h)],[i,"正在加载监控列表,请稍后...","title"]])]})),popup:_((function(){return r[3]||(r[3]=[])})),_:1})])}}}))}}}))}();
Save File
Cancel