@whyour/qinglong 2.18.0 → 2.18.2-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README-en.md +4 -127
- package/README.md +4 -125
- package/SECURITY.md +5 -0
- package/back.d.ts +9 -0
- package/package.json +6 -8
- package/sample/ql_sample.js +6 -0
- package/sample/ql_sample.py +6 -1
- package/shell/api.sh +4 -1
- package/shell/preload/client.js +45 -0
- package/shell/preload/client.py +113 -0
- package/shell/preload/sitecustomize.js +2 -0
- package/shell/preload/sitecustomize.py +2 -1
- package/shell/share.sh +15 -4
- package/shell/update.sh +2 -1
- package/static/build/api/log.js +1 -1
- package/static/build/app.js +0 -1
- package/static/build/config/index.js +0 -2
- package/static/build/config/util.js +8 -4
- package/static/build/data/env.js +1 -1
- package/static/build/loaders/db.js +0 -70
- package/static/build/loaders/express.js +2 -27
- package/static/build/loaders/initData.js +20 -12
- package/static/build/protos/api.js +1084 -0
- package/static/build/protos/cron.js +36 -27
- package/static/build/protos/health.js +12 -3
- package/static/build/schedule/api.js +140 -0
- package/static/build/schedule/index.js +26 -0
- package/static/build/services/env.js +1 -1
- package/static/build/services/notify.js +19 -34
- package/static/build/services/open.js +11 -3
- package/static/build/services/system.js +1 -1
- package/static/build/shared/pLimit.js +12 -1
- package/static/dist/2208.c1a40612.async.js +1 -0
- package/static/dist/{8528.3dffc548.async.js → 3127.2579e73a.async.js} +1 -1
- package/static/dist/{2237.4d3def87.async.js → 3191.f56b00f8.async.js} +1 -1
- package/static/dist/4402.49bbe98d.async.js +1 -0
- package/static/dist/{5312.5545b3ed.async.js → 5312.74b95311.async.js} +1 -1
- package/static/dist/{1149.33cb7e7a.async.js → 7253.4b9bf133.async.js} +1 -1
- package/static/dist/{872.10bd0974.async.js → 7508.a31662a3.async.js} +1 -1
- package/static/dist/{2081.d0d781b1.async.js → 7984.e6bb9378.async.js} +1 -1
- package/static/dist/8317.c44c1ebd.async.js +1 -0
- package/static/dist/874.ae8edb1a.async.js +1 -0
- package/static/dist/8826.37966028.async.js +1 -0
- package/static/dist/{4799.d5ca9f30.async.js → 9313.37acaf13.async.js} +1 -1
- package/static/dist/index.html +2 -2
- package/static/dist/layouts__index.c986408d.async.js +1 -0
- package/static/dist/preload_helper.6482f199.js +1 -0
- package/static/dist/src__pages__404.771168fc.async.js +1 -0
- package/static/dist/src__pages__config__index.de6dca30.async.js +1 -0
- package/static/dist/{src__pages__crontab__detail.6f7c3205.async.js → src__pages__crontab__detail.80d30a01.async.js} +1 -1
- package/static/dist/src__pages__crontab__index.9e38b6dc.async.js +1 -0
- package/static/dist/{src__pages__crontab__logModal.c88ea3b7.async.js → src__pages__crontab__logModal.6a345e8a.async.js} +1 -1
- package/static/dist/src__pages__crontab__modal.78b1e588.async.js +1 -0
- package/static/dist/{src__pages__crontab__type.5895ed02.async.js → src__pages__crontab__type.bde5cda4.async.js} +1 -1
- package/static/dist/src__pages__crontab__viewManageModal.4874669b.async.js +1 -0
- package/static/dist/src__pages__dependence__index.4a0af2b9.async.js +1 -0
- package/static/dist/src__pages__dependence__modal.e6696a7c.async.js +1 -0
- package/static/dist/{src__pages__dependence__type.bdac3725.async.js → src__pages__dependence__type.e48c5c88.async.js} +1 -1
- package/static/dist/src__pages__diff__index.a4176b58.async.js +1 -0
- package/static/dist/src__pages__env__editNameModal.02322e80.async.js +1 -0
- package/static/dist/src__pages__env__index.f3bfe0c7.async.js +1 -0
- package/static/dist/src__pages__env__modal.066399fd.async.js +1 -0
- package/static/dist/src__pages__error__index.656c9940.async.js +1 -0
- package/static/dist/src__pages__initialization__index.75484c39.async.js +1 -0
- package/static/dist/src__pages__log__index.8a782756.async.js +1 -0
- package/static/dist/src__pages__login__index.8a653852.async.js +1 -0
- package/static/dist/src__pages__script__editModal.e7bf71bd.async.js +1 -0
- package/static/dist/src__pages__script__editNameModal.c048343e.async.js +1 -0
- package/static/dist/src__pages__script__index.9d9099c1.async.js +1 -0
- package/static/dist/src__pages__script__renameModal.357c6c72.async.js +1 -0
- package/static/dist/src__pages__script__saveModal.61fcb1fe.async.js +1 -0
- package/static/dist/src__pages__script__setting.f2d78204.async.js +1 -0
- package/static/dist/{src__pages__setting__about.3a1a6f3b.async.js → src__pages__setting__about.3d3c019f.async.js} +1 -1
- package/static/dist/src__pages__setting__appModal.9eeaeee7.async.js +1 -0
- package/static/dist/{src__pages__setting__checkUpdate.0dfdaf7c.async.js → src__pages__setting__checkUpdate.04c00c9c.async.js} +1 -1
- package/static/dist/src__pages__setting__dependence.0dd0969b.async.js +1 -0
- package/static/dist/src__pages__setting__index.46a8e768.async.js +1 -0
- package/static/dist/{src__pages__setting__loginLog.fc87584a.async.js → src__pages__setting__loginLog.cea6056c.async.js} +1 -1
- package/static/dist/src__pages__setting__notification.b038afec.async.js +1 -0
- package/static/dist/{src__pages__setting__other.34ccb2e8.async.js → src__pages__setting__other.0d869d58.async.js} +1 -1
- package/static/dist/{src__pages__setting__progress.75143dca.async.js → src__pages__setting__progress.8823ac90.async.js} +1 -1
- package/static/dist/src__pages__setting__security.af57bd6a.async.js +1 -0
- package/static/dist/src__pages__setting__systemLog.501844bd.async.js +1 -0
- package/static/dist/src__pages__subscription__index.b43143e7.async.js +1 -0
- package/static/dist/{src__pages__subscription__logModal.b3c7c02c.async.js → src__pages__subscription__logModal.02c80eb3.async.js} +1 -1
- package/static/dist/src__pages__subscription__modal.a61ece75.async.js +1 -0
- package/static/dist/umi.e783bacd.js +1 -0
- package/version.yaml +6 -7
- package/static/build/loaders/sentry.js +0 -53
- package/static/dist/2634.a765cd37.async.js +0 -1
- package/static/dist/4642.9e24d86c.async.js +0 -1
- package/static/dist/4865.98e5a005.async.js +0 -1
- package/static/dist/852.15be2189.async.js +0 -1
- package/static/dist/9065.df8d5dcc.async.js +0 -1
- package/static/dist/layouts__index.c164d41f.async.js +0 -1
- package/static/dist/preload_helper.55b35ae0.js +0 -1
- package/static/dist/src__pages__404.6871535b.async.js +0 -1
- package/static/dist/src__pages__config__index.39b5f99f.async.js +0 -1
- package/static/dist/src__pages__crontab__index.55a8714d.async.js +0 -1
- package/static/dist/src__pages__crontab__modal.328fee41.async.js +0 -1
- package/static/dist/src__pages__crontab__viewManageModal.c71ebc5a.async.js +0 -1
- package/static/dist/src__pages__dependence__index.edec638b.async.js +0 -1
- package/static/dist/src__pages__dependence__modal.9fd1176b.async.js +0 -1
- package/static/dist/src__pages__diff__index.8ba53a1e.async.js +0 -1
- package/static/dist/src__pages__env__editNameModal.c35e96f9.async.js +0 -1
- package/static/dist/src__pages__env__index.c799138c.async.js +0 -1
- package/static/dist/src__pages__env__modal.3b0ca9a6.async.js +0 -1
- package/static/dist/src__pages__error__index.0221fcd9.async.js +0 -1
- package/static/dist/src__pages__initialization__index.346725d1.async.js +0 -1
- package/static/dist/src__pages__log__index.2fd615f2.async.js +0 -1
- package/static/dist/src__pages__login__index.1dd6e684.async.js +0 -1
- package/static/dist/src__pages__script__editModal.28caeb56.async.js +0 -1
- package/static/dist/src__pages__script__editNameModal.1155d34c.async.js +0 -1
- package/static/dist/src__pages__script__index.6a212c2d.async.js +0 -1
- package/static/dist/src__pages__script__renameModal.dabfccfd.async.js +0 -1
- package/static/dist/src__pages__script__saveModal.04d43882.async.js +0 -1
- package/static/dist/src__pages__script__setting.9d5ad53c.async.js +0 -1
- package/static/dist/src__pages__setting__appModal.7b3bff1e.async.js +0 -1
- package/static/dist/src__pages__setting__dependence.a9b7ed43.async.js +0 -1
- package/static/dist/src__pages__setting__index.ffa1cdd6.async.js +0 -1
- package/static/dist/src__pages__setting__notification.97b1d997.async.js +0 -1
- package/static/dist/src__pages__setting__security.c777fb87.async.js +0 -1
- package/static/dist/src__pages__setting__systemLog.63e9c69d.async.js +0 -1
- package/static/dist/src__pages__subscription__index.69a6de02.async.js +0 -1
- package/static/dist/src__pages__subscription__modal.aefaf070.async.js +0 -1
- package/static/dist/umi.fb3ed7a0.js +0 -1
- /package/static/dist/{2625.675b6a18.chunk.css → 1883.675b6a18.chunk.css} +0 -0
- /package/static/dist/{872.3fffed15.chunk.css → 7508.3fffed15.chunk.css} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[4642],{20710:function(e,t,r){"use strict";var o=r(72317),n=window.__ENV__QlBaseUrl||"/";t.Z={siteName:o.ZP.get("青龙"),baseUrl:n,apiPrefix:"".concat(n,"api/"),authKey:"token",layouts:[{name:"primary",include:[/.*/],exclude:[/(\/(en|zh))*\/login/]}],i18n:{languages:[{key:"pt-br",title:"Português",flag:"/portugal.svg"},{key:"en",title:"English",flag:"/america.svg"},{key:"zh",title:o.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:o.ZP.get("定时任务"),value:"crons"},{name:o.ZP.get("环境变量"),value:"envs"},{name:o.ZP.get("订阅管理"),value:"subscriptions"},{name:o.ZP.get("配置文件"),value:"configs"},{name:o.ZP.get("脚本管理"),value:"scripts"},{name:o.ZP.get("日志管理"),value:"logs"},{name:o.ZP.get("依赖管理"),value:"dependencies"},{name:o.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:o.ZP.get("定时任务"),envs:o.ZP.get("环境变量"),subscriptions:o.ZP.get("订阅管理"),configs:o.ZP.get("配置文件"),scripts:o.ZP.get("脚本管理"),logs:o.ZP.get("日志管理"),dependencies:o.ZP.get("依赖管理"),system:o.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"ntfy",label:"Ntfy"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:o.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:o.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:o.ZP.get("钉钉机器人")},{value:"weWorkBot",label:o.ZP.get("企业微信机器人")},{value:"weWorkApp",label:o.ZP.get("企业微信应用")},{value:"aibotk",label:o.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"wePlusBot",label:o.ZP.get("微加机器人")},{value:"wxPusherBot",label:"wxPusher"},{value:"chat",label:o.ZP.get("群晖chat")},{value:"email",label:o.ZP.get("邮箱")},{value:"lark",label:o.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:o.ZP.get("自定义通知")},{value:"closed",label:o.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:o.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:o.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:o.ZP.get("推送消息的优先级")}],ntfy:[{label:"ntfyUrl",tip:o.ZP.get("ntfy的url地址,例如 https://ntfy.sh"),required:!0},{label:"ntfyTopic",tip:o.ZP.get("ntfy的消息应用topic"),required:!0},{label:"ntfyPriority",tip:o.ZP.get("推送消息的优先级")}],chat:[{label:"chatUrl",tip:o.ZP.get("chat的url地址"),required:!0},{label:"chatToken",tip:o.ZP.get("chat的token码"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:o.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:o.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:o.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:o.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:o.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:o.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:o.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:o.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:o.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:o.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:o.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:o.ZP.get("BARK推送消息的跳转URL")},{label:"barkArchive",tip:o.ZP.get("BARK是否保存推送消息")}],telegramBot:[{label:"telegramBotToken",tip:o.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:o.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:o.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:o.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:o.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:o.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:o.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:o.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:o.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:o.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:o.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:o.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:o.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:o.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:o.ZP.get("请输入要发送的目标"),items:[{value:"room",label:o.ZP.get("群聊")},{value:"contact",label:o.ZP.get("好友")}]},{label:"aibotkName",tip:o.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:o.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:o.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:o.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:o.ZP.get("发送模板")},{label:"pushplusChannel",tip:o.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:o.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:o.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:o.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:o.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:o.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:o.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:o.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:o.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:o.ZP.get("wxPusherBot的uids"),required:!1}],lark:[{label:"larkKey",tip:o.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:o.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json"),required:!0},{label:"emailUser",tip:o.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:o.ZP.get("SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定"),required:!0}],pushMe:[{label:"pushMeKey",tip:o.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0},{label:"pushMeUrl",tip:o.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],chronocat:[{label:"chronocatURL",tip:o.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:o.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:o.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:o.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:o.ZP.get("请求头Content-Type"),required:!0,items:[{value:"text/plain"},{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:o.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:o.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:o.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":o.ZP.get("登录"),"/initialization":o.ZP.get("初始化"),"/crontab":o.ZP.get("定时任务"),"/env":o.ZP.get("环境变量"),"/subscription":o.ZP.get("订阅管理"),"/config":o.ZP.get("配置文件"),"/script":o.ZP.get("脚本管理"),"/diff":o.ZP.get("对比工具"),"/log":o.ZP.get("日志管理"),"/setting":o.ZP.get("系统设置"),"/error":o.ZP.get("错误日志"),"/dependence":o.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},94978:function(e,t,r){"use strict";r.d(t,{W:function(){return b}});var o=r(90228),n=r.n(o),i=r(87999),a=r.n(i),l=r(72317),s=r(61508),u=r(20710),p=r(31038),g=r(74799);s.ZP.config({duration:2});var c=Date.now(),d=g.Z.create({timeout:6e4,params:{t:c}}),h=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];d.interceptors.request.use((function(e){var t=localStorage.getItem(u.Z.authKey);return t&&!h.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),d.interceptors.response.use(function(){var e=a()(n()().mark((function e(t){var r,o,i;return n()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.status,![502,504].includes(r)){e.next=5;break}p.history.push("/error"),e.next=18;break;case 5:if(401!==r){e.next=9;break}"/login"!==p.history.location.pathname&&(localStorage.removeItem(u.Z.authKey),p.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(o=t.data).code&&(i=o.message||o.data)&&s.ZP.error({content:i,style:{maxWidth:500,margin:"0 auto"}}),e.abrupt("return",o);case 15:e.prev=15,e.t0=e.catch(9);case 17:case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e,null,[[9,15]])})));return function(t){return e.apply(this,arguments)}}(),(function(e){if(e.response){var t=e.response.data?e.response.data.message||e.message||e.response.data:e.response.statusText,r=e.response.status;if([502,504].includes(r))p.history.push("/error");else if(401===r)"/login"!==p.history.location.pathname&&(s.ZP.error(l.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(u.Z.authKey),p.history.push("/login"));else{var o,n;if("function"==typeof(null===(o=e.config)||void 0===o?void 0:o.onError))return null===(n=e.config)||void 0===n?void 0:n.onError(e.response);s.ZP.error({content:t,style:{maxWidth:500,margin:"0 auto"}})}}else console.log(e.message);return Promise.reject(e)}));var b=d},65609:function(e,t,r){"use strict";r.d(t,{ZP:function(){return u},I1:function(){return c},o4:function(){return v},w7:function(){return g},DY:function(){return d},FA:function(){return b},rS:function(){return w},H$:function(){return f},W9:function(){return p},x$:function(){return h}});var o=r(15558),n=r.n(o),i=r(72317),a={".py":"python",".js":"javascript",".mjs":"javascript",".sh":"shell",".ts":"typescript",".ini":"ini",".json":"json"},l=r(94046),s=r.n(l);function u(){var e=navigator.userAgent.toLowerCase(),t=function(t){return t.test(e)},r=function(t){return(e.match(t)||[]).toString().replace(/[^0-9|_.]/g,"").replace(/_/g,".")},o="unknow";t(/windows|win32|win64|wow32|wow64/g)?o="windows":t(/macintosh|macintel/g)?o="macos":t(/x11/g)?o="linux":t(/android|adr/g)?o="android":t(/ios|iphone|ipad|ipod|iwatch/g)&&(o="ios");var n="unknow";"windows"===o?t(/windows nt 5.0|windows 2000/g)?n="2000":t(/windows nt 5.1|windows xp/g)?n="xp":t(/windows nt 5.2|windows 2003/g)?n="2003":t(/windows nt 6.0|windows vista/g)?n="vista":t(/windows nt 6.1|windows 7/g)?n="7":t(/windows nt 6.2|windows 8/g)?n="8":t(/windows nt 6.3|windows 8.1/g)?n="8.1":t(/windows nt 10.0|windows 10/g)&&(n="10"):"macos"===o?n=r(/os x [\d._]+/g):"android"===o?n=r(/android [\d._]+/g):"ios"===o&&(n=r(/os [\d._]+/g));var i="unknow";"windows"===o||"macos"===o||"linux"===o?i="desktop":("android"===o||"ios"===o||t(/mobile/g))&&(i="mobile");var a="unknow",l="unknow";t(/applewebkit/g)?(a="webkit",t(/edge/g)?l="edge":t(/opr/g)?l="opera":t(/chrome/g)?l="chrome":t(/safari/g)&&(l="safari")):t(/gecko/g)&&t(/firefox/g)?(a="gecko",l="firefox"):t(/presto/g)?(a="presto",l="opera"):t(/trident|compatible|msie/g)&&(a="trident",l="iexplore");var s="unknow";"webkit"===a?s=r(/applewebkit\/[\d._]+/g):"gecko"===a?s=r(/gecko\/[\d._]+/g):"presto"===a?s=r(/presto\/[\d._]+/g):"trident"===a&&(s=r(/trident\/[\d._]+/g));var u="unknow";"chrome"===l?u=r(/chrome\/[\d._]+/g):"safari"===l?u=r(/version\/[\d._]+/g):"firefox"===l?u=r(/firefox\/[\d._]+/g):"opera"===l?u=r(/opr\/[\d._]+/g):"iexplore"===l?u=r(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===l&&(u=r(/edge\/[\d._]+/g));var p="none",g="unknow";t(/micromessenger/g)?(p="wechat",g=r(/micromessenger\/[\d._]+/g)):t(/qqbrowser/g)?(p="qq",g=r(/qqbrowser\/[\d._]+/g)):t(/ucbrowser/g)?(p="uc",g=r(/ucbrowser\/[\d._]+/g)):t(/qihu 360se/g)?p="360":t(/2345explorer/g)?(p="2345",g=r(/2345explorer\/[\d._]+/g)):t(/metasr/g)?p="sougou":t(/lbbrowser/g)?p="liebao":t(/maxthon/g)&&(p="maxthon",g=r(/maxthon\/[\d._]+/g));var c=Object.assign({engine:a,engineVs:s,platform:i,supporter:l,supporterVs:u,system:o,systemVs:n},"none"===p?{}:{shell:p,shellVs:g});return console.log("%c\n .d88b. d888888b d8b db d888b db .d88b. d8b db d888b \n.8P Y8. `88' 888o 88 88' Y8b 88 .8P Y8. 888o 88 88' Y8b \n88 88 88 88V8o 88 88 88 88 88 88V8o 88 88 \n88 88 88 88 V8o88 88 ooo 88 88 88 88 V8o88 88 ooo \n`8P d8' .88. 88 V888 88. ~8~ 88booo. `8b d8' 88 V888 88. ~8~ \n `Y88'Y8 Y888888P VP V8P Y888P Y88888P `Y88P' VP V8P Y888P \n \n \n","color: blue;font-size: 14px;"),console.log("%c忘形雨笠烟蓑,知心牧唱樵歌。明月清风共我,闲人三个,从他今古消磨。\n","color: yellow;font-size: 18px;"),console.log("%c青龙运行环境:\n\n系统:".concat(c.system,"/").concat(c.systemVs,"\n浏览器:").concat(c.supporter,"/").concat(c.supporterVs,"\n内核:").concat(c.engine,"/").concat(c.engineVs),"color: green;font-size: 14px;font-weight: bold;"),c}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.extraHeight,r=e.target;void 0===t&&(t=99);var o=null,n=0;(o=r||document.querySelector(".ant-table-wrapper"))&&(n=o.getBoundingClientRect().top);var i=document.body.clientHeight-n-t;return i}function g(e,t){var r,o,n=window.URL||window.webkitURL||window,i=new Blob([t]),a=document.createElementNS("http://www.w3.org/1999/xhtml","a");a.href=n.createObjectURL(i),a.download=e,r=a,(o=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(o)}function c(e,t,r){var o=n()(e),i=[];return function e(o){if(o)for(var n=0;n<(null==o?void 0:o.length);n++){if(t(o[n]))return r?void(o[n].children?o[n].children.unshift(r):o[n].children=[r]):void o.splice(n,1);o[n].children&&(i.push(o[n].key),e(o[n].children))}}(o),o}function d(e,t){var r;return function e(o){if(o)for(var n=0;n<(null==o?void 0:o.length);n++)t(o[n])?r=o[n]:o[n].children&&e(o[n].children)}(n()(e)),r}function h(e){return[" ",i.ZP.get("执行结束")].some((function(t){return e.includes(t)}))}function b(e){var t=e.split(" ");if("repo"===t[1]||"raw"===t[1])return t[2];var r=t.find((function(e){return[".js",".ts",".sh",".py"].some((function(t){return e.endsWith(t)}))}));if(r){var o,n,i="".concat(window.__ENV__QL_DIR,"/data/scripts");r.startsWith(i)&&(r=r.replace(i,""));var a=r.lastIndexOf("/");return a>=0?(n=r.slice(a+1),o=r.slice(0,a)):(n=r,o=""),[n,o]}}function P(e){try{var t=s().parseExpression(e);if(t)return t.next().toDate()}catch(e){}return null}function w(e,t){var r=P(e);return null!=t&&t.length&&t.forEach((function(e){var t=P(e.schedule);t&&(!r||t<r)&&(r=t)})),r}function f(e){var t=function(e){if(!e)return"";var t=e.split(".");return".".concat(t[t.length-1])}(e);return a[t]}function v(){var e=document.createElement("div");e.style.position="fixed",e.style.top="0px",e.style.left="0px",e.style.width="100%",e.style.height="100%",e.style.backgroundColor="transparent",e.style.zIndex="9999",document.body.appendChild(e),e.addEventListener("click",(function(e){e.stopPropagation(),e.preventDefault()})),document.body.style.overflow="hidden"}},50810:function(){}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[4865],{28423:function(e,t,n){var r=n(2053),i=n(75271),o=n(17338),u=n(48881),a=function(e,t){return i.createElement(u.Z,(0,r.Z)({},e,{ref:t,icon:o.Z}))},c=i.forwardRef(a);t.Z=c},3341:function(e){e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){var u=o[i];if(!e(t[u],n[u]))return!1}return!0}return t!=t&&n!=n}},95924:function(e,t,n){function r(e,t,n,r){let i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;const o=Object.keys(e),u=Object.keys(t);if(o.length!==u.length)return!1;const a=Object.prototype.hasOwnProperty.bind(t);for(let u=0;u<o.length;u++){const c=o[u];if(!a(c))return!1;const s=e[c],l=t[c];if(i=n?n.call(r,s,l,c):void 0,!1===i||void 0===i&&s!==l)return!1}return!0}n.d(t,{w:function(){return r}})},42875:function(e,t,n){n.d(t,{J:function(){return c}});var r=n(48305),i=n(3341),o=n(75271),u=n(51719);function a(e,t,n){var a=function(e,t,n){var a=(0,o.useState)((function(){return t(e)})),c=r(a,2),s=c[0],l=c[1],d=(0,o.useCallback)((function(){var r=t(e);i(s,r)||(l(r),n&&n())}),[s,e,n]);return(0,u.L)(d),[s,d]}(e,t,n),c=r(a,2),s=c[0],l=c[1];return(0,u.L)((function(){var t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(l,{handlerIds:[t]})}),[e,l]),s}function c(e,t,n){return a(t,e||function(){return{}},(function(){return n.reconnect()}))}},13103:function(e,t,n){n.d(t,{c:function(){return m}});var r=n(6346),i=n(42875),o=n(23357),u=n(75271);function a(e){return(0,u.useMemo)((function(){return e.hooks.dragSource()}),[e])}function c(e){return(0,u.useMemo)((function(){return e.hooks.dragPreview()}),[e])}var s=n(25298),l=n(17069),d=n(95924),f=n(86053),g=n(97835),h=function(){function e(t){var n=this;s(this,e),this.hooks=(0,g.p)({dragSource:function(e,t){n.clearDragSource(),n.dragSourceOptions=t||null,(0,f.d)(e)?n.dragSourceRef=e:n.dragSourceNode=e,n.reconnectDragSource()},dragPreview:function(e,t){n.clearDragPreview(),n.dragPreviewOptions=t||null,(0,f.d)(e)?n.dragPreviewRef=e:n.dragPreviewNode=e,n.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}return l(e,[{key:"receiveHandlerId",value:function(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(e){this.dragSourceOptionsInternal=e}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(e){this.dragPreviewOptionsInternal=e}},{key:"reconnect",value:function(){var e=this.reconnectDragSource();this.reconnectDragPreview(e)}},{key:"reconnectDragSource",value:function(){var e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}},{key:"reconnectDragPreview",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!(0,d.w)(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!(0,d.w)(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}}]),e}(),v=n(43145),p=n(51719);var y=!1,D=!1,k=function(){function e(t){s(this,e),this.sourceId=null,this.internalMonitor=t.getMonitor()}return l(e,[{key:"receiveHandlerId",value:function(e){this.sourceId=e}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){(0,r.k)(!y,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return y=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{y=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;(0,r.k)(!D,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return D=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{D=!1}}},{key:"subscribeToStateChange",value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"isDraggingSource",value:function(e){return this.internalMonitor.isDraggingSource(e)}},{key:"isOverTarget",value:function(e,t){return this.internalMonitor.isOverTarget(e,t)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(e){return this.internalMonitor.subscribeToOffsetChange(e)}},{key:"canDragSource",value:function(e){return this.internalMonitor.canDragSource(e)}},{key:"canDropOnTarget",value:function(e){return this.internalMonitor.canDropOnTarget(e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),e}();var I=n(48305),O=n(64834),w=n(31759),b=function(){function e(t,n,r){s(this,e),this.spec=t,this.monitor=n,this.connector=r}return l(e,[{key:"beginDrag",value:function(){var e=this.spec,t=this.monitor,n=null;return null!=(n="object"===w(e.item)?e.item:"function"==typeof e.item?e.item(t):{})?n:null}},{key:"canDrag",value:function(){var e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)}},{key:"isDragging",value:function(e,t){var n=this.spec,r=this.monitor,i=n.isDragging;return i?i(r):t===e.getSourceId()}},{key:"endDrag",value:function(){var e=this.spec,t=this.monitor,n=this.connector,r=e.end;r&&r(t.getItem(),t),n.reconnect()}}]),e}();function S(e,t,n){var i=(0,v.N)(),o=function(e,t,n){var r=(0,u.useMemo)((function(){return new b(e,t,n)}),[t,n]);return(0,u.useEffect)((function(){r.spec=e}),[e]),r}(e,t,n),a=function(e){return(0,u.useMemo)((function(){var t=e.type;return(0,r.k)(null!=t,"spec.type must be defined"),t}),[e])}(e);(0,p.L)((function(){if(null!=a){var e=(0,O.w)(a,o,i),r=I(e,2),u=r[0],c=r[1];return t.receiveHandlerId(u),n.receiveHandlerId(u),c}}),[i,t,n,o,a])}function m(e,t){var n=(0,o.w)(e,t);(0,r.k)(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");var s,l=(s=(0,v.N)(),(0,u.useMemo)((function(){return new k(s)}),[s])),d=function(e,t){var n=(0,v.N)(),r=(0,u.useMemo)((function(){return new h(n.getBackend())}),[n]);return(0,p.L)((function(){return r.dragSourceOptions=e||null,r.reconnect(),function(){return r.disconnectDragSource()}}),[r,e]),(0,p.L)((function(){return r.dragPreviewOptions=t||null,r.reconnect(),function(){return r.disconnectDragPreview()}}),[r,t]),r}(n.options,n.previewOptions);return S(n,l,d),[(0,i.J)(n.collect,l,d),a(d),c(d)]}},43145:function(e,t,n){n.d(t,{N:function(){return u}});var r=n(6346),i=n(75271),o=n(21432);function u(){var e=(0,i.useContext)(o.L).dragDropManager;return(0,r.k)(null!=e,"Expected drag drop context"),e}},83559:function(e,t,n){n.d(t,{L:function(){return w}});var r=n(42875),i=n(23357),o=n(75271);function u(e){return(0,o.useMemo)((function(){return e.hooks.dropTarget()}),[e])}var a=n(25298),c=n(17069),s=n(95924),l=n(86053),d=n(97835),f=function(){function e(t){var n=this;a(this,e),this.hooks=(0,d.p)({dropTarget:function(e,t){n.clearDropTarget(),n.dropTargetOptions=t,(0,l.d)(e)?n.dropTargetRef=e:n.dropTargetNode=e,n.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}return c(e,[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"reconnect",value:function(){var e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();var t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}},{key:"receiveHandlerId",value:function(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(e){this.dropTargetOptionsInternal=e}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!(0,s.w)(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}}]),e}(),g=n(43145),h=n(51719);var v=n(6346),p=!1,y=function(){function e(t){a(this,e),this.targetId=null,this.internalMonitor=t.getMonitor()}return c(e,[{key:"receiveHandlerId",value:function(e){this.targetId=e}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;(0,v.k)(!p,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return p=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{p=!1}}},{key:"isOver",value:function(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),e}();var D=n(48305),k=n(64834);var I=function(){function e(t,n){a(this,e),this.spec=t,this.monitor=n}return c(e,[{key:"canDrop",value:function(){var e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}},{key:"hover",value:function(){var e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}},{key:"drop",value:function(){var e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}}]),e}();function O(e,t,n){var r=(0,g.N)(),i=function(e,t){var n=(0,o.useMemo)((function(){return new I(e,t)}),[t]);return(0,o.useEffect)((function(){n.spec=e}),[e]),n}(e,t),u=function(e){var t=e.accept;return(0,o.useMemo)((function(){return(0,v.k)(null!=e.accept,"accept must be defined"),Array.isArray(t)?t:[t]}),[t])}(e);(0,h.L)((function(){var e=(0,k.n)(u,i,r),o=D(e,2),a=o[0],c=o[1];return t.receiveHandlerId(a),n.receiveHandlerId(a),c}),[r,t,i,n,u.map((function(e){return e.toString()})).join("|")])}function w(e,t){var n,a=(0,i.w)(e,t),c=(n=(0,g.N)(),(0,o.useMemo)((function(){return new y(n)}),[n])),s=function(e){var t=(0,g.N)(),n=(0,o.useMemo)((function(){return new f(t.getBackend())}),[t]);return(0,h.L)((function(){return n.dropTargetOptions=e||null,n.reconnect(),function(){return n.disconnectDropTarget()}}),[e]),n}(a.options);return O(a,c,s),[(0,r.J)(a.collect,c,s),u(s)]}},51719:function(e,t,n){n.d(t,{L:function(){return i}});var r=n(75271),i="undefined"!=typeof window?r.useLayoutEffect:r.useEffect},23357:function(e,t,n){n.d(t,{w:function(){return o}});var r=n(15558),i=n(75271);function o(e,t){var n=r(t||[]);return null==t&&"function"!=typeof e&&n.push(e),(0,i.useMemo)((function(){return"function"==typeof e?e():e}),n)}},86053:function(e,t,n){n.d(t,{d:function(){return i}});var r=n(31759);function i(e){return null!==e&&"object"===r(e)&&Object.prototype.hasOwnProperty.call(e,"current")}},64834:function(e,t,n){function r(e,t,n){var r=n.getRegistry(),i=r.addTarget(e,t);return[i,function(){return r.removeTarget(i)}]}function i(e,t,n){var r=n.getRegistry(),i=r.addSource(e,t);return[i,function(){return r.removeSource(i)}]}n.d(t,{n:function(){return r},w:function(){return i}})},97835:function(e,t,n){n.d(t,{p:function(){return u}});var r=n(6346),i=n(75271);function o(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(t," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}function u(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{var u=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!(0,i.isValidElement)(t)){var r=t;return e(r,n),r}var u=t;o(u);var a=n?function(t){return e(t,n)}:e;return c(u,a)}}(r);t[n]=function(){return u}}})),t}function a(e,t){"function"==typeof e?e(t):e.current=t}function c(e,t){var n=e.ref;return(0,r.k)("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?(0,i.cloneElement)(e,{ref:function(e){a(n,e),a(t,e)}}):(0,i.cloneElement)(e,{ref:t})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[852,7243],{90852:function(e,t,a){a.r(t);var n=a(48305),i=a.n(n),r=a(72317),o=a(75271),l=a(45520),s=a(93481),u=a(94978),c=a(20710),p=a(56958),g=a(44084),h=a(40276),d=a(78060),b=a.n(d),P=a(69325),v=a(16018),f=a(52676);t.default=function(e){var t=e.dependence,a=e.handleCancel,n=e.visible,d=(0,o.useState)(""),m=i()(d,2),Z=m[0],k=m[1],y=(0,o.useState)(!0),x=i()(y,2),w=x[0],q=x[1],B=(0,o.useState)(!1),S=i()(B,2),T=S[0],C=S[1],_=(0,o.useState)(!0),A=i()(_,2),I=A[0],E=A[1],U=(0,o.useState)(!1),H=i()(U,2),K=H[0],D=H[1],M=(0,o.useState)(!1),R=i()(M,2),Q=R[0],W=R[1],j=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];localStorage.removeItem("logDependence"),a(e)};(0,o.useEffect)((function(){t&&(E(!0),u.W.get("".concat(c.Z.apiPrefix,"dependencies/").concat(t.id)).then((function(e){var a=e.code,n=e.data;if(200===a&&localStorage.getItem("logDependence")===String(t.id)){var i=((null==n?void 0:n.log)||[]).join("");k(i),q(!i.includes("结束时间")),D(i.includes("删除失败"))}})).finally((function(){E(!1)})))}),[t]);var X=function(e){var a=e.message,n=e.references;n.length>0&&n.includes(t.id)&&[v.Status.删除中,v.Status.安装中].includes(t.status)&&(a.includes("结束时间")&&(q(!1),D(a.includes("删除失败"))),k((function(e){return"".concat(e).concat(a)})))};return(0,o.useEffect)((function(){var e=P.Z.getInstance();return e.subscribe("installDependence",X),e.subscribe("uninstallDependence",X),function(){e.unsubscribe("installDependence",X),e.unsubscribe("uninstallDependence",X)}}),[t]),(0,o.useEffect)((function(){C(document.body.clientWidth<768)}),[]),(0,f.jsx)(l.Z,{title:(0,f.jsxs)(f.Fragment,{children:[w&&(0,f.jsx)(p.Z,{spin:!0}),!w&&(0,f.jsx)(g.Z,{}),(0,f.jsxs)("span",{style:{marginLeft:5},children:[r.ZP.get("日志 -")," ",t&&t.name]})," "]}),open:n,centered:!0,className:"log-modal",forceRender:!0,onOk:function(){return j()},onCancel:function(){return j()},footer:[(0,f.jsx)(s.Z,{type:"primary",onClick:function(){K?(W(!0),u.W.delete("".concat(c.Z.apiPrefix,"dependencies/force"),{data:[t.id]}).then((function(e){var t=e.code;e.data,200===t&&j(!0)})).finally((function(){W(!1)}))):j()},loading:Q,children:K?r.ZP.get("强制删除"):r.ZP.get("知道了")})],children:(0,f.jsx)("div",{className:"log-container",children:I?(0,f.jsx)(h.Z,{}):(0,f.jsx)("pre",{style:T?{fontFamily:"Source Code Pro",zoom:.83}:{},children:(0,f.jsx)(b(),{children:Z})})})})}},16018:function(e,t,a){a.r(t),a.d(t,{DependenceStatus:function(){return n},Status:function(){return i}});var n=function(e){return e[e.installing=0]="installing",e[e.installed=1]="installed",e[e.installFailed=2]="installFailed",e[e.removing=3]="removing",e[e.removed=4]="removed",e[e.removeFailed=5]="removeFailed",e[e.queued=6]="queued",e[e.cancelled=7]="cancelled",e}({}),i=function(e){return e[e["安装中"]=0]="安装中",e[e["已安装"]=1]="已安装",e[e["安装失败"]=2]="安装失败",e[e["删除中"]=3]="删除中",e[e["已删除"]=4]="已删除",e[e["删除失败"]=5]="删除失败",e[e["队列中"]=6]="队列中",e[e["已取消"]=7]="已取消",e}({})},20710:function(e,t,a){var n=a(72317),i=window.__ENV__QlBaseUrl||"/";t.Z={siteName:n.ZP.get("青龙"),baseUrl:i,apiPrefix:"".concat(i,"api/"),authKey:"token",layouts:[{name:"primary",include:[/.*/],exclude:[/(\/(en|zh))*\/login/]}],i18n:{languages:[{key:"pt-br",title:"Português",flag:"/portugal.svg"},{key:"en",title:"English",flag:"/america.svg"},{key:"zh",title:n.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:n.ZP.get("定时任务"),value:"crons"},{name:n.ZP.get("环境变量"),value:"envs"},{name:n.ZP.get("订阅管理"),value:"subscriptions"},{name:n.ZP.get("配置文件"),value:"configs"},{name:n.ZP.get("脚本管理"),value:"scripts"},{name:n.ZP.get("日志管理"),value:"logs"},{name:n.ZP.get("依赖管理"),value:"dependencies"},{name:n.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:n.ZP.get("定时任务"),envs:n.ZP.get("环境变量"),subscriptions:n.ZP.get("订阅管理"),configs:n.ZP.get("配置文件"),scripts:n.ZP.get("脚本管理"),logs:n.ZP.get("日志管理"),dependencies:n.ZP.get("依赖管理"),system:n.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"ntfy",label:"Ntfy"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:n.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:n.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:n.ZP.get("钉钉机器人")},{value:"weWorkBot",label:n.ZP.get("企业微信机器人")},{value:"weWorkApp",label:n.ZP.get("企业微信应用")},{value:"aibotk",label:n.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"wePlusBot",label:n.ZP.get("微加机器人")},{value:"wxPusherBot",label:"wxPusher"},{value:"chat",label:n.ZP.get("群晖chat")},{value:"email",label:n.ZP.get("邮箱")},{value:"lark",label:n.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:n.ZP.get("自定义通知")},{value:"closed",label:n.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:n.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:n.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:n.ZP.get("推送消息的优先级")}],ntfy:[{label:"ntfyUrl",tip:n.ZP.get("ntfy的url地址,例如 https://ntfy.sh"),required:!0},{label:"ntfyTopic",tip:n.ZP.get("ntfy的消息应用topic"),required:!0},{label:"ntfyPriority",tip:n.ZP.get("推送消息的优先级")}],chat:[{label:"chatUrl",tip:n.ZP.get("chat的url地址"),required:!0},{label:"chatToken",tip:n.ZP.get("chat的token码"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:n.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:n.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:n.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:n.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:n.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:n.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:n.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:n.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:n.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:n.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:n.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:n.ZP.get("BARK推送消息的跳转URL")},{label:"barkArchive",tip:n.ZP.get("BARK是否保存推送消息")}],telegramBot:[{label:"telegramBotToken",tip:n.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:n.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:n.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:n.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:n.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:n.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:n.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:n.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:n.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:n.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:n.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:n.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:n.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:n.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:n.ZP.get("请输入要发送的目标"),items:[{value:"room",label:n.ZP.get("群聊")},{value:"contact",label:n.ZP.get("好友")}]},{label:"aibotkName",tip:n.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:n.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:n.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:n.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:n.ZP.get("发送模板")},{label:"pushplusChannel",tip:n.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:n.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:n.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:n.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:n.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:n.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:n.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:n.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:n.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:n.ZP.get("wxPusherBot的uids"),required:!1}],lark:[{label:"larkKey",tip:n.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:n.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json"),required:!0},{label:"emailUser",tip:n.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:n.ZP.get("SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定"),required:!0}],pushMe:[{label:"pushMeKey",tip:n.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0},{label:"pushMeUrl",tip:n.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],chronocat:[{label:"chronocatURL",tip:n.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:n.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:n.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:n.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:n.ZP.get("请求头Content-Type"),required:!0,items:[{value:"text/plain"},{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:n.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:n.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:n.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":n.ZP.get("登录"),"/initialization":n.ZP.get("初始化"),"/crontab":n.ZP.get("定时任务"),"/env":n.ZP.get("环境变量"),"/subscription":n.ZP.get("订阅管理"),"/config":n.ZP.get("配置文件"),"/script":n.ZP.get("脚本管理"),"/diff":n.ZP.get("对比工具"),"/log":n.ZP.get("日志管理"),"/setting":n.ZP.get("系统设置"),"/error":n.ZP.get("错误日志"),"/dependence":n.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},94978:function(e,t,a){a.d(t,{W:function(){return b}});var n=a(90228),i=a.n(n),r=a(87999),o=a.n(r),l=a(72317),s=a(61508),u=a(20710),c=a(31038),p=a(74799);s.ZP.config({duration:2});var g=Date.now(),h=p.Z.create({timeout:6e4,params:{t:g}}),d=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];h.interceptors.request.use((function(e){var t=localStorage.getItem(u.Z.authKey);return t&&!d.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),h.interceptors.response.use(function(){var e=o()(i()().mark((function e(t){var a,n,r;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.status,![502,504].includes(a)){e.next=5;break}c.history.push("/error"),e.next=18;break;case 5:if(401!==a){e.next=9;break}"/login"!==c.history.location.pathname&&(localStorage.removeItem(u.Z.authKey),c.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(n=t.data).code&&(r=n.message||n.data)&&s.ZP.error({content:r,style:{maxWidth:500,margin:"0 auto"}}),e.abrupt("return",n);case 15:e.prev=15,e.t0=e.catch(9);case 17:case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e,null,[[9,15]])})));return function(t){return e.apply(this,arguments)}}(),(function(e){if(e.response){var t=e.response.data?e.response.data.message||e.message||e.response.data:e.response.statusText,a=e.response.status;if([502,504].includes(a))c.history.push("/error");else if(401===a)"/login"!==c.history.location.pathname&&(s.ZP.error(l.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(u.Z.authKey),c.history.push("/login"));else{var n,i;if("function"==typeof(null===(n=e.config)||void 0===n?void 0:n.onError))return null===(i=e.config)||void 0===i?void 0:i.onError(e.response);s.ZP.error({content:t,style:{maxWidth:500,margin:"0 auto"}})}}else console.log(e.message);return Promise.reject(e)}));var b=h},69325:function(e,t,a){var n=a(15558),i=a.n(n),r=a(67825),o=a.n(r),l=a(90228),s=a.n(l),u=a(87999),c=a.n(u),p=a(25298),g=a.n(p),h=a(17069),d=a.n(h),b=a(82092),P=a.n(b),v=a(78078),f=a.n(v),m=["type"],Z=function(){function e(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};g()(this,e),P()(this,"url",void 0),P()(this,"socket",null),P()(this,"subscriptions",new Map),P()(this,"options",void 0),P()(this,"reconnectAttempts",0),P()(this,"heartbeatTimeout",null),P()(this,"state","closed"),this.url=t,this.options={maxReconnectAttempts:a.maxReconnectAttempts||5,reconnectInterval:a.reconnectInterval||3e3,heartbeatInterval:a.heartbeatInterval||3e4},this.init()}var t,a;return d()(e,[{key:"init",value:(a=c()(s()().mark((function e(){var t=this;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,this.state="connecting",this.emit("connecting");case 3:if(!(this.reconnectAttempts<this.options.maxReconnectAttempts)){e.next=16;break}return this.socket=new(f())(this.url),this.setupEventListeners(),this.startHeartbeat(),e.next=9,this.waitForClose();case 9:return this.stopHeartbeat(),this.socket=null,this.reconnectAttempts++,e.next=14,new Promise((function(e){return setTimeout(e,t.options.reconnectInterval)}));case 14:e.next=3;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),this.handleError(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(){return a.apply(this,arguments)})},{key:"setupEventListeners",value:function(){var e=this;this.socket&&(this.socket.onopen=function(){e.state="open",e.emit("open")},this.socket.onmessage=function(t){var a=JSON.parse(t.data);e.dispatchMessage(a)},this.socket.onclose=function(){e.state="closed",e.emit("close")})}},{key:"waitForClose",value:(t=c()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===(t=this.socket)||void 0===t?void 0:t.readyState)===f().CLOSED){e.next=5;break}return e.next=3,new Promise((function(e){return setTimeout(e,100)}));case 3:e.next=0;break;case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"subscribe",value:function(e,t){var a=this.subscriptions.get(e)||new Set;if(!a.has(t)){a.add(t),this.subscriptions.set(e,a);var n={action:"subscribe",topic:e};this.send(n)}}},{key:"unsubscribe",value:function(e,t){var a=this.subscriptions.get(e)||new Set;if(a.has(t)){a.delete(t);var n={action:"unsubscribe",topic:e};this.send(n)}}},{key:"send",value:function(e){var t;(null===(t=this.socket)||void 0===t?void 0:t.readyState)===f().OPEN&&this.socket.send(JSON.stringify(e))}},{key:"dispatchMessage",value:function(e){var t=e.type,a=o()(e,m),n=this.subscriptions.get(t)||new Set;i()(n).forEach((function(e){return e(a)}))}},{key:"startHeartbeat",value:function(){var e=this;this.heartbeatTimeout=setInterval((function(){var t;(null===(t=e.socket)||void 0===t?void 0:t.readyState)===f().OPEN&&e.socket.send(JSON.stringify({type:"heartbeat"}))}),this.options.heartbeatInterval)}},{key:"stopHeartbeat",value:function(){this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout)}},{key:"close",value:function(){this.socket&&(this.state="closed",this.stopHeartbeat(),this.socket.close(),this.emit("close"))}},{key:"handleError",value:function(e){console.error("WebSocket错误:",e),this.emit("error",e)}},{key:"on",value:function(e,t){}},{key:"emit",value:function(e,t){}}],[{key:"getInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",a=arguments.length>1?arguments[1]:void 0;return e.instance||(e.instance=new e(t,a)),e.instance}}]),e}();P()(Z,"instance",null),t.Z=Z}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[9065,5812],{55426:function(e,t,r){var a=(0,r(19919).Z)({scriptUrl:["//at.alicdn.com/t/c/font_3354854_lc939gab1iq.js"]});t.Z=a},38656:function(e,t,r){r.r(t),r.d(t,{CrontabStatus:function(){return a},OperationName:function(){return l},OperationPath:function(){return n}});var a=function(e){return e[e.running=0]="running",e[e.queued=.5]="queued",e[e.idle=1]="idle",e[e.disabled=2]="disabled",e}({}),l=function(e){return e[e["启用"]=0]="启用",e[e["禁用"]=1]="禁用",e[e["运行"]=2]="运行",e[e["停止"]=3]="停止",e[e["置顶"]=4]="置顶",e[e["取消置顶"]=5]="取消置顶",e}({}),n=function(e){return e[e.enable=0]="enable",e[e.disable=1]="disable",e[e.run=2]="run",e[e.stop=3]="stop",e[e.pin=4]="pin",e[e.unpin=5]="unpin",e}({})},49065:function(e,t,r){r.r(t);var a=r(67825),l=r.n(a),n=r(90228),i=r.n(n),o=r(26068),s=r.n(o),u=r(87999),p=r.n(u),c=r(48305),g=r.n(c),d=r(72317),h=r(75271),P=r(72338),Z=r(35181),m=r(45520),b=r(17082),v=r(93481),f=r(63505),x=r(94978),y=r(20710),k=r(37559),w=r(21288),q=r(55426),j=r(38656),B=r(31352),C=r(52676),_=["name"],S=["key","name"],T=["key","name"],R=[{name:d.ZP.get("命令"),value:"command"},{name:d.ZP.get("名称"),value:"name"},{name:d.ZP.get("定时规则"),value:"schedule"},{name:d.ZP.get("状态"),value:"status",onlySelect:!0},{name:d.ZP.get("标签"),value:"labels"},{name:d.ZP.get("订阅"),value:"sub_id",onlySelect:!0}],I={Reg:"",NotReg:"",In:"select",Nin:"select"},U=[{name:d.ZP.get("包含"),value:"Reg"},{name:d.ZP.get("不包含"),value:"NotReg"},{name:d.ZP.get("属于"),value:"In",type:"select"},{name:d.ZP.get("不属于"),value:"Nin",type:"select"}],K=[{name:d.ZP.get("顺序"),value:"ASC"},{name:d.ZP.get("倒序"),value:"DESC"}],A=function(e){return e.and="且",e.or="或",e}(A||{});t.default=function(e){var t=e.view,r=e.handleCancel,a=e.visible,n=P.Z.useForm(),o=g()(n,1)[0],u=(0,h.useState)(!1),c=g()(u,2),N=c[0],Q=c[1],H=(0,h.useState)("and"),W=g()(H,2),X=W[0],E=W[1],M=P.Z.useWatch("filters",o),O=(0,B.Z)((function(){return x.W.get("".concat(y.Z.apiPrefix,"subscriptions"))}),{cacheKey:"subscriptions"}).data,G={status:[{name:d.ZP.get("运行中"),value:j.CrontabStatus.running},{name:d.ZP.get("空闲中"),value:j.CrontabStatus.idle},{name:d.ZP.get("已禁用"),value:j.CrontabStatus.disabled}],sub_id:null==O?void 0:O.data.map((function(e){return{name:e.name,value:e.id}}))},D=function(){var e=p()(i()().mark((function e(a){var l,n,o,u;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Q(!0),a.filterRelation=X,l=t?"put":"post",e.prev=3,e.next=6,x.W[l]("".concat(y.Z.apiPrefix,"crons/views"),t?s()(s()({},a),{},{id:t.id}):a);case 6:n=e.sent,o=n.code,u=n.data,200===o&&r(u),Q(!1),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(3),Q(!1);case 16:case"end":return e.stop()}}),e,null,[[3,13]])})));return function(t){return e.apply(this,arguments)}}();(0,h.useEffect)((function(){t||o.resetFields(),o.setFieldsValue(t||{filters:[{property:"command"}]})}),[t,a]);var L=function(e){var t=e.name,r=l()(e,_),a=o.getFieldValue(["filters",t,"property"]);return(0,C.jsx)(Z.Z,s()(s()({style:{width:120},placeholder:d.ZP.get("请选择操作符")},r),{},{children:U.filter((function(e){return G[a]?"select"===e.type:e})).map((function(e){return(0,C.jsx)(Z.Z.Option,{value:e.value,children:e.name},e.name)}))}))},F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,C.jsx)(Z.Z,{style:t,children:e.map((function(e){return(0,C.jsx)(Z.Z.Option,{value:e.value,children:e.name},e.name)}))})},z=(0,C.jsx)(Z.Z,{style:{width:80},children:K.map((function(e){return(0,C.jsx)(Z.Z.Option,{value:e.value,children:e.name},e.name)}))});return(0,C.jsx)(m.Z,{title:t?d.ZP.get("编辑视图"):d.ZP.get("创建视图"),open:a,forceRender:!0,width:580,centered:!0,maskClosable:!1,onOk:function(){o.validateFields().then((function(e){D(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return r()},confirmLoading:N,children:(0,C.jsxs)(P.Z,{form:o,layout:"vertical",name:"env_modal",children:[(0,C.jsx)(P.Z.Item,{name:"name",label:d.ZP.get("视图名称"),rules:[{required:!0,message:d.ZP.get("请输入视图名称")}],children:(0,C.jsx)(b.Z,{placeholder:d.ZP.get("请输入视图名称")})}),(0,C.jsx)(P.Z.List,{name:"filters",children:function(e,t,r){var a=t.add,n=t.remove,i=r.errors;return(0,C.jsxs)("div",{style:{position:"relative"},className:"view-filters-container ".concat(e.length>1?"active":""),children:[e.length>1&&(0,C.jsx)("div",{style:{position:"absolute",width:50,borderRadius:10,border:"1px solid rgb(190, 220, 255)",borderRight:"none",height:56*(e.length-1),top:46,left:15},children:(0,C.jsx)(v.Z,{type:"primary",size:"small",style:{position:"absolute",top:"50%",translate:"-50% -50%",padding:"0 3px",cursor:"pointer"},onClick:function(){E("and"===X?"or":"and")},children:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("span",{children:A[X]}),(0,C.jsx)(q.Z,{type:"ql-icon-d-caret"})]})})}),(0,C.jsxs)("div",{children:[e.map((function(e){var t,r,a=e.key,i=e.name,o=l()(e,S);return(0,C.jsx)(P.Z.Item,{label:0===i?d.ZP.get("筛选条件"):"",style:{marginBottom:0},required:!0,className:"filter-item",children:(0,C.jsxs)(f.Z,{className:"view-create-modal-filters",align:"baseline",children:[(0,C.jsx)(P.Z.Item,s()(s()({},o),{},{name:[i,"property"],rules:[{required:!0}],children:F(R,{width:120})})),(0,C.jsx)(P.Z.Item,s()(s()({},o),{},{name:[i,"operation"],rules:[{required:!0,message:d.ZP.get("请选择操作符")}],children:(0,C.jsx)(L,{name:i})})),(0,C.jsx)(P.Z.Item,s()(s()({},o),{},{name:[i,"value"],rules:[{required:!0,message:d.ZP.get("请输入内容")}],children:"select"===I[null==M?void 0:M[i].operation]?(t=null==M?void 0:M[i].property,(0,C.jsx)(Z.Z,{mode:"tags",allowClear:!0,placeholder:d.ZP.get("输入后回车增加自定义选项"),children:null===(r=G[t])||void 0===r?void 0:r.map((function(e){return(0,C.jsx)(Z.Z.Option,{value:e.value,children:e.name},e.name)}))})):(0,C.jsx)(b.Z,{placeholder:d.ZP.get("请输入内容")})})),0!==i&&(0,C.jsx)(k.Z,{onClick:function(){return n(i)}})]})},a)})),(0,C.jsx)(P.Z.Item,{children:(0,C.jsxs)("a",{onClick:function(){return a({property:"command",operation:"Reg"})},children:[(0,C.jsx)(w.Z,{}),d.ZP.get("新增筛选条件")]})}),(0,C.jsx)(P.Z.ErrorList,{errors:i})]})]})}}),(0,C.jsx)(P.Z.List,{name:"sorts",children:function(e,t,r){var a=t.add,n=t.remove,i=r.errors;return(0,C.jsxs)("div",{style:{position:"relative"},className:"view-filters-container ".concat(e.length>1?"active":""),children:[e.length>1&&(0,C.jsx)("div",{style:{position:"absolute",width:50,borderRadius:10,border:"1px solid rgb(190, 220, 255)",borderRight:"none",height:56*(e.length-1),top:46,left:15},children:(0,C.jsx)(v.Z,{type:"primary",size:"small",style:{position:"absolute",top:"50%",translate:"-50% -50%",padding:"0 3px",cursor:"pointer"},children:(0,C.jsx)(C.Fragment,{children:(0,C.jsx)("span",{children:A[X]})})})}),(0,C.jsxs)("div",{children:[e.map((function(e){var t=e.key,r=e.name,a=l()(e,T);return(0,C.jsx)(P.Z.Item,{label:0===r?d.ZP.get("排序方式"):"",style:{marginBottom:0},className:"filter-item",children:(0,C.jsxs)(f.Z,{className:"view-create-modal-sorts",align:"baseline",children:[(0,C.jsx)(P.Z.Item,s()(s()({},a),{},{name:[r,"property"],rules:[{required:!0}],children:F(R)})),(0,C.jsx)(P.Z.Item,s()(s()({},a),{},{name:[r,"type"],rules:[{required:!0}],children:z})),(0,C.jsx)(k.Z,{onClick:function(){return n(r)}})]})},t)})),(0,C.jsx)(P.Z.Item,{children:(0,C.jsxs)("a",{onClick:function(){return a({property:"command",type:"ASC"})},children:[(0,C.jsx)(w.Z,{}),d.ZP.get("新增排序方式")]})}),(0,C.jsx)(P.Z.ErrorList,{errors:i})]})]})}})]})})}},20710:function(e,t,r){var a=r(72317),l=window.__ENV__QlBaseUrl||"/";t.Z={siteName:a.ZP.get("青龙"),baseUrl:l,apiPrefix:"".concat(l,"api/"),authKey:"token",layouts:[{name:"primary",include:[/.*/],exclude:[/(\/(en|zh))*\/login/]}],i18n:{languages:[{key:"pt-br",title:"Português",flag:"/portugal.svg"},{key:"en",title:"English",flag:"/america.svg"},{key:"zh",title:a.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:a.ZP.get("定时任务"),value:"crons"},{name:a.ZP.get("环境变量"),value:"envs"},{name:a.ZP.get("订阅管理"),value:"subscriptions"},{name:a.ZP.get("配置文件"),value:"configs"},{name:a.ZP.get("脚本管理"),value:"scripts"},{name:a.ZP.get("日志管理"),value:"logs"},{name:a.ZP.get("依赖管理"),value:"dependencies"},{name:a.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:a.ZP.get("定时任务"),envs:a.ZP.get("环境变量"),subscriptions:a.ZP.get("订阅管理"),configs:a.ZP.get("配置文件"),scripts:a.ZP.get("脚本管理"),logs:a.ZP.get("日志管理"),dependencies:a.ZP.get("依赖管理"),system:a.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"ntfy",label:"Ntfy"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:a.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:a.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:a.ZP.get("钉钉机器人")},{value:"weWorkBot",label:a.ZP.get("企业微信机器人")},{value:"weWorkApp",label:a.ZP.get("企业微信应用")},{value:"aibotk",label:a.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"wePlusBot",label:a.ZP.get("微加机器人")},{value:"wxPusherBot",label:"wxPusher"},{value:"chat",label:a.ZP.get("群晖chat")},{value:"email",label:a.ZP.get("邮箱")},{value:"lark",label:a.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:a.ZP.get("自定义通知")},{value:"closed",label:a.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:a.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:a.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:a.ZP.get("推送消息的优先级")}],ntfy:[{label:"ntfyUrl",tip:a.ZP.get("ntfy的url地址,例如 https://ntfy.sh"),required:!0},{label:"ntfyTopic",tip:a.ZP.get("ntfy的消息应用topic"),required:!0},{label:"ntfyPriority",tip:a.ZP.get("推送消息的优先级")}],chat:[{label:"chatUrl",tip:a.ZP.get("chat的url地址"),required:!0},{label:"chatToken",tip:a.ZP.get("chat的token码"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:a.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:a.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:a.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:a.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:a.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:a.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:a.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:a.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:a.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:a.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:a.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:a.ZP.get("BARK推送消息的跳转URL")},{label:"barkArchive",tip:a.ZP.get("BARK是否保存推送消息")}],telegramBot:[{label:"telegramBotToken",tip:a.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:a.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:a.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:a.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:a.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:a.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:a.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:a.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:a.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:a.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:a.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:a.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:a.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:a.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:a.ZP.get("请输入要发送的目标"),items:[{value:"room",label:a.ZP.get("群聊")},{value:"contact",label:a.ZP.get("好友")}]},{label:"aibotkName",tip:a.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:a.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:a.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:a.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:a.ZP.get("发送模板")},{label:"pushplusChannel",tip:a.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:a.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:a.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:a.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:a.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:a.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:a.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:a.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:a.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:a.ZP.get("wxPusherBot的uids"),required:!1}],lark:[{label:"larkKey",tip:a.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:a.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json"),required:!0},{label:"emailUser",tip:a.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:a.ZP.get("SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定"),required:!0}],pushMe:[{label:"pushMeKey",tip:a.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0},{label:"pushMeUrl",tip:a.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],chronocat:[{label:"chronocatURL",tip:a.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:a.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:a.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:a.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:a.ZP.get("请求头Content-Type"),required:!0,items:[{value:"text/plain"},{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:a.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:a.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:a.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":a.ZP.get("登录"),"/initialization":a.ZP.get("初始化"),"/crontab":a.ZP.get("定时任务"),"/env":a.ZP.get("环境变量"),"/subscription":a.ZP.get("订阅管理"),"/config":a.ZP.get("配置文件"),"/script":a.ZP.get("脚本管理"),"/diff":a.ZP.get("对比工具"),"/log":a.ZP.get("日志管理"),"/setting":a.ZP.get("系统设置"),"/error":a.ZP.get("错误日志"),"/dependence":a.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},94978:function(e,t,r){r.d(t,{W:function(){return P}});var a=r(90228),l=r.n(a),n=r(87999),i=r.n(n),o=r(72317),s=r(61508),u=r(20710),p=r(31038),c=r(74799);s.ZP.config({duration:2});var g=Date.now(),d=c.Z.create({timeout:6e4,params:{t:g}}),h=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];d.interceptors.request.use((function(e){var t=localStorage.getItem(u.Z.authKey);return t&&!h.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),d.interceptors.response.use(function(){var e=i()(l()().mark((function e(t){var r,a,n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.status,![502,504].includes(r)){e.next=5;break}p.history.push("/error"),e.next=18;break;case 5:if(401!==r){e.next=9;break}"/login"!==p.history.location.pathname&&(localStorage.removeItem(u.Z.authKey),p.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(a=t.data).code&&(n=a.message||a.data)&&s.ZP.error({content:n,style:{maxWidth:500,margin:"0 auto"}}),e.abrupt("return",a);case 15:e.prev=15,e.t0=e.catch(9);case 17:case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e,null,[[9,15]])})));return function(t){return e.apply(this,arguments)}}(),(function(e){if(e.response){var t=e.response.data?e.response.data.message||e.message||e.response.data:e.response.statusText,r=e.response.status;if([502,504].includes(r))p.history.push("/error");else if(401===r)"/login"!==p.history.location.pathname&&(s.ZP.error(o.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(u.Z.authKey),p.history.push("/login"));else{var a,l;if("function"==typeof(null===(a=e.config)||void 0===a?void 0:a.onError))return null===(l=e.config)||void 0===l?void 0:l.onError(e.response);s.ZP.error({content:t,style:{maxWidth:500,margin:"0 auto"}})}}else console.log(e.message);return Promise.reject(e)}));var P=d}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[1717],{55426:function(e,t,n){var a=(0,n(19919).Z)({scriptUrl:["//at.alicdn.com/t/c/font_3354854_lc939gab1iq.js"]});t.Z=a},80603:function(e,t,n){n.r(t),n.d(t,{default:function(){return O}});var a=n(26068),i=n.n(a),o=n(48305),s=n.n(o),r=n(72317),c=n(75271),u=n(40276),l=n(38894),d=n(71571),h=n(76991),p=n(55426),f=n(52676),m={route:{routes:[{name:r.ZP.get("登录"),path:"/login",hideInMenu:!0,component:"@/pages/login/index"},{name:r.ZP.get("初始化"),path:"/initialization",hideInMenu:!0,component:"@/pages/initialization/index"},{name:r.ZP.get("错误"),path:"/error",hideInMenu:!0,component:"@/pages/error/index"},{path:"/crontab",name:r.ZP.get("定时任务"),icon:(0,f.jsx)(p.Z,{type:"ql-icon-crontab"}),component:"@/pages/crontab/index"},{path:"/subscription",name:r.ZP.get("订阅管理"),icon:(0,f.jsx)(p.Z,{type:"ql-icon-subs"}),component:"@/pages/subscription/index"},{path:"/env",name:r.ZP.get("环境变量"),icon:(0,f.jsx)(p.Z,{type:"ql-icon-env"}),component:"@/pages/env/index"},{path:"/config",name:r.ZP.get("配置文件"),icon:(0,f.jsx)(p.Z,{type:"ql-icon-config"}),component:"@/pages/config/index"},{path:"/script",name:r.ZP.get("脚本管理"),icon:(0,f.jsx)(p.Z,{type:"ql-icon-script"}),component:"@/pages/script/index"},{path:"/dependence",name:r.ZP.get("依赖管理"),icon:(0,f.jsx)(p.Z,{type:"ql-icon-dependence"}),component:"@/pages/dependence/index"},{path:"/log",name:r.ZP.get("日志管理"),icon:(0,f.jsx)(p.Z,{type:"ql-icon-log"}),component:"@/pages/log/index"},{path:"/diff",name:r.ZP.get("对比工具"),icon:(0,f.jsx)(p.Z,{type:"ql-icon-diff"}),component:"@/pages/diff/index"},{path:"/setting",name:r.ZP.get("系统设置"),icon:(0,f.jsx)(h.Z,{}),component:"@/pages/password/index"}]},navTheme:"light",fixSiderbar:!0,contentWidth:"Fixed",splitMenus:!1,siderWidth:180},g=n(31038),v=n(81379),x=n(1371),b=n(5323),k=n(41206),y=n(20710),Z=n(94978),S=n(86563),j=n.n(S),w=n(31306),P=n(65823),I=n(59816),E=n(87893),L=n(85950),T=n(70892),q=n(44190),C=n(59489),z=n(58573),A=n(55014),M=n(907),_=n(83383),N=n(5791);var R=n(69325);function O(){var e=(0,g.useLocation)(),t=(0,w.e)(),n=(0,w.F)(),a=n.theme,o=n.reloadTheme,h=(0,c.useState)({}),p=s()(h,2),S=p[0],O=p[1],F=(0,c.useState)(!0),W=s()(F,2),H=W[0],U=W[1],B=(0,c.useState)(),D=s()(B,2),J=D[0],K=D[1],G=(0,c.useState)(!1),Q=s()(G,2),V=Q[0],$=Q[1],X=(0,c.useState)(!0),Y=s()(X,2),ee=Y[0],te=Y[1],ne=d||{},ae=ne.enable,ie=ne.disable,oe=(ne.exportGeneratedCSS,ne.setFetchMethod),se=ne.auto,re=function(){Z.W.get("".concat(y.Z.apiPrefix,"system")).then((function(e){var t,n=e.code,a=e.data;200===n&&(K(a),a.isInitialized?(t=a.version,z.S({dsn:"https://49b9ad1a6201bfe027db296ab7c6d672@o1098464.ingest.sentry.io/6122818",integrations:[A.g3({useEffect:c.useEffect,useLocation:N.TH,useNavigationType:N.ur,createRoutesFromChildren:N.is,matchRoutes:N.fp}),M.G()],beforeBreadcrumb:function(e){if(e.data&&e.data.url){var t=e.data.url.replace(/token=.*/,"");e.data.url=t}return e},tracesSampleRate:.1,tracePropagationTargets:[/^(?!\/api\/(ws|static)).*$/],replaysSessionSampleRate:.1,replaysOnErrorSampleRate:.1,release:t}),_._m.config({paths:{vs:"".concat(y.Z.baseUrl,"monaco-editor/min/vs")},"vs/nls":{availableLanguages:{"*":"zh-cn"}}}),ce()):g.history.push("/initialization"))})).catch((function(e){console.log(e)}))},ce=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t&&U(!0),Z.W.get("".concat(y.Z.apiPrefix,"user")).then((function(n){var a=n.code,i=n.data;200===a&&i.username&&(O(i),"/"===e.pathname&&g.history.push("/crontab")),t&&U(!1)})).catch((function(e){console.log(e)}))},ue=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];ce(e)};if((0,c.useEffect)((function(){J&&J.isInitialized&&!S&&ce()}),[e.pathname]),(0,c.useEffect)((function(){Z.W.get("".concat(y.Z.apiPrefix,"public/health")).then((function(e){var t;1===(null==e||null===(t=e.data)||void 0===t?void 0:t.status)?re():g.history.push("/error")})).catch((function(e){g.history.push("/error")})).finally((function(){return te(!1)}))}),[]),(0,c.useEffect)((function(){"vs-dark"===a?document.body.setAttribute("data-dark","true"):document.body.setAttribute("data-dark","false")}),[a]),(0,c.useEffect)((function(){j()();var e=localStorage.getItem("qinglong_dark_theme")||"auto";if("undefined"!=typeof window&&void 0!==window.matchMedia)return d?(oe(fetch),"dark"===e?ae({}):"light"===e?ie():se({}),function(){ie()}):function(){return null}}),[]),(0,c.useEffect)((function(){if(S&&S.username){var e=R.Z.getInstance("".concat(window.location.origin).concat(y.Z.apiPrefix,"ws?token=").concat(localStorage.getItem(y.Z.authKey)));return function(){e.close()}}}),[S]),(0,c.useEffect)((function(){window.onload=function(){var e=performance.timing;console.log("白屏时间: ".concat(e.responseStart-e.navigationStart)),console.log("请求完毕至DOM加载: ".concat(e.domInteractive-e.responseEnd)),console.log("解释dom树耗时: ".concat(e.domComplete-e.domInteractive)),console.log("从开始至load总耗时: ".concat(e.loadEventEnd-e.navigationStart)),q.uT("白屏时间 ".concat(e.responseStart-e.navigationStart))}}),[]),ee)return(0,f.jsx)(u.Z,{});if(["/login","/initialization","/error"].includes(e.pathname)&&(null!=J&&J.isInitialized&&"/initialization"===e.pathname&&g.history.push("/crontab"),J||"/error"===e.pathname))return(0,f.jsx)(g.Outlet,{context:i()(i()({},t),{},{theme:a,user:S,reloadUser:ue,reloadTheme:o})});var le=navigator.userAgent.includes("Firefox"),de=navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome"),he=navigator.userAgent.includes("QQBrowser"),pe={items:[{label:r.ZP.get("退出登录"),className:"side-menu-user-drop-menu",onClick:function(){Z.W.post("".concat(y.Z.apiPrefix,"user/logout")).then((function(){localStorage.removeItem(y.Z.authKey),g.history.push("/login")}))},key:"logout",icon:(0,f.jsx)(v.Z,{})}]};return H?(0,f.jsx)(u.Z,{}):(0,f.jsx)(l.ZP,i()(i()({selectedKeys:[e.pathname],loading:H,ErrorBoundary:C.SV,logo:(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(P.Z,{preview:!1,src:"https://qn.whyour.cn/logo.png"}),(0,f.jsxs)("div",{className:"title",children:[(0,f.jsx)("span",{className:"title",children:r.ZP.get("青龙")}),(0,f.jsx)("a",{href:null==J?void 0:J.changeLogLink,target:"_blank",rel:"noopener noreferrer",onClick:function(e){e.stopPropagation()},children:(0,f.jsx)(I.Z,{title:"develop"===(null==J?void 0:J.branch)?r.ZP.get("开发版"):r.ZP.get("正式版"),children:(0,f.jsx)(E.Z,{size:"small",dot:"develop"===(null==J?void 0:J.branch),children:(0,f.jsxs)("span",{style:{fontSize:le?9:12,color:"#666",marginLeft:2,zoom:de?.66:.8,letterSpacing:he?-2:0},children:["v",null==J?void 0:J.version]})})})})]})]}),title:!1,menuItemRender:function(t,n){return t.isUrl||!t.path||e.pathname===t.path?n:(0,f.jsx)(g.Link,{to:t.path,children:n})},pageTitleRender:function(t,n,a){var i=y.Z.documentTitleMap[e.pathname]||r.ZP.get("未找到");return"".concat(i," - ").concat(r.ZP.get("青龙"))},onCollapse:$,collapsed:V,rightContentRender:function(){return t.isPhone&&(0,f.jsx)(L.Z,{menu:pe,placement:"bottomRight",trigger:["click"],children:(0,f.jsxs)("span",{className:"side-menu-user-wrapper",children:[(0,f.jsx)(T.C,{shape:"square",size:"small",icon:(0,f.jsx)(x.Z,{}),src:S.avatar?"".concat(y.Z.apiPrefix,"static/").concat(S.avatar):""}),(0,f.jsx)("span",{style:{marginLeft:5},children:S.username})]})})},collapsedButtonRender:function(e){return(0,f.jsxs)("span",{className:"side-menu-container",onClick:function(e){e.preventDefault(),e.stopPropagation()},children:[!e&&!t.isPhone&&(0,f.jsx)(L.Z,{menu:pe,placement:"topLeft",trigger:["hover"],children:(0,f.jsxs)("span",{className:"side-menu-user-wrapper",children:[(0,f.jsx)(T.C,{shape:"square",size:"small",icon:(0,f.jsx)(x.Z,{}),src:S.avatar?"".concat(y.Z.apiPrefix,"static/").concat(S.avatar):""}),(0,f.jsx)("span",{style:{marginLeft:5},children:S.username})]})}),(0,f.jsx)("span",{className:"side-menu-collapse-button",onClick:function(){return $(!e)},children:e?(0,f.jsx)(b.Z,{}):(0,f.jsx)(k.Z,{})})]})}},m),{},{children:(0,f.jsx)(g.Outlet,{context:i()(i()({},t),{},{theme:a,user:S,reloadUser:ue,reloadTheme:o,systemInfo:J})})}))}},31306:function(e,t,n){n.d(t,{F:function(){return c},e:function(){return r}});var a=n(48305),i=n.n(a),o=n(75271),s=n(65609),r=function(){var e=(0,o.useState)("100%"),t=i()(e,2),n=t[0],a=t[1],r=(0,o.useState)(0),c=i()(r,2),u=c[0],l=c[1],d=(0,o.useState)(-48),h=i()(d,2),p=h[0],f=h[1],m=(0,o.useState)(!1),g=i()(m,2),v=g[0],x=g[1],b=(0,o.useMemo)((function(){return(0,s.ZP)()}),[]).platform;return(0,o.useEffect)((function(){"mobile"===b&&document.body.offsetWidth<768?(a("auto"),l(0),f(0),x(!0),document.body.setAttribute("data-mode","phone")):(a("100%"),l(0),f(-48),x(!1),document.body.setAttribute("data-mode","desktop"))}),[]),{headerStyle:{padding:"4px 16px 4px 15px",position:"sticky",top:0,left:0,zIndex:20,marginTop:p,width:n,marginLeft:u},isPhone:v}},c=function(){var e=(0,o.useState)(),t=i()(e,2),n=t[0],a=t[1];return(0,o.useEffect)((function(){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=localStorage.getItem("qinglong_dark_theme"),n=e.matches&&"light"!==t||"dark"===t;a(n?"vs-dark":"vs");var i=function(e){"auto"!==t&&t||(e.matches?a("vs-dark"):a("vs"))};"function"==typeof e.addEventListener?e.addEventListener("change",i):"function"==typeof e.addListener&&e.addListener(i)}),[]),{theme:n,reloadTheme:function(){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=localStorage.getItem("qinglong_dark_theme"),n=e.matches&&"light"!==t||"dark"===t;a(n?"vs-dark":"vs")}}}},69325:function(e,t,n){var a=n(15558),i=n.n(a),o=n(67825),s=n.n(o),r=n(90228),c=n.n(r),u=n(87999),l=n.n(u),d=n(25298),h=n.n(d),p=n(17069),f=n.n(p),m=n(82092),g=n.n(m),v=n(78078),x=n.n(v),b=["type"],k=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h()(this,e),g()(this,"url",void 0),g()(this,"socket",null),g()(this,"subscriptions",new Map),g()(this,"options",void 0),g()(this,"reconnectAttempts",0),g()(this,"heartbeatTimeout",null),g()(this,"state","closed"),this.url=t,this.options={maxReconnectAttempts:n.maxReconnectAttempts||5,reconnectInterval:n.reconnectInterval||3e3,heartbeatInterval:n.heartbeatInterval||3e4},this.init()}var t,n;return f()(e,[{key:"init",value:(n=l()(c()().mark((function e(){var t=this;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,this.state="connecting",this.emit("connecting");case 3:if(!(this.reconnectAttempts<this.options.maxReconnectAttempts)){e.next=16;break}return this.socket=new(x())(this.url),this.setupEventListeners(),this.startHeartbeat(),e.next=9,this.waitForClose();case 9:return this.stopHeartbeat(),this.socket=null,this.reconnectAttempts++,e.next=14,new Promise((function(e){return setTimeout(e,t.options.reconnectInterval)}));case 14:e.next=3;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),this.handleError(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(){return n.apply(this,arguments)})},{key:"setupEventListeners",value:function(){var e=this;this.socket&&(this.socket.onopen=function(){e.state="open",e.emit("open")},this.socket.onmessage=function(t){var n=JSON.parse(t.data);e.dispatchMessage(n)},this.socket.onclose=function(){e.state="closed",e.emit("close")})}},{key:"waitForClose",value:(t=l()(c()().mark((function e(){var t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===(t=this.socket)||void 0===t?void 0:t.readyState)===x().CLOSED){e.next=5;break}return e.next=3,new Promise((function(e){return setTimeout(e,100)}));case 3:e.next=0;break;case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"subscribe",value:function(e,t){var n=this.subscriptions.get(e)||new Set;if(!n.has(t)){n.add(t),this.subscriptions.set(e,n);var a={action:"subscribe",topic:e};this.send(a)}}},{key:"unsubscribe",value:function(e,t){var n=this.subscriptions.get(e)||new Set;if(n.has(t)){n.delete(t);var a={action:"unsubscribe",topic:e};this.send(a)}}},{key:"send",value:function(e){var t;(null===(t=this.socket)||void 0===t?void 0:t.readyState)===x().OPEN&&this.socket.send(JSON.stringify(e))}},{key:"dispatchMessage",value:function(e){var t=e.type,n=s()(e,b),a=this.subscriptions.get(t)||new Set;i()(a).forEach((function(e){return e(n)}))}},{key:"startHeartbeat",value:function(){var e=this;this.heartbeatTimeout=setInterval((function(){var t;(null===(t=e.socket)||void 0===t?void 0:t.readyState)===x().OPEN&&e.socket.send(JSON.stringify({type:"heartbeat"}))}),this.options.heartbeatInterval)}},{key:"stopHeartbeat",value:function(){this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout)}},{key:"close",value:function(){this.socket&&(this.state="closed",this.stopHeartbeat(),this.socket.close(),this.emit("close"))}},{key:"handleError",value:function(e){console.error("WebSocket错误:",e),this.emit("error",e)}},{key:"on",value:function(e,t){}},{key:"emit",value:function(e,t){}}],[{key:"getInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return e.instance||(e.instance=new e(t,n)),e.instance}}]),e}();g()(k,"instance",null),t.Z=k}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(){"use strict";var t="/".replace(/([^/])$/,"$1/"),e=location.pathname,n=e.startsWith(t)&&decodeURI("/".concat(e.slice(t.length)));if(n){var a=document,c=a.head,r=a.createElement.bind(a),i=function(t,e,n){var a,c=e.r[t]||(null===(a=Object.entries(e.r).find((function(e){var n=e[0];return new RegExp("^".concat(n.replace(/\/:[^/]+/g,"/[^/]+").replace("/*","/.+"),"$")).test(t)})))||void 0===a?void 0:a[1]);return null==c?void 0:c.map((function(t){var a=e.f[t][1],c=e.f[t][0];return{type:c.split(".").pop(),url:"".concat(n.publicPath).concat(c),attrs:[["data-".concat(e.b),"".concat(e.p,":").concat(a)]]}}))}(n,{"p":"@whyour/qinglong","b":"webpack","f":[["src__pages__subscription__modal.aefaf070.async.js",73],["119.89e2d610.async.js",119],["src__pages__setting__about.f6325812.chunk.css",154],["src__pages__setting__about.3a1a6f3b.async.js",154],["src__pages__env__modal.3b0ca9a6.async.js",222],["255.12f03ab2.async.js",255],["src__pages__crontab__viewManageModal.c71ebc5a.async.js",349],["src__pages__script__setting.9d5ad53c.async.js",440],["src__pages__subscription__logModal.b3c7c02c.async.js",578],["691.187a388c.async.js",691],["src__pages__dependence__modal.9fd1176b.async.js",803],["852.15be2189.async.js",852],["872.3fffed15.chunk.css",872],["872.10bd0974.async.js",872],["1149.33cb7e7a.async.js",1149],["1352.ab6da08e.async.js",1352],["src__pages__dependence__logModal.f123e2ac.async.js",1406],["src__pages__initialization__index.66819338.chunk.css",1554],["src__pages__initialization__index.346725d1.async.js",1554],["1571.94ddca13.async.js",1571],["layouts__index.1fce90e0.chunk.css",1717],["layouts__index.c164d41f.async.js",1717],["1742.6cbe5aca.async.js",1742],["1765.d8e002d7.async.js",1765],["1885.e0d00d2d.async.js",1885],["2081.d0d781b1.async.js",2081],["2096.383c1047.async.js",2096],["2237.4d3def87.async.js",2237],["src__pages__setting__appModal.7b3bff1e.async.js",2313],["2325.dfa32834.async.js",2325],["2338.d678967d.async.js",2338],["src__pages__setting__index.d666f8ec.chunk.css",2340],["src__pages__setting__index.ffa1cdd6.async.js",2340],["2625.675b6a18.chunk.css",2625],["2634.a765cd37.async.js",2634],["2821.be3dc88e.async.js",2821],["2890.9e373f5b.async.js",2890],["src__pages__error__index.b047bb77.chunk.css",3217],["src__pages__error__index.0221fcd9.async.js",3217],["src__pages__crontab__logModal.c88ea3b7.async.js",3249],["src__pages__setting__progress.75143dca.async.js",3308],["3382.a584a111.async.js",3382],["3383.041eee73.async.js",3383],["3390.fb4b6851.async.js",3390],["3481.333c2962.async.js",3481],["3600.7637c822.async.js",3600],["src__pages__setting__checkUpdate.0dfdaf7c.async.js",3830],["4046.7fbcfa02.async.js",4046],["src__pages__env__editNameModal.c35e96f9.async.js",4216],["src__pages__crontab__viewCreateModal.ffcf7a24.async.js",4453],["src__pages__crontab__index.5bbea517.chunk.css",4473],["src__pages__crontab__index.55a8714d.async.js",4473],["4642.9e24d86c.async.js",4642],["src__pages__404.6871535b.async.js",4650],["4799.d5ca9f30.async.js",4799],["4865.98e5a005.async.js",4865],["4902.54ecbdb5.async.js",4902],["5312.5545b3ed.async.js",5312],["5481.624d0e07.async.js",5481],["5520.ff2cfd6b.async.js",5520],["src__pages__setting__security.7c80dd0f.chunk.css",5530],["src__pages__setting__security.c777fb87.async.js",5530],["src__pages__script__editModal.28caeb56.async.js",5586],["src__pages__setting__loginLog.fc87584a.async.js",5722],["src__pages__crontab__type.5895ed02.async.js",5812],["src__pages__config__index.39b5f99f.async.js",5825],["5970.10ac4f16.async.js",5970],["6013.2d7bb12a.async.js",6013],["6016.9c379049.async.js",6016],["6035.5889ddc7.async.js",6035],["6159.55cb068a.async.js",6159],["6341.673fb65c.async.js",6341],["src__pages__diff__index.16e53710.chunk.css",6401],["src__pages__diff__index.8ba53a1e.async.js",6401],["6439.7ef6c5e3.async.js",6439],["src__pages__setting__other.55c598d0.chunk.css",6465],["src__pages__setting__other.34ccb2e8.async.js",6465],["src__pages__script__index.21696222.chunk.css",6534],["src__pages__script__index.6a212c2d.async.js",6534],["6646.5fc37228.async.js",6646],["6707.801b886b.async.js",6707],["6872.42f939f1.async.js",6872],["src__pages__setting__dependence.55c598d0.chunk.css",6877],["src__pages__setting__dependence.a9b7ed43.async.js",6877],["src__pages__script__editNameModal.1155d34c.async.js",7158],["src__pages__setting__notification.97b1d997.async.js",7213],["src__pages__dependence__type.bdac3725.async.js",7243],["7285.d561cf26.async.js",7285],["7355.5e5e573b.async.js",7355],["7384.065ccae2.async.js",7384],["7528.d8b76d8a.async.js",7528],["7802.6b73f16a.async.js",7802],["src__pages__subscription__index.4b5150de.chunk.css",7953],["src__pages__subscription__index.69a6de02.async.js",7953],["8060.8b699029.async.js",8060],["8078.8586c875.async.js",8078],["8142.e3e82eda.async.js",8142],["src__pages__env__index.77923857.chunk.css",8247],["src__pages__env__index.c799138c.async.js",8247],["src__pages__crontab__modal.328fee41.async.js",8393],["src__pages__setting__systemLog.63e9c69d.async.js",8490],["8528.3dffc548.async.js",8528],["src__pages__script__saveModal.04d43882.async.js",8673],["8982.d2dba153.async.js",8982],["src__pages__script__renameModal.dabfccfd.async.js",9064],["9065.df8d5dcc.async.js",9065],["9066.605168f8.async.js",9066],["src__pages__crontab__detail.6f7c3205.async.js",9558],["9730.30083c91.async.js",9730],["9761.627ca3b5.async.js",9761],["src__pages__log__index.9f2eae80.chunk.css",9818],["src__pages__log__index.2fd615f2.async.js",9818],["src__pages__dependence__index.ef46db37.chunk.css",9914],["src__pages__dependence__index.edec638b.async.js",9914],["src__pages__login__index.d00b91e8.chunk.css",9939],["src__pages__login__index.1dd6e684.async.js",9939]],"r":{"/*":[5,9,23,35,44,45,53,66,1,19,20,21,33,34,42,43,47,52,54,89,95,106],"/":[1,5,19,20,21,23,33,34,35,42,43,44,45,47,52,54,89,95,106],"/initialization":[5,9,17,18,23,30,35,44,54,66,67,68,87,1,19,20,21,33,34,42,43,45,47,52,89,95,106],"/subscription":[1,5,9,12,13,23,24,27,29,30,33,35,44,47,52,54,59,66,67,69,71,79,87,88,89,92,93,94,95,106,108,19,20,21,34,42,43,45],"/dependence":[1,5,9,11,12,13,14,23,24,29,30,33,35,44,54,59,66,67,69,71,87,88,89,91,94,95,106,108,112,113,19,20,21,34,42,43,45,47,52],"/crontab":[1,5,9,12,13,14,15,23,24,29,30,33,35,36,42,44,47,50,51,54,55,59,66,67,69,70,71,74,87,88,89,94,103,106,108,19,20,21,34,43,45,52,95],"/setting":[1,5,9,12,13,15,19,22,23,24,25,29,30,31,32,33,35,36,44,47,54,56,58,59,66,67,68,69,71,81,87,88,89,94,95,106,108,109,20,21,34,42,43,45,52],"/config":[1,5,12,13,22,23,24,33,35,42,44,47,52,54,57,65,67,69,89,96,19,20,21,34,43,45,95,106],"/script":[1,5,9,12,13,22,23,24,30,33,35,41,42,44,47,54,57,59,66,67,68,69,71,77,78,87,89,94,95,96,101,106,108,109,19,20,21,34,43,45,52],"/error":[5,9,23,35,37,38,54,66,1,19,20,21,33,34,42,43,44,45,47,52,89,95,106],"/login":[5,23,30,35,36,44,47,52,54,66,87,114,115,1,19,20,21,33,34,42,43,45,89,95,106],"/diff":[1,5,12,13,23,30,33,35,42,44,47,52,54,67,69,72,73,80,89,19,20,21,34,43,45,95,106],"/env":[1,5,9,12,13,14,23,24,29,30,33,35,44,47,52,54,55,59,66,67,68,69,71,87,88,89,90,97,98,106,108,109,19,20,21,34,42,43,45,95],"/log":[1,5,9,12,13,22,23,24,33,35,41,42,44,47,52,54,59,66,67,69,71,87,89,96,106,108,110,111,19,20,21,34,43,45,95],"/crontab/viewCreateModal":[5,15,23,30,35,44,49,54,59,66,67,87,105,106,1,19,20,21,33,34,42,43,45,47,52,89,95],"/crontab/viewManageModal":[1,5,6,9,14,15,23,24,29,30,35,44,54,55,59,66,67,71,87,88,89,105,106,108,19,20,21,33,34,42,43,45,47,52,95],"/subscription/logModal":[8,35,44,47,52,54,59,94,106,1,5,19,20,21,23,33,34,42,43,45,89,95],"/script/editNameModal":[5,23,24,26,30,35,44,54,59,66,67,68,84,87,96,106,108,109,1,19,20,21,33,34,42,43,45,47,52,89,95],"/setting/notification":[5,23,30,35,44,54,66,67,85,87,1,19,20,21,33,34,42,43,45,47,52,89,95,106],"/dependence/logModal":[11,16,35,44,54,59,94,95,106,1,5,19,20,21,23,33,34,42,43,45,47,52,89],"/setting/checkUpdate":[35,36,44,46,47,52,54,59,94,95,106,1,5,19,20,21,23,33,34,42,43,45,89],"/script/renameModal":[5,23,30,35,44,54,59,66,87,104,106,1,19,20,21,33,34,42,43,45,47,52,89,95],"/setting/dependence":[5,23,30,35,44,54,66,82,83,87,94,95,1,19,20,21,33,34,42,43,45,47,52,89,106],"/subscription/modal":[0,5,23,27,30,35,44,47,54,59,66,67,79,87,106,1,19,20,21,33,34,42,43,45,52,89,95],"/env/editNameModal":[5,23,30,35,44,48,54,59,66,87,106,1,19,20,21,33,34,42,43,45,47,52,89,95],"/setting/systemLog":[5,15,22,35,44,54,58,100,1,19,20,21,23,33,34,42,43,45,47,52,89,95,106],"/crontab/logModal":[5,9,23,35,36,39,44,47,52,54,59,66,94,106,1,19,20,21,33,34,42,43,45,89,95],"/dependence/modal":[5,10,23,30,35,44,54,59,66,67,87,106,1,19,20,21,33,34,42,43,45,47,52,89,95],"/script/editModal":[5,23,24,30,35,41,42,43,44,47,52,54,59,62,66,67,87,94,95,96,106,1,19,20,21,33,34,45,89],"/script/saveModal":[5,23,30,35,44,54,59,66,87,102,106,1,19,20,21,33,34,42,43,45,47,52,89,95],"/setting/appModal":[5,23,28,30,35,44,54,59,66,67,87,106,1,19,20,21,33,34,42,43,45,47,52,89,95],"/setting/loginLog":[1,5,9,23,24,29,35,44,63,66,67,71,87,88,89,19,20,21,33,34,42,43,45,47,52,54,95,106],"/setting/progress":[35,40,44,59,68,106,1,5,19,20,21,23,33,34,42,43,45,47,52,54,89,95],"/setting/security":[5,9,23,25,30,35,44,54,59,60,61,66,68,87,106,108,109,1,19,20,21,33,34,42,43,45,47,52,89,95],"/dependence/type":[86,1,5,19,20,21,23,33,34,35,42,43,44,45,47,52,54,89,95,106],"/crontab/detail":[5,9,23,29,35,36,42,44,47,52,54,59,66,67,69,74,89,94,106,107,1,19,20,21,33,34,43,45,95],"/script/setting":[5,7,23,30,35,44,54,59,66,87,106,1,19,20,21,33,34,42,43,45,47,52,89,95],"/crontab/modal":[5,23,30,35,44,47,54,59,66,70,87,99,106,1,19,20,21,33,34,42,43,45,52,89,95],"/setting/about":[2,3,5,9,23,35,66,1,19,20,21,33,34,42,43,44,45,47,52,54,89,95,106],"/setting/other":[5,19,23,30,35,36,44,47,52,54,59,66,67,68,75,76,79,81,87,94,95,106,108,109,1,20,21,33,34,42,43,45,89],"/crontab/type":[64,1,5,19,20,21,23,33,34,35,42,43,44,45,47,52,54,89,95,106],"/env/modal":[4,5,23,30,35,44,54,59,66,87,106,1,19,20,21,33,34,42,43,45,47,52,89,95]}},{publicPath:"./"});null==i||i.forEach((function(t){var e,n=t.type,a=t.url;if("js"===n)(e=r("script")).src=a,e.async=!0;else{if("css"!==n)return;(e=r("link")).href=a,e.rel="preload",e.as="style"}t.attrs.forEach((function(t){e.setAttribute(t[0],t[1]||"")})),c.appendChild(e)}))}}();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[4650],{69870:function(E,e){e.Z={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"}},81372:function(E,e,N){var a=N(98037),c=N(75271),_=N(69870),s=N(64720),t=function(E,e){return c.createElement(s.Z,(0,a.Z)((0,a.Z)({},E),{},{ref:e,icon:_.Z}))},M=c.forwardRef(t);e.Z=M},8980:function(E,e,N){N.r(e);var a=N(72317),c=(N(75271),N(50691)),_=N(13600),s=N(93481),t=N(52676),M=c.Z.Link;e.default=function(){return(0,t.jsx)(_.ZP,{status:"404",title:"404",extra:(0,t.jsx)(s.Z,{type:"primary",children:(0,t.jsx)(M,{href:"/",children:a.ZP.get("返回首页")})})})}},1260:function(E,e){var N={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(E){var e=E.keyCode;if(E.altKey&&!E.ctrlKey||E.metaKey||e>=N.F1&&e<=N.F12)return!1;switch(e){case N.ALT:case N.CAPS_LOCK:case N.CONTEXT_MENU:case N.CTRL:case N.DOWN:case N.END:case N.ESC:case N.HOME:case N.INSERT:case N.LEFT:case N.MAC_FF_META:case N.META:case N.NUMLOCK:case N.NUM_CENTER:case N.PAGE_DOWN:case N.PAGE_UP:case N.PAUSE:case N.PRINT_SCREEN:case N.RIGHT:case N.SHIFT:case N.UP:case N.WIN_KEY:case N.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(E){if(E>=N.ZERO&&E<=N.NINE)return!0;if(E>=N.NUM_ZERO&&E<=N.NUM_MULTIPLY)return!0;if(E>=N.A&&E<=N.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===E)return!0;switch(E){case N.SPACE:case N.QUESTION_MARK:case N.NUM_PLUS:case N.NUM_MINUS:case N.NUM_PERIOD:case N.NUM_DIVISION:case N.SEMICOLON:case N.DASH:case N.EQUALS:case N.COMMA:case N.PERIOD:case N.SLASH:case N.APOSTROPHE:case N.SINGLE_QUOTE:case N.OPEN_SQUARE_BRACKET:case N.BACKSLASH:case N.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};e.Z=N}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[5825],{43008:function(e,n,t){t.d(n,{Z:function(){return s}});var a=t(98037),o=t(75271),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},c=t(64720),i=function(e,n){return o.createElement(c.Z,(0,a.Z)((0,a.Z)({},e),{},{ref:n,icon:r}))};var s=o.forwardRef(i)},20721:function(e,n,t){t.r(n);var a=t(48305),o=t.n(a),r=t(72317),c=t(75271),i=t(61508),s=t(88142),u=t(93481),l=t(20710),d=t(40872),f=t(94978),E=t(83383),p=t(71742),h=t(31038),g=t(82904),m=t(28837),S=t(65609),N=t(52676);n.default=function(){var e=(0,h.useOutletContext)(),n=e.headerStyle,t=e.isPhone,a=e.theme,C=(0,c.useState)(""),M=o()(C,2),y=M[0],O=M[1],v=(0,c.useState)(!0),T=o()(v,2),_=T[0],U=T[1],P=(0,c.useState)("config.sh"),I=o()(P,2),A=I[0],R=I[1],x=(0,c.useState)("config.sh"),w=o()(x,2),Z=w[0],L=w[1],b=(0,c.useState)([]),D=o()(b,2),F=D[0],K=D[1],k=(0,c.useRef)(null),H=(0,c.useState)(!1),W=o()(H,2),G=W[0],j=W[1],B=(0,c.useState)("shell"),V=o()(B,2),Q=V[0],z=V[1],q=function(e){f.W.get("".concat(l.Z.apiPrefix,"configs/detail?path=").concat(encodeURIComponent(e))).then((function(e){var n=e.code,t=e.data;200===n&&O(t)}))},Y=function(){j(!0);var e=k.current?k.current.getValue().replace(/\r\n/g,"\n"):y;f.W.post("".concat(l.Z.apiPrefix,"configs/save"),{content:e,name:Z}).then((function(e){var n=e.code;e.data;200===n&&i.ZP.success(r.ZP.get("保存成功")),j(!1)}))};return(0,m.y1)("mod+s",(function(e){Y()}),{enableOnFormTags:["textarea"],preventDefault:!0}),(0,c.useEffect)((function(){U(!0),f.W.get("".concat(l.Z.apiPrefix,"configs/files")).then((function(e){var n=e.code,t=e.data;200===n&&K(t)})).finally((function(){return U(!1)})),q("config.sh")}),[]),(0,N.jsx)(d.ZP,{className:"ql-container-wrapper config-wrapper",title:A,loading:_,extra:[(0,N.jsx)(s.Z,{treeExpandAction:"click",className:"config-select",value:Z,dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:F,defaultValue:"config.sh",onSelect:function(e,n){L(e),R(n.value),q(n.value);var t=(0,S.H$)(e);z(t)}},"value"),(0,N.jsx)(u.Z,{loading:G,type:"primary",onClick:Y,children:r.ZP.get("保存")},"1")],header:{style:n},children:t?(0,N.jsx)(p.ZP,{value:y,theme:a.includes("dark")?"dark":"light",extensions:[g.RI.shell()],onChange:function(e){O(e)}}):(0,N.jsx)(E.ZP,{language:Q,value:y,theme:a,options:{fontSize:12,lineNumbersMinChars:3,folding:!1,glyphMargin:!1,accessibilitySupport:"off"},onMount:function(e){k.current=e}})})}},76908:function(e,n,t){var a=t(99459),o=t(75271),r=t(43541);n.Z=function(){var e=o.useState(!1),n=(0,a.Z)(e,2),t=n[0],c=n[1];return o.useEffect((function(){c((0,r.fk)())}),[]),t}},46555:function(e,n,t){t.d(n,{c4:function(){return r}});var a=t(57904),o=t(2053),r=["xxl","xl","lg","md","sm","xs"],c={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"},i=new Map,s=-1,u={},l={matchHandlers:{},dispatch:function(e){return u=e,i.forEach((function(e){return e(u)})),i.size>=1},subscribe:function(e){return i.size||this.register(),s+=1,i.set(s,e),e(u),s},unsubscribe:function(e){i.delete(e),i.size||this.unregister()},unregister:function(){var e=this;Object.keys(c).forEach((function(n){var t=c[n],a=e.matchHandlers[t];null==a||a.mql.removeListener(null==a?void 0:a.listener)})),i.clear()},register:function(){var e=this;Object.keys(c).forEach((function(n){var t=c[n],r=function(t){var r=t.matches;e.dispatch((0,o.Z)((0,o.Z)({},u),(0,a.Z)({},n,r)))},i=window.matchMedia(t);i.addListener(r),e.matchHandlers[t]={mql:i,listener:r},r(i)}))}};n.ZP=l},28800:function(e,n,t){t.d(n,{F:function(){return i},Z:function(){return c}});var a=t(57904),o=t(82187),r=t.n(o);(0,t(86428).b)("warning","error","");function c(e,n,t){return r()((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},"".concat(e,"-status-success"),"success"===n),"".concat(e,"-status-warning"),"warning"===n),"".concat(e,"-status-error"),"error"===n),"".concat(e,"-status-validating"),"validating"===n),"".concat(e,"-has-feedback"),t))}var i=function(e,n){return n||e}},43541:function(e,n,t){t.d(n,{fk:function(){return c},jD:function(){return r}});var a,o=t(71254),r=function(){return(0,o.Z)()&&window.document.documentElement},c=function(){if(!r())return!1;if(void 0!==a)return a;var e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),a=1===e.scrollHeight,document.body.removeChild(e),a}},26382:function(e,n,t){var a=t(2053),o=t(1260),r=t(75271),c=function(e,n){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)n.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(t[a[o]]=e[a[o]])}return t},i={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},s=r.forwardRef((function(e,n){var t=e.style,s=e.noStyle,u=e.disabled,l=c(e,["style","noStyle","disabled"]),d={};return s||(d=(0,a.Z)({},i)),u&&(d.pointerEvents="none"),d=(0,a.Z)((0,a.Z)({},d),t),r.createElement("div",(0,a.Z)({role:"button",tabIndex:0,ref:n},l,{onKeyDown:function(e){e.keyCode===o.Z.ENTER&&e.preventDefault()},onKeyUp:function(n){var t=n.keyCode,a=e.onClick;t===o.Z.ENTER&&a&&a()},style:d}))}));n.Z=s},1260:function(e,n){var t={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var n=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||n>=t.F1&&n<=t.F12)return!1;switch(n){case t.ALT:case t.CAPS_LOCK:case t.CONTEXT_MENU:case t.CTRL:case t.DOWN:case t.END:case t.ESC:case t.HOME:case t.INSERT:case t.LEFT:case t.MAC_FF_META:case t.META:case t.NUMLOCK:case t.NUM_CENTER:case t.PAGE_DOWN:case t.PAGE_UP:case t.PAUSE:case t.PRINT_SCREEN:case t.RIGHT:case t.SHIFT:case t.UP:case t.WIN_KEY:case t.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=t.ZERO&&e<=t.NINE)return!0;if(e>=t.NUM_ZERO&&e<=t.NUM_MULTIPLY)return!0;if(e>=t.A&&e<=t.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case t.SPACE:case t.QUESTION_MARK:case t.NUM_PLUS:case t.NUM_MINUS:case t.NUM_PERIOD:case t.NUM_DIVISION:case t.SEMICOLON:case t.DASH:case t.EQUALS:case t.COMMA:case t.PERIOD:case t.SLASH:case t.APOSTROPHE:case t.SINGLE_QUOTE:case t.OPEN_SQUARE_BRACKET:case t.BACKSLASH:case t.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};n.Z=t},41045:function(e,n,t){t.d(n,{Z:function(){return s}});var a=t(98037),o="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/),r="aria-",c="data-";function i(e,n){return 0===e.indexOf(n)}function s(e){var n,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n=!1===t?{aria:!0,data:!0,attr:!0}:!0===t?{aria:!0}:(0,a.Z)({},t);var s={};return Object.keys(e).forEach((function(t){(n.aria&&("role"===t||i(t,r))||n.data&&i(t,c)||n.attr&&o.includes(t))&&(s[t]=e[t])})),s}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[4473,5812,4642,9065],{55426:function(e,t,n){"use strict";var i=(0,n(19919).Z)({scriptUrl:["//at.alicdn.com/t/c/font_3354854_lc939gab1iq.js"]});t.Z=i},46108:function(e,t,n){"use strict";var i=n(48305),r=n.n(i),a=n(75271),o=n(30502),l=n(65609);t.Z=function(e,t){var n=(0,a.useState)(0),i=r()(n,2),s=i[0],c=i[1];return(0,o.Z)(e,(function(e){var n=e.target;n.classList.contains("ant-table-wrapper")||(n=e.target.querySelector(".ant-table-wrapper")),c((0,l.W9)({extraHeight:t,target:n}))})),s}},6517:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return L}});var i=n(26068),r=n.n(i),a=n(48305),o=n.n(a),l=n(72317),s=n(75271),c=n(50691),u=n(19293),d=n(45520),g=n(61508),p=n(48758),f=n(47667),m=n(59816),h=n(93481),Z=n(66633),x=n(70175),P=n(33886),v=n(9798),b=n(15631),y=n(56958),w=n(89709),j=n(86935),k=n(72523),C=n(38656),S=n(68601),_=n(94978),q=n(20710),B=n(30352),R=n(83383),I=n(55426),N=n(65609),D=n(17355),E=n(30502),T=n(16483),W=n.n(T),O=n(52676),F=c.Z.Text,z=[{key:"log",tab:l.ZP.get("日志")},{key:"script",tab:l.ZP.get("脚本")}],L=function(e){var t,n,i,a,T=e.cron,L=void 0===T?{}:T,M=e.handleCancel,A=e.visible,V=e.theme,H=e.isPhone,U=(0,s.useState)("log"),Y=o()(U,2),K=Y[0],Q=Y[1],X=(0,s.useState)(!0),G=o()(X,2),$=(G[0],G[1]),J=(0,s.useState)([]),ee=o()(J,2),te=ee[0],ne=ee[1],ie=(0,s.useState)(""),re=o()(ie,2),ae=re[0],oe=re[1],le=(0,s.useState)(""),se=o()(le,2),ce=se[0],ue=se[1],de=(0,s.useState)(!1),ge=o()(de,2),pe=ge[0],fe=ge[1],me=(0,s.useRef)(null),he=(0,s.useState)({}),Ze=o()(he,2),xe=Ze[0],Pe=Ze[1],ve=(0,s.useState)(""),be=o()(ve,2),ye=be[0],we=be[1],je=(0,s.useState)(z),ke=o()(je,2),Ce=ke[0],Se=ke[1],_e=(0,s.useState)({}),qe=o()(_e,2),Be=qe[0],Re=qe[1],Ie=(0,s.useRef)(null),Ne=function(e){var t=(0,s.useState)(0),n=o()(t,2),i=n[0],r=n[1];return(0,E.Z)(e,(function(e){var t=e.target.clientHeight;i!==t&&r(t)})),i}(Ie),De={log:(0,O.jsx)("div",{ref:Ie,children:(0,O.jsx)(u.ZP,{children:(0,O.jsx)(D.Z,{data:te,height:Ne,itemHeight:47,itemKey:"filename",children:function(e){return(0,O.jsxs)(u.ZP.Item,{className:"log-item",onClick:function(){return Ee(e)},children:[(0,O.jsx)(x.Z,{style:{marginRight:10}}),e.directory,"/",e.filename]})}})})}),script:xe.filename&&(0,O.jsx)(R.ZP,{language:(0,N.H$)(xe.filename),theme:V,value:ce,options:{fontSize:12,minimap:{enabled:!1},lineNumbersMinChars:3,glyphMargin:!1,accessibilitySupport:"off"},onMount:function(e,t){me.current=e}})},Ee=function(e){var t="".concat(q.Z.apiPrefix,"logs/detail?file=").concat(e.filename,"&path=").concat(e.directory||"");localStorage.setItem("logCron",t),we(t),_.W.get(t).then((function(e){var t=e.code,n=e.data;200===t&&(oe(n),fe(!0))}))},Te=function(){$(!0),_.W.get("".concat(q.Z.apiPrefix,"crons/").concat(L.id,"/logs")).then((function(e){var t=e.code,n=e.data;200===t&&ne(n)})).finally((function(){return $(!1)}))};return(0,s.useEffect)((function(){L&&L.id&&(Re(L),Te(),function(){var e=(0,N.FA)(L.command);if(Array.isArray(e)){Se(Ce);var t=o()(e,2),n=t[0],i=t[1];Pe({parent:i,filename:n}),_.W.get("".concat(q.Z.apiPrefix,"scripts/detail?file=").concat(n,"&path=").concat(i||"")).then((function(e){var t=e.code,n=e.data;200===t&&ue(n)}))}else Se([Ce[0]]),Q("log")}())}),[L]),(0,O.jsxs)(d.Z,{title:(0,O.jsxs)("div",{className:"crontab-title-wrapper",children:[(0,O.jsxs)("div",{style:{minWidth:0,display:"flex",alignItems:"center"},children:[(0,O.jsx)(c.Z.Text,{style:{width:200,boxSizing:"content-box"},ellipsis:{onEllipsis:function(e){return e},tooltip:Be.name},children:Be.name}),(null===(t=Be.labels)||void 0===t?void 0:t.length)>0&&""!==Be.labels[0]&&(0,O.jsx)(p.Z,{type:"vertical"}),(null===(n=Be.labels)||void 0===n?void 0:n.length)>0&&""!==Be.labels[0]&&(null===(i=Be.labels)||void 0===i?void 0:i.map((function(e,t){return(0,O.jsx)(f.Z,{color:"blue",style:{marginRight:5},children:e},e)})))]}),(0,O.jsxs)("div",{className:"operations",children:[(0,O.jsx)(m.Z,{title:Be.status===C.CrontabStatus.idle?l.ZP.get("运行"):l.ZP.get("停止"),children:(0,O.jsx)(h.Z,{type:"link",icon:Be.status===C.CrontabStatus.idle?(0,O.jsx)(P.Z,{}):(0,O.jsx)(v.Z,{}),size:"small",onClick:Be.status===C.CrontabStatus.idle?function(){d.Z.confirm({title:l.ZP.get("确认运行"),content:(0,O.jsxs)(O.Fragment,{children:[l.ZP.get("确认运行定时任务")," ",(0,O.jsx)(F,{style:{wordBreak:"break-all"},type:"warning",children:Be.name})," ",l.ZP.get("吗")]}),onOk:function(){_.W.put("".concat(q.Z.apiPrefix,"crons/run"),[Be.id]).then((function(e){var t=e.code;e.data;200===t&&(Re(r()(r()({},Be),{},{status:C.CrontabStatus.running})),setTimeout((function(){Te()}),1e3))}))},onCancel:function(){console.log("Cancel")}})}:function(){d.Z.confirm({title:l.ZP.get("确认停止"),content:(0,O.jsxs)(O.Fragment,{children:[l.ZP.get("确认停止定时任务")," ",(0,O.jsx)(F,{style:{wordBreak:"break-all"},type:"warning",children:Be.name})," ",l.ZP.get("吗")]}),onOk:function(){_.W.put("".concat(q.Z.apiPrefix,"crons/stop"),[Be.id]).then((function(e){var t=e.code;e.data;200===t&&Re(r()(r()({},Be),{},{status:C.CrontabStatus.idle}))}))},onCancel:function(){console.log("Cancel")}})}})}),(0,O.jsx)(m.Z,{title:1===Be.isDisabled?l.ZP.get("启用"):l.ZP.get("禁用"),children:(0,O.jsx)(h.Z,{type:"link",icon:(0,O.jsx)(I.Z,{type:1===Be.isDisabled?"ql-icon-enable":"ql-icon-disable"}),size:"small",onClick:function(){d.Z.confirm({title:"确认".concat(1===Be.isDisabled?l.ZP.get("启用"):l.ZP.get("禁用")),content:(0,O.jsxs)(O.Fragment,{children:[l.ZP.get("确认"),1===Be.isDisabled?l.ZP.get("启用"):l.ZP.get("禁用"),l.ZP.get("定时任务")," ",(0,O.jsx)(F,{style:{wordBreak:"break-all"},type:"warning",children:Be.name})," ",l.ZP.get("吗")]}),onOk:function(){_.W.put("".concat(q.Z.apiPrefix,"crons/").concat(1===Be.isDisabled?"enable":"disable"),[Be.id]).then((function(e){var t=e.code;e.data;200===t&&Re(r()(r()({},Be),{},{isDisabled:1===Be.isDisabled?0:1}))}))},onCancel:function(){console.log("Cancel")}})}})}),(0,O.jsx)(m.Z,{title:1===Be.isPinned?l.ZP.get("取消置顶"):l.ZP.get("置顶"),children:(0,O.jsx)(h.Z,{type:"link",icon:(0,O.jsx)(I.Z,{type:1===Be.isPinned?"ql-icon-untop":"ql-icon-top"}),size:"small",onClick:function(){d.Z.confirm({title:"确认".concat(1===Be.isPinned?l.ZP.get("取消置顶"):l.ZP.get("置顶")),content:(0,O.jsxs)(O.Fragment,{children:[l.ZP.get("确认"),1===Be.isPinned?l.ZP.get("取消置顶"):l.ZP.get("置顶"),l.ZP.get("定时任务")," ",(0,O.jsx)(F,{style:{wordBreak:"break-all"},type:"warning",children:Be.name})," ",l.ZP.get("吗")]}),onOk:function(){_.W.put("".concat(q.Z.apiPrefix,"crons/").concat(1===Be.isPinned?"unpin":"pin"),[Be.id]).then((function(e){var t=e.code;e.data;200===t&&Re(r()(r()({},Be),{},{isPinned:1===Be.isPinned?0:1}))}))},onCancel:function(){console.log("Cancel")}})}})})]})]}),centered:!0,open:A,forceRender:!0,footer:!1,onCancel:function(){return M()},wrapClassName:"crontab-detail",width:H?"":"80vw",children:[(0,O.jsxs)("div",{className:"card-wrapper",children:[(0,O.jsx)(Z.Z,{children:(0,O.jsxs)("div",{className:"cron-detail-info-item",children:[(0,O.jsx)("div",{className:"cron-detail-info-title",children:l.ZP.get("任务")}),(0,O.jsx)("div",{className:"cron-detail-info-value",children:Be.command})]})}),(0,O.jsxs)(Z.Z,{style:{marginTop:10},children:[(0,O.jsxs)("div",{className:"cron-detail-info-item",children:[(0,O.jsx)("div",{className:"cron-detail-info-title",children:l.ZP.get("状态")}),(0,O.jsxs)("div",{className:"cron-detail-info-value",children:[(!Be.isDisabled||Be.status!==C.CrontabStatus.idle)&&(0,O.jsxs)(O.Fragment,{children:[Be.status===C.CrontabStatus.idle&&(0,O.jsx)(f.Z,{icon:(0,O.jsx)(b.Z,{}),color:"default",children:l.ZP.get("空闲中")}),Be.status===C.CrontabStatus.running&&(0,O.jsx)(f.Z,{icon:(0,O.jsx)(y.Z,{spin:!0}),color:"processing",children:l.ZP.get("运行中")}),Be.status===C.CrontabStatus.queued&&(0,O.jsx)(f.Z,{icon:(0,O.jsx)(w.Z,{}),color:"default",children:l.ZP.get("队列中")})]}),1===Be.isDisabled&&Be.status===C.CrontabStatus.idle&&(0,O.jsx)(f.Z,{icon:(0,O.jsx)(j.Z,{}),color:"error",children:l.ZP.get("已禁用")})]})]}),(0,O.jsxs)("div",{className:"cron-detail-info-item",children:[(0,O.jsx)("div",{className:"cron-detail-info-title",children:l.ZP.get("定时")}),(0,O.jsxs)("div",{className:"cron-detail-info-value",children:[(0,O.jsx)("div",{children:Be.schedule}),null===(a=Be.extra_schedules)||void 0===a?void 0:a.map((function(e){return(0,O.jsx)("div",{children:e.schedule},e.schedule)}))]})]}),(0,O.jsxs)("div",{className:"cron-detail-info-item",children:[(0,O.jsx)("div",{className:"cron-detail-info-title",children:l.ZP.get("最后运行时间")}),(0,O.jsx)("div",{className:"cron-detail-info-value",children:Be.last_execution_time?W()(1e3*Be.last_execution_time).format("YYYY-MM-DD HH:mm:ss"):"-"})]}),(0,O.jsxs)("div",{className:"cron-detail-info-item",children:[(0,O.jsx)("div",{className:"cron-detail-info-title",children:l.ZP.get("最后运行时长")}),(0,O.jsx)("div",{className:"cron-detail-info-value",children:Be.last_running_time?(0,S.E)(Be.last_running_time):"-"})]}),(0,O.jsxs)("div",{className:"cron-detail-info-item",children:[(0,O.jsx)("div",{className:"cron-detail-info-title",children:l.ZP.get("下次运行时间")}),(0,O.jsx)("div",{className:"cron-detail-info-value",children:Be.nextRunTime&&W()(Be.nextRunTime).format("YYYY-MM-DD HH:mm:ss")})]})]}),(0,O.jsx)(Z.Z,{style:{marginTop:10},tabList:Ce,activeTabKey:K,onTabChange:function(e){!function(e){Q(e)}(e)},tabBarExtraContent:"script"===K&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(h.Z,{type:"primary",style:{marginRight:8},onClick:function(){d.Z.confirm({title:"确认保存",content:(0,O.jsxs)(O.Fragment,{children:[l.ZP.get("确认保存文件"),(0,O.jsxs)(F,{style:{wordBreak:"break-all"},type:"warning",children:[" ",xe.filename]}),l.ZP.get(",保存后不可恢复")]}),onOk:function(){var e=me.current?me.current.getValue().replace(/\r\n/g,"\n"):ce;return new Promise((function(t,n){_.W.put("".concat(q.Z.apiPrefix,"scripts"),{filename:xe.filename,path:xe.parent||"",content:e}).then((function(n){var i=n.code;n.data;200===i&&(ue(e),g.ZP.success("保存成功")),t(null)})).catch((function(e){return n(e)}))}))},onCancel:function(){console.log("Cancel")}})},children:l.ZP.get("保存")}),(0,O.jsx)(h.Z,{type:"primary",icon:(0,O.jsx)(k.Z,{}),onClick:function(){var e;null===(e=me.current._domElement.parentElement)||void 0===e||e.requestFullscreen()}})]}),children:De[K]})]}),(0,O.jsx)(B.default,{visible:pe,handleCancel:function(){fe(!1)},cron:L,data:ae,logUrl:ye})]})}},29572:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ce}});var i=n(90228),r=n.n(i),a=n(15558),o=n.n(a),l=n(87999),s=n.n(l),c=n(48305),u=n.n(c),d=n(26068),g=n.n(d),p=n(72317),f=n(75271),m=n(50691),h=n(17082),Z=n(47667),x=n(63505),P=n(45520),v=n(61508),b=n(85950),y=n(93481),w=n(46035),j=n(10948),k=n(15631),C=n(56958),S=n(89709),_=n(86935),q=n(28423),B=n(44084),R=n(1704),I=n(13868),N=n(88939),D=n(96553),E=n(97953),T=n(88629),W=n(83649),O=n(21288),F=n(76991),z=n(7802),L=n(20710),M=n(40872),A=n(94978),V=n(1591),H=n(30352),U=n(6517),Y=n(68601),K=n(31038),Q=n(49065),X=n(29453),G=n(46108),$=n(65609),J=n(19610),ee=n(38656),te=n(16483),ne=n.n(te),ie=n(32699),re=n(52676),ae=m.Z.Text,oe=m.Z.Paragraph,le=m.Z.Link,se=h.Z.Search,ce=function(){var e=(0,K.useOutletContext)(),t=e.headerStyle,n=e.isPhone,i=e.theme,a=[{title:p.ZP.get("名称"),dataIndex:"name",key:"name",fixed:"left",width:120,render:function(e,t){return(0,re.jsx)(oe,{style:{wordBreak:"break-all",marginBottom:0,color:"#1890ff",cursor:"pointer"},ellipsis:{tooltip:e,rows:2},onClick:function(){et(t),Xe(!0)},children:(0,re.jsx)(le,{children:t.name||"-"})})},sorter:{compare:function(e,t){var n;return null==e||null===(n=e.name)||void 0===n?void 0:n.localeCompare(null==t?void 0:t.name)}}},{title:p.ZP.get("命令/脚本"),dataIndex:"command",key:"command",width:240,render:function(e,t){return(0,re.jsx)(oe,{style:{wordBreak:"break-all",marginBottom:0},ellipsis:{tooltip:e,rows:2},children:(0,re.jsx)("a",{onClick:function(){Et(t)},children:e})})},sorter:{compare:function(e,t){return e.command.localeCompare(t.command)}}},{title:p.ZP.get("状态"),key:"status",dataIndex:"status",width:100,filters:[{text:p.ZP.get("运行中"),value:ee.CrontabStatus.running},{text:p.ZP.get("空闲中"),value:ee.CrontabStatus.idle},{text:p.ZP.get("已禁用"),value:ee.CrontabStatus.disabled},{text:p.ZP.get("队列中"),value:ee.CrontabStatus.queued}],render:function(e,t){return(0,re.jsxs)(re.Fragment,{children:[(!t.isDisabled||t.status!==ee.CrontabStatus.idle)&&(0,re.jsxs)(re.Fragment,{children:[t.status===ee.CrontabStatus.idle&&(0,re.jsx)(Z.Z,{icon:(0,re.jsx)(k.Z,{}),color:"default",children:p.ZP.get("空闲中")}),t.status===ee.CrontabStatus.running&&(0,re.jsx)(Z.Z,{icon:(0,re.jsx)(C.Z,{spin:!0}),color:"processing",children:p.ZP.get("运行中")}),t.status===ee.CrontabStatus.queued&&(0,re.jsx)(Z.Z,{icon:(0,re.jsx)(S.Z,{}),color:"default",children:p.ZP.get("队列中")})]}),1===t.isDisabled&&t.status===ee.CrontabStatus.idle&&(0,re.jsx)(Z.Z,{icon:(0,re.jsx)(_.Z,{}),color:"error",children:p.ZP.get("已禁用")})]})}},{title:p.ZP.get("定时规则"),dataIndex:"schedule",key:"schedule",width:150,sorter:{compare:function(e,t){return e.schedule.localeCompare(t.schedule)}},render:function(e,t){var n;return(0,re.jsx)(oe,{style:{wordBreak:"break-all",marginBottom:0},ellipsis:{tooltip:{placement:"right",title:(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)("div",{children:e}),null===(n=t.extra_schedules)||void 0===n?void 0:n.map((function(e){return(0,re.jsx)("div",{children:e.schedule},e.schedule)}))]})},rows:2},children:e})}},{title:p.ZP.get("最后运行时长"),width:167,dataIndex:"last_running_time",key:"last_running_time",sorter:{compare:function(e,t){return e.last_running_time-t.last_running_time}},render:function(e,t){return t.last_running_time?(0,Y.E)(t.last_running_time):"-"}},{title:p.ZP.get("最后运行时间"),dataIndex:"last_execution_time",key:"last_execution_time",width:141,sorter:{compare:function(e,t){return(e.last_execution_time||0)-(t.last_execution_time||0)}},render:function(e,t){return(0,re.jsx)("span",{style:{display:"block"},children:t.last_execution_time?ne()(1e3*t.last_execution_time).format("YYYY-MM-DD HH:mm:ss"):"-"})}},{title:p.ZP.get("下次运行时间"),width:144,sorter:{compare:function(e,t){return e.nextRunTime-t.nextRunTime}},render:function(e,t){return ne()(t.nextRunTime).format("YYYY-MM-DD HH:mm:ss")}},{title:p.ZP.get("关联订阅"),width:185,render:function(e,t){var n;return(null==t||null===(n=t.subscription)||void 0===n?void 0:n.name)||"-"}},{title:p.ZP.get("操作"),key:"action",width:140,fixed:n?void 0:"right",render:function(e,t,n){return(0,re.jsxs)(x.Z,{size:"middle",children:[t.status===ee.CrontabStatus.idle&&(0,re.jsx)("a",{onClick:function(e){e.stopPropagation(),Ot(t,n)},children:p.ZP.get("运行")}),t.status!==ee.CrontabStatus.idle&&(0,re.jsx)("a",{onClick:function(e){e.stopPropagation(),Ft(t,n)},children:p.ZP.get("停止")}),(0,re.jsx)("a",{onClick:function(e){e.stopPropagation(),De(g()(g()({},t),{},{timestamp:Date.now()}))},children:p.ZP.get("日志")}),(0,re.jsx)(Lt,{record:t,index:n},"more")]})}}],l=(0,f.useState)([]),c=u()(l,2),d=c[0],m=c[1],h=(0,f.useState)(!0),te=u()(h,2),ce=te[0],ue=te[1],de=(0,f.useState)(!1),ge=u()(de,2),pe=ge[0],fe=ge[1],me=(0,f.useState)(!1),he=u()(me,2),Ze=he[0],xe=he[1],Pe=(0,f.useState)(),ve=u()(Pe,2),be=ve[0],ye=ve[1],we=(0,f.useState)(""),je=u()(we,2),ke=je[0],Ce=je[1],Se=(0,f.useState)(!1),_e=u()(Se,2),qe=_e[0],Be=_e[1],Re=(0,f.useState)(),Ie=u()(Re,2),Ne=Ie[0],De=Ie[1],Ee=(0,f.useState)([]),Te=u()(Ee,2),We=Te[0],Oe=Te[1],Fe=(0,f.useState)({}),ze=u()(Fe,2),Le=ze[0],Me=ze[1],Ae=(0,f.useState)(),Ve=u()(Ae,2),He=Ve[0],Ue=Ve[1],Ye=(0,f.useState)(!1),Ke=u()(Ye,2),Qe=Ke[0],Xe=Ke[1],Ge=(0,f.useState)(),$e=u()(Ge,2),Je=$e[0],et=$e[1],tt=(0,f.useState)(""),nt=u()(tt,2),it=nt[0],rt=nt[1],at=(0,f.useState)(),ot=u()(at,2),lt=ot[0],st=ot[1],ct=(0,f.useState)(!1),ut=u()(ct,2),dt=ut[0],gt=ut[1],pt=(0,f.useState)(!1),ft=u()(pt,2),mt=ft[0],ht=ft[1],Zt=(0,f.useState)([]),xt=u()(Zt,2),Pt=xt[0],vt=xt[1],bt=(0,f.useState)([]),yt=u()(bt,2),wt=yt[0],jt=yt[1],kt=(0,f.useState)(!1),Ct=u()(kt,2),St=Ct[0],_t=Ct[1],qt=(0,f.useRef)(null),Bt=(0,G.Z)(qt),Rt=(0,f.useState)(""),It=u()(Rt,2),Nt=It[0],Dt=It[1],Et=function(e){var t=(0,$.FA)(e.command);if(Array.isArray(t)){var n=u()(t,2),i=n[0],r=n[1];K.history.push("/script?p=".concat(r,"&s=").concat(i))}else t&&(location.href=t)},Tt=function(){ue(!0);var e=Le.page,t=Le.size,n=Le.sorter,i=Le.filters,a="".concat(L.Z.apiPrefix,"crons?searchValue=").concat(ke,"&page=").concat(e,"&size=").concat(t,"&filters=").concat(JSON.stringify(i));n&&n.column&&n.order&&(a+="&sorter=".concat(JSON.stringify({field:n.column.key,type:"ascend"===n.order?"ASC":"DESC"}))),He&&(a+="&queryString=".concat(JSON.stringify({filters:He.filters,sorts:He.sorts,filterRelation:He.filterRelation||"and"}))),A.W.get(a).then(function(){var e=s()(r()().mark((function e(t){var n,i,a,l,s,c,u;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.code,i=t.data,200!==n){e.next=9;break}return l=i.data,s=i.total,e.next=5,A.W.get("".concat(L.Z.apiPrefix,"subscriptions?ids=").concat(JSON.stringify(o()(new Set(l.map((function(e){return e.sub_id})).filter(Boolean))))),{onError:ie.noop});case 5:c=e.sent,u=Object.fromEntries(null==c||null===(a=c.data)||void 0===a?void 0:a.map((function(e){return[e.id,e]}))),m(l.map((function(e){return g()(g()({},e),{},{nextRunTime:(0,$.rS)(e.schedule,e.extra_schedules),subscription:null==u?void 0:u[e.sub_id]})}))),st(s);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).finally((function(){return ue(!1)}))},Wt=function(e,t){ye(e),fe(!0)},Ot=function(e,t){P.Z.confirm({title:p.ZP.get("确认运行"),content:(0,re.jsxs)(re.Fragment,{children:[p.ZP.get("确认运行定时任务")," ",(0,re.jsx)(ae,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",p.ZP.get("吗")]}),onOk:function(){A.W.put("".concat(L.Z.apiPrefix,"crons/run"),[e.id]).then((function(t){var n=t.code;t.data;if(200===n){var i=o()(d),r=i.findIndex((function(t){return t.id===e.id}));-1!==r&&(i.splice(r,1,g()(g()({},e),{},{status:ee.CrontabStatus.running})),m(i))}}))},onCancel:function(){console.log("Cancel")}})},Ft=function(e,t){P.Z.confirm({title:p.ZP.get("确认停止"),content:(0,re.jsxs)(re.Fragment,{children:[p.ZP.get("确认停止定时任务")," ",(0,re.jsx)(ae,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",p.ZP.get("吗")]}),onOk:function(){A.W.put("".concat(L.Z.apiPrefix,"crons/stop"),[e.id]).then((function(t){var n=t.code;t.data;if(200===n){var i=o()(d),r=i.findIndex((function(t){return t.id===e.id}));-1!==r&&(i.splice(r,1,g()(g()({},e),{},{pid:null,status:ee.CrontabStatus.idle})),m(i))}}))},onCancel:function(){console.log("Cancel")}})},zt=function(e){return[{label:p.ZP.get("编辑"),key:"edit",icon:(0,re.jsx)(q.Z,{})},{label:1===e.isDisabled?p.ZP.get("启用"):p.ZP.get("禁用"),key:"enableOrDisable",icon:1===e.isDisabled?(0,re.jsx)(B.Z,{}):(0,re.jsx)(R.Z,{})},{label:p.ZP.get("复制"),key:"copy",icon:(0,re.jsx)(I.Z,{})},{label:p.ZP.get("删除"),key:"delete",icon:(0,re.jsx)(N.Z,{})},{label:1===e.isPinned?p.ZP.get("取消置顶"):p.ZP.get("置顶"),key:"pinOrUnPin",icon:1===e.isPinned?(0,re.jsx)(R.Z,{}):(0,re.jsx)(D.Z,{})}]},Lt=function(e){var t=e.record,n=e.index;return(0,re.jsx)(b.Z,{placement:"bottomRight",trigger:["click"],menu:{items:zt(t),onClick:function(e){var i=e.key;e.domEvent.stopPropagation(),Mt(i,t,n)}},children:(0,re.jsx)("a",{onClick:function(e){return e.stopPropagation()},children:(0,re.jsx)(E.Z,{})})})},Mt=function(e,t,n){switch(e){case"edit":Wt(t);break;case"copy":Wt((0,ie.omit)(t,"id"));break;case"enableOrDisable":!function(e,t){P.Z.confirm({title:"确认".concat(1===e.isDisabled?p.ZP.get("启用"):p.ZP.get("禁用")),content:(0,re.jsxs)(re.Fragment,{children:[p.ZP.get("确认"),1===e.isDisabled?p.ZP.get("启用"):p.ZP.get("禁用"),p.ZP.get("定时任务")," ",(0,re.jsx)(ae,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",p.ZP.get("吗")]}),onOk:function(){A.W.put("".concat(L.Z.apiPrefix,"crons/").concat(1===e.isDisabled?"enable":"disable"),[e.id]).then((function(t){var n=t.code;if(t.data,200===n){var i=1===e.isDisabled?0:1,r=o()(d),a=r.findIndex((function(t){return t.id===e.id}));-1!==a&&(r.splice(a,1,g()(g()({},e),{},{isDisabled:i})),m(r))}}))},onCancel:function(){console.log("Cancel")}})}(t);break;case"delete":!function(e,t){P.Z.confirm({title:p.ZP.get("确认删除"),content:(0,re.jsxs)(re.Fragment,{children:[p.ZP.get("确认删除定时任务")," ",(0,re.jsx)(ae,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",p.ZP.get("吗")]}),onOk:function(){A.W.delete("".concat(L.Z.apiPrefix,"crons"),{data:[e.id]}).then((function(t){var n=t.code;if(t.data,200===n){v.ZP.success(p.ZP.get("删除成功"));var i=o()(d),r=i.findIndex((function(t){return t.id===e.id}));-1!==r&&(i.splice(r,1),m(i))}}))},onCancel:function(){console.log("Cancel")}})}(t);break;case"pinOrUnPin":!function(e,t){P.Z.confirm({title:"确认".concat(1===e.isPinned?p.ZP.get("取消置顶"):p.ZP.get("置顶")),content:(0,re.jsxs)(re.Fragment,{children:[p.ZP.get("确认"),1===e.isPinned?p.ZP.get("取消置顶"):p.ZP.get("置顶"),p.ZP.get("定时任务")," ",(0,re.jsx)(ae,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",p.ZP.get("吗")]}),onOk:function(){A.W.put("".concat(L.Z.apiPrefix,"crons/").concat(1===e.isPinned?"unpin":"pin"),[e.id]).then((function(t){var n=t.code;if(t.data,200===n){var i=1===e.isPinned?0:1,r=o()(d),a=r.findIndex((function(t){return t.id===e.id}));-1!==a&&(r.splice(a,1,g()(g()({},e),{},{isPinned:i})),m(r))}}))},onCancel:function(){console.log("Cancel")}})}(t)}},At={selectedRowKeys:We,onChange:function(e){Oe(e)}},Vt=function(e){P.Z.confirm({title:"确认".concat(ee.OperationName[e]),content:(0,re.jsxs)(re.Fragment,{children:[p.ZP.get("确认"),ee.OperationName[e],p.ZP.get("选中的定时任务吗")]}),onOk:function(){A.W.put("".concat(L.Z.apiPrefix,"crons/").concat(ee.OperationPath[e]),We).then((function(e){var t=e.code;e.data;200===t&&Tt()}))},onCancel:function(){console.log("Cancel")}})};(0,f.useEffect)((function(){Ne&&(localStorage.setItem("logCron",Ne.id),Be(!0))}),[Ne]),(0,f.useEffect)((function(){Me(g()(g()({},Le),{},{page:1}))}),[ke]),(0,f.useEffect)((function(){Le.page&&Le.size&&Tt(),He&&He.id&&Dt(He.id)}),[Le,He]),(0,f.useEffect)((function(){if(He&&wt&&wt.length>0){var e=wt.slice(10).find((function(e){return e.id===He.id}));_t(!!e)}}),[He,wt]),(0,f.useEffect)((function(){Ut()}),[]);var Ht={onClick:function(e){var t=e.key;e.domEvent.stopPropagation(),function(e){switch(e){case"new":gt(!0);break;case"manage":ht(!0);break;default:Yt(e)}}(t)},items:[].concat(o()(o()(wt).slice(10).map((function(e){return{label:(0,re.jsxs)(x.Z,{style:{display:"flex",justifyContent:"space-between"},children:[(0,re.jsx)("span",{children:e.name}),(null==He?void 0:He.id)===e.id&&(0,re.jsx)(T.Z,{style:{color:"#1890ff"}})]}),key:e.id,icon:(0,re.jsx)(W.Z,{})}}))),[{type:"divider"},{label:p.ZP.get("创建视图"),key:"new",icon:(0,re.jsx)(O.Z,{})},{label:p.ZP.get("视图管理"),key:"manage",icon:(0,re.jsx)(F.Z,{})}]),style:{maxHeight:350,overflowY:"auto"}},Ut=function(){ue(!0),A.W.get("".concat(L.Z.apiPrefix,"crons/views")).then((function(e){var t=e.code,n=e.data;if(200===t){vt(n);var i=n.filter((function(e){return!e.isDisabled})).map((function(e){return g()(g()({},e),{},{name:"全部任务"===e.name?p.ZP.get("全部任务"):e.name})}));jt(i),Me({page:1,size:parseInt(localStorage.getItem("pageSize")||"20"),sorter:{},filters:{}}),Ue(g()({},i[0]))}})).finally((function(){ue(!1)}))},Yt=function(e){var t=wt.find((function(t){return t.id==e}));Oe([]),Me(g()(g()({},Le),{},{page:1})),Ue(t||null)},Kt=(0,J.u)((function(){return{scroll:{y:Bt}}}),[Bt]),Qt=u()(Kt,1)[0];return(0,re.jsxs)(M.ZP,{className:"ql-container-wrapper crontab-wrapper ql-container-wrapper-has-tab",title:p.ZP.get("定时任务"),extra:[(0,re.jsx)(se,{placeholder:p.ZP.get("请输入名称或者关键词"),style:{width:"auto"},enterButton:!0,allowClear:!0,loading:ce,value:it,onChange:function(e){return rt(e.target.value)},onSearch:function(e){Ce(e.trim())}}),(0,re.jsx)(y.Z,{type:"primary",onClick:function(){return ye(null),void fe(!0)},children:p.ZP.get("创建任务")},"2")],header:{style:t},children:[(0,re.jsx)(w.Z,{defaultActiveKey:"all",size:"small",activeKey:Nt,tabPosition:"top",className:"crontab-view ".concat(St?"more-active":""),tabBarExtraContent:(0,re.jsx)(b.Z,{menu:Ht,trigger:["click"],overlayStyle:{minWidth:200},children:(0,re.jsxs)("div",{className:"view-more ".concat(St?"active":""),children:[(0,re.jsxs)(x.Z,{children:[p.ZP.get("更多"),(0,re.jsx)(z.Z,{})]}),(0,re.jsx)("div",{className:"ant-tabs-ink-bar ant-tabs-ink-bar-animated"})]})}),onTabClick:Yt,items:o()(o()(wt).slice(0,10).map((function(e){return{key:e.id,label:e.name}})))}),(0,re.jsxs)("div",{ref:qt,children:[We.length>0&&(0,re.jsxs)("div",{style:{marginBottom:16},children:[(0,re.jsx)(y.Z,{type:"primary",style:{marginBottom:5},onClick:function(){P.Z.confirm({title:p.ZP.get("确认删除"),content:(0,re.jsx)(re.Fragment,{children:p.ZP.get("确认删除选中的定时任务吗")}),onOk:function(){A.W.delete("".concat(L.Z.apiPrefix,"crons"),{data:We}).then((function(e){var t=e.code;e.data;200===t&&(v.ZP.success(p.ZP.get("批量删除成功")),Oe([]),Tt())}))},onCancel:function(){console.log("Cancel")}})},children:p.ZP.get("批量删除")}),(0,re.jsx)(y.Z,{type:"primary",onClick:function(){return Vt(0)},style:{marginLeft:8,marginBottom:5},children:p.ZP.get("批量启用")}),(0,re.jsx)(y.Z,{type:"primary",onClick:function(){return Vt(1)},style:{marginLeft:8,marginRight:8},children:p.ZP.get("批量禁用")}),(0,re.jsx)(y.Z,{type:"primary",style:{marginRight:8},onClick:function(){return Vt(2)},children:p.ZP.get("批量运行")}),(0,re.jsx)(y.Z,{type:"primary",onClick:function(){return Vt(3)},children:p.ZP.get("批量停止")}),(0,re.jsx)(y.Z,{type:"primary",onClick:function(){return Vt(4)},style:{marginLeft:8,marginRight:8},children:p.ZP.get("批量置顶")}),(0,re.jsx)(y.Z,{type:"primary",onClick:function(){return Vt(5)},style:{marginLeft:8,marginRight:8},children:p.ZP.get("批量取消置顶")}),(0,re.jsx)(y.Z,{type:"primary",onClick:function(){return xe(!0)},style:{marginLeft:8,marginRight:8},children:p.ZP.get("批量修改标签")}),(0,re.jsxs)("span",{style:{marginLeft:8},children:[p.ZP.get("已选择"),(0,re.jsx)("a",{children:null==We?void 0:We.length}),p.ZP.get("项")]})]}),(0,re.jsx)(j.Z,{columns:a,pagination:{current:Le.page,pageSize:Le.size,showSizeChanger:!0,simple:n,total:lt,showTotal:function(e,t){return"第 ".concat(t[0],"-").concat(t[1]," 条/总共 ").concat(e," 条")},pageSizeOptions:[10,20,50,100,200,500,lt||1e4].sort((function(e,t){return e-t}))},dataSource:d,rowKey:"id",size:"middle",scroll:{x:1200,y:Bt},loading:ce,rowSelection:At,rowClassName:function(e,t){return e.isPinned?"pinned-cron cron":"cron"},onChange:function(e,t,n){var i=e.current,r=e.pageSize;Me({page:i,size:r,sorter:n,filters:t}),localStorage.setItem("pageSize",String(r))},components:n||Le.size<50?void 0:Qt})]}),(0,re.jsx)(H.default,{visible:qe,handleCancel:function(){var e;e=Ne,A.W.get("".concat(L.Z.apiPrefix,"crons/").concat(e.id)).then((function(t){var n=t.code,i=t.data;if(200===n){var r=d.findIndex((function(t){return t.id===e.id})),a=o()(d);i.nextRunTime=(0,$.rS)(i.schedule,i.extra_schedules),-1!==r&&(a.splice(r,1,g()(g()({},e),i)),m(a))}})).finally((function(){return ue(!1)})),Be(!1)},cron:Ne}),(0,re.jsx)(V.default,{visible:pe,handleCancel:function(){fe(!1),Tt()},cron:be}),(0,re.jsx)(V.CronLabelModal,{visible:Ze,handleCancel:function(e){xe(!1),e&&Tt()},ids:We}),(0,re.jsx)(U.default,{visible:Qe,handleCancel:function(){Xe(!1)},cron:Je,theme:i,isPhone:n}),(0,re.jsx)(Q.default,{visible:dt,handleCancel:function(e){gt(!1),Ut()}}),(0,re.jsx)(X.default,{cronViews:Pt,visible:mt,handleCancel:function(){ht(!1)},cronViewChange:function(e){Ut()}})]})}},30352:function(e,t,n){"use strict";n.r(t);var i=n(48305),r=n.n(i),a=n(72317),o=n(75271),l=n(32890),s=n(50691),c=n(45520),u=n(93481),d=n(94978),g=n(20710),p=n(56958),f=n(44084),m=n(40276),h=n(65609),Z=n(78060),x=n.n(Z),P=n(52676);l.Z.Countdown;t.default=function(e){var t=e.cron,n=e.handleCancel,i=e.visible,l=e.data,Z=e.logUrl,v=(0,o.useState)(a.ZP.get("启动中...")),b=r()(v,2),y=b[0],w=b[1],j=(0,o.useState)(!0),k=r()(j,2),C=k[0],S=k[1],_=(0,o.useState)(!0),q=r()(_,2),B=q[0],R=q[1],I=(0,o.useState)(!1),N=r()(I,2),D=N[0],E=N[1],T=(0,o.useRef)({value:0,down:!0}),W=Z||String(null==t?void 0:t.id),O=function e(n){n&&S(!0),d.W.get(Z||"".concat(g.Z.apiPrefix,"crons/").concat(t.id,"/log")).then((function(t){var n=t.code,i=t.data;if(200===n&&localStorage.getItem("logCron")===W&&i!==y){var r=i;w(r||a.ZP.get("暂无日志"));var o=Boolean(r&&!(0,h.x$)(r)&&!r.includes("任务未运行"));o||(0,h.x$)(y)||y===a.ZP.get("启动中...")||setTimeout((function(){F()})),R(o),o&&setTimeout((function(){F(),e()}),2e3)}})).finally((function(){n&&S(!1)}))},F=function(){T.current.down&&setTimeout((function(){document.querySelector("#log-flag").scrollIntoView({behavior:"smooth"})}),600)},z=function(){localStorage.removeItem("logCron"),n()};return(0,o.useEffect)((function(){t&&t.id&&i&&(O(!0),T.current.down=!0)}),[t,i]),(0,o.useEffect)((function(){l&&w(l)}),[l]),(0,o.useEffect)((function(){E(document.body.clientWidth<768)}),[]),(0,P.jsx)(c.Z,{title:(0,P.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(B||C)&&(0,P.jsx)(p.Z,{spin:!0}),!B&&!C&&(0,P.jsx)(f.Z,{}),(0,P.jsx)(s.Z.Text,{ellipsis:!0,style:{marginLeft:5},children:t&&t.name})]}),open:i,centered:!0,className:"log-modal",forceRender:!0,onOk:function(){return z()},onCancel:function(){return z()},footer:[(0,P.jsx)(u.Z,{type:"primary",onClick:function(){return z()},children:a.ZP.get("知道了")})],children:(0,P.jsxs)("div",{onScroll:function(e){var t=e.target.scrollTop;T.current.down&&(T.current={value:t,down:t-T.current.value>-5||!t})},className:"log-container",children:[C?(0,P.jsx)(m.Z,{}):(0,P.jsx)("pre",{style:D?{fontFamily:"Source Code Pro",zoom:.83}:{},children:(0,P.jsx)(x(),{children:y})}),(0,P.jsx)("div",{id:"log-flag"})]})})}},1591:function(e,t,n){"use strict";n.r(t),n.d(t,{CronLabelModal:function(){return E},default:function(){return D}});var i=n(67825),r=n.n(i),a=n(90228),o=n.n(a),l=n(26068),s=n.n(l),c=n(87999),u=n.n(c),d=n(48305),g=n.n(d),p=n(72317),f=n(75271),m=n(72338),h=n(61508),Z=n(45520),x=n(17082),P=n(63505),v=n(93481),b=n(94978),y=n(20710),w=n(94046),j=n.n(w),k=n(15558),C=n.n(k),S=n(47667),_=n(78646),q=n(21288),B=n(52676),R=function(e){var t=e.value,n=e.onChange,i=(0,f.useState)(""),r=g()(i,2),a=r[0],o=r[1],l=(0,f.useState)(!1),s=g()(l,2),c=s[0],u=s[1],d=(0,f.useState)([]),m=g()(d,2),h=m[0],Z=m[1],P=(0,f.useRef)(),v=function(){a&&!h.includes(a)&&(Z([].concat(C()(h),[a])),null==n||n([].concat(C()(h),[a]))),u(!1),o("")},b=h.map((function(e){var t=(0,B.jsx)(S.Z,{closable:!0,onClose:function(t){var i,r;t.preventDefault(),i=e,r=h.filter((function(e){return e!==i})),Z(r),null==n||n(r)},children:e});return(0,B.jsx)("span",{style:{display:"inline-block",marginBottom:8},children:t},e)}));return(0,f.useEffect)((function(){c&&P&&P.current.focus()}),[c]),(0,f.useEffect)((function(){t&&Z(t)}),[t]),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(_.Z,{enter:{scale:.8,opacity:0,type:"from",duration:100},leave:{opacity:0,width:0,scale:0,duration:200},appear:!1,children:b}),c&&(0,B.jsx)(x.Z,{ref:P,type:"text",size:"small",style:{width:78},value:a,onChange:function(e){o(e.target.value)},onBlur:v,onPressEnter:v}),!c&&(0,B.jsxs)(S.Z,{onClick:function(){u(!0)},style:{borderStyle:"dashed",cursor:"pointer"},children:[(0,B.jsx)(q.Z,{})," ",p.ZP.get("新建")]})]})},I=n(37559),N=["key","name"],D=function(e){var t=e.cron,n=e.handleCancel,i=e.visible,a=m.Z.useForm(),l=g()(a,1)[0],c=(0,f.useState)(!1),d=g()(c,2),v=d[0],w=d[1],k=function(){var e=u()(o()().mark((function e(i){var r,a,l,c,u;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(!0),r=null!=t&&t.id?"put":"post",a=s()({},i),null!=t&&t.id&&(a.id=t.id),e.prev=4,e.next=7,b.W[r]("".concat(y.Z.apiPrefix,"crons"),a);case 7:l=e.sent,c=l.code,u=l.data,200===c&&(h.ZP.success(null!=t&&t.id?p.ZP.get("更新任务成功"):p.ZP.get("创建任务成功")),n(u)),w(!1),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),w(!1);case 17:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(t){return e.apply(this,arguments)}}();return(0,f.useEffect)((function(){l.resetFields()}),[t,i]),(0,B.jsx)(Z.Z,{title:null!=t&&t.id?p.ZP.get("编辑任务"):p.ZP.get("创建任务"),open:i,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){l.validateFields().then((function(e){k(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return n()},confirmLoading:v,children:(0,B.jsxs)(m.Z,{form:l,layout:"vertical",name:"form_in_modal",initialValues:t,children:[(0,B.jsx)(m.Z.Item,{name:"name",label:p.ZP.get("名称"),rules:[{required:!0,whitespace:!0}],children:(0,B.jsx)(x.Z,{placeholder:p.ZP.get("请输入任务名称")})}),(0,B.jsx)(m.Z.Item,{name:"command",label:p.ZP.get("命令/脚本"),rules:[{required:!0,whitespace:!0}],children:(0,B.jsx)(x.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:p.ZP.get("支持输入脚本路径/任意系统可执行命令/task 脚本路径")})}),(0,B.jsx)(m.Z.Item,{name:"schedule",label:p.ZP.get("定时规则"),rules:[{required:!0},{validator:function(e,t){return!t||j().parseExpression(t).hasNext()?Promise.resolve():Promise.reject(p.ZP.get("Cron表达式格式有误"))}}],children:(0,B.jsx)(x.Z,{placeholder:p.ZP.get("秒(可选) 分 时 天 月 周")})}),(0,B.jsx)(m.Z.List,{name:"extra_schedules",children:function(e,t,n){var i=t.add,a=t.remove,o=n.errors;return(0,B.jsxs)(B.Fragment,{children:[e.map((function(e){var t=e.key,n=e.name,i=r()(e,N);return(0,B.jsx)(m.Z.Item,{noStyle:!0,children:(0,B.jsxs)(P.Z,{className:"view-create-modal-sorts",align:"baseline",children:[(0,B.jsx)(m.Z.Item,s()(s()({},i),{},{name:[n,"schedule"],rules:[{required:!0}],children:(0,B.jsx)(x.Z,{placeholder:p.ZP.get("秒(可选) 分 时 天 月 周")})})),(0,B.jsx)(I.Z,{className:"dynamic-delete-button",onClick:function(){return a(n)}})]})},t)})),(0,B.jsx)(m.Z.Item,{children:(0,B.jsxs)("a",{onClick:function(){return i({schedule:""})},children:[(0,B.jsx)(q.Z,{}),p.ZP.get("新增定时规则")]})}),(0,B.jsx)(m.Z.ErrorList,{errors:o})]})}}),(0,B.jsx)(m.Z.Item,{name:"labels",label:p.ZP.get("标签"),children:(0,B.jsx)(R,{})}),(0,B.jsx)(m.Z.Item,{name:"task_before",label:p.ZP.get("执行前"),tooltip:p.ZP.get("运行任务前执行的命令,比如 cp/mv/python3 xxx.py/node xxx.js"),rules:[{validator:function(e,t){return t&&(t.includes(" task ")||t.startsWith("task "))?Promise.reject(p.ZP.get("不能包含 task 命令")):Promise.resolve()}}],children:(0,B.jsx)(x.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:p.ZP.get("请输入运行任务前要执行的命令,不能包含 task 命令")})}),(0,B.jsx)(m.Z.Item,{name:"task_after",label:p.ZP.get("执行后"),tooltip:p.ZP.get("运行任务后执行的命令,比如 cp/mv/python3 xxx.py/node xxx.js"),rules:[{validator:function(e,t){return t&&(t.includes(" task ")||t.startsWith("task "))?Promise.reject(p.ZP.get("不能包含 task 命令")):Promise.resolve()}}],children:(0,B.jsx)(x.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:p.ZP.get("请输入运行任务后要执行的命令,不能包含 task 命令")})})]})})},E=function(e){var t=e.ids,n=e.handleCancel,i=e.visible,r=m.Z.useForm(),a=g()(r,1)[0],l=(0,f.useState)(!1),s=g()(l,2),c=s[0],d=s[1],x=function(){var e=u()(o()().mark((function e(i){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a.validateFields().then(function(){var e=u()(o()().mark((function e(r){var a,l,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d(!0),a={ids:t,labels:r.labels},e.prev=2,e.next=5,b.W[i]("".concat(y.Z.apiPrefix,"crons/labels"),a);case 5:l=e.sent,s=l.code,l.data,200===s&&(h.ZP.success("post"===i?p.ZP.get("添加Labels成功"):p.ZP.get("删除Labels成功")),n(!0)),d(!1),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),d(!1);case 15:case"end":return e.stop()}}),e,null,[[2,12]])})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){console.log("Validate Failed:",e)}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();(0,f.useEffect)((function(){a.resetFields()}),[t,i]);var P=[(0,B.jsx)(v.Z,{onClick:function(){return n(!1)},children:p.ZP.get("取消")}),(0,B.jsx)(v.Z,{type:"primary",danger:!0,onClick:function(){return x("delete")},children:p.ZP.get("删除")}),(0,B.jsx)(v.Z,{type:"primary",onClick:function(){return x("post")},children:p.ZP.get("添加")})];return(0,B.jsx)(Z.Z,{title:p.ZP.get("批量修改标签"),open:i,footer:P,centered:!0,maskClosable:!1,forceRender:!0,onCancel:function(){return n(!1)},confirmLoading:c,children:(0,B.jsx)(m.Z,{form:a,layout:"vertical",name:"form_in_label_modal",children:(0,B.jsx)(m.Z.Item,{name:"labels",label:p.ZP.get("标签"),children:(0,B.jsx)(R,{})})})})}},38656:function(e,t,n){"use strict";n.r(t),n.d(t,{CrontabStatus:function(){return i},OperationName:function(){return r},OperationPath:function(){return a}});var i=function(e){return e[e.running=0]="running",e[e.queued=.5]="queued",e[e.idle=1]="idle",e[e.disabled=2]="disabled",e}({}),r=function(e){return e[e["启用"]=0]="启用",e[e["禁用"]=1]="禁用",e[e["运行"]=2]="运行",e[e["停止"]=3]="停止",e[e["置顶"]=4]="置顶",e[e["取消置顶"]=5]="取消置顶",e}({}),a=function(e){return e[e.enable=0]="enable",e[e.disable=1]="disable",e[e.run=2]="run",e[e.stop=3]="stop",e[e.pin=4]="pin",e[e.unpin=5]="unpin",e}({})},49065:function(e,t,n){"use strict";n.r(t);var i=n(67825),r=n.n(i),a=n(90228),o=n.n(a),l=n(26068),s=n.n(l),c=n(87999),u=n.n(c),d=n(48305),g=n.n(d),p=n(72317),f=n(75271),m=n(72338),h=n(35181),Z=n(45520),x=n(17082),P=n(93481),v=n(63505),b=n(94978),y=n(20710),w=n(37559),j=n(21288),k=n(55426),C=n(38656),S=n(31352),_=n(52676),q=["name"],B=["key","name"],R=["key","name"],I=[{name:p.ZP.get("命令"),value:"command"},{name:p.ZP.get("名称"),value:"name"},{name:p.ZP.get("定时规则"),value:"schedule"},{name:p.ZP.get("状态"),value:"status",onlySelect:!0},{name:p.ZP.get("标签"),value:"labels"},{name:p.ZP.get("订阅"),value:"sub_id",onlySelect:!0}],N={Reg:"",NotReg:"",In:"select",Nin:"select"},D=[{name:p.ZP.get("包含"),value:"Reg"},{name:p.ZP.get("不包含"),value:"NotReg"},{name:p.ZP.get("属于"),value:"In",type:"select"},{name:p.ZP.get("不属于"),value:"Nin",type:"select"}],E=[{name:p.ZP.get("顺序"),value:"ASC"},{name:p.ZP.get("倒序"),value:"DESC"}],T=function(e){return e.and="且",e.or="或",e}(T||{});t.default=function(e){var t=e.view,n=e.handleCancel,i=e.visible,a=m.Z.useForm(),l=g()(a,1)[0],c=(0,f.useState)(!1),d=g()(c,2),W=d[0],O=d[1],F=(0,f.useState)("and"),z=g()(F,2),L=z[0],M=z[1],A=m.Z.useWatch("filters",l),V=(0,S.Z)((function(){return b.W.get("".concat(y.Z.apiPrefix,"subscriptions"))}),{cacheKey:"subscriptions"}).data,H={status:[{name:p.ZP.get("运行中"),value:C.CrontabStatus.running},{name:p.ZP.get("空闲中"),value:C.CrontabStatus.idle},{name:p.ZP.get("已禁用"),value:C.CrontabStatus.disabled}],sub_id:null==V?void 0:V.data.map((function(e){return{name:e.name,value:e.id}}))},U=function(){var e=u()(o()().mark((function e(i){var r,a,l,c;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return O(!0),i.filterRelation=L,r=t?"put":"post",e.prev=3,e.next=6,b.W[r]("".concat(y.Z.apiPrefix,"crons/views"),t?s()(s()({},i),{},{id:t.id}):i);case 6:a=e.sent,l=a.code,c=a.data,200===l&&n(c),O(!1),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(3),O(!1);case 16:case"end":return e.stop()}}),e,null,[[3,13]])})));return function(t){return e.apply(this,arguments)}}();(0,f.useEffect)((function(){t||l.resetFields(),l.setFieldsValue(t||{filters:[{property:"command"}]})}),[t,i]);var Y=function(e){var t=e.name,n=r()(e,q),i=l.getFieldValue(["filters",t,"property"]);return(0,_.jsx)(h.Z,s()(s()({style:{width:120},placeholder:p.ZP.get("请选择操作符")},n),{},{children:D.filter((function(e){return H[i]?"select"===e.type:e})).map((function(e){return(0,_.jsx)(h.Z.Option,{value:e.value,children:e.name},e.name)}))}))},K=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,_.jsx)(h.Z,{style:t,children:e.map((function(e){return(0,_.jsx)(h.Z.Option,{value:e.value,children:e.name},e.name)}))})},Q=(0,_.jsx)(h.Z,{style:{width:80},children:E.map((function(e){return(0,_.jsx)(h.Z.Option,{value:e.value,children:e.name},e.name)}))});return(0,_.jsx)(Z.Z,{title:t?p.ZP.get("编辑视图"):p.ZP.get("创建视图"),open:i,forceRender:!0,width:580,centered:!0,maskClosable:!1,onOk:function(){l.validateFields().then((function(e){U(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return n()},confirmLoading:W,children:(0,_.jsxs)(m.Z,{form:l,layout:"vertical",name:"env_modal",children:[(0,_.jsx)(m.Z.Item,{name:"name",label:p.ZP.get("视图名称"),rules:[{required:!0,message:p.ZP.get("请输入视图名称")}],children:(0,_.jsx)(x.Z,{placeholder:p.ZP.get("请输入视图名称")})}),(0,_.jsx)(m.Z.List,{name:"filters",children:function(e,t,n){var i=t.add,a=t.remove,o=n.errors;return(0,_.jsxs)("div",{style:{position:"relative"},className:"view-filters-container ".concat(e.length>1?"active":""),children:[e.length>1&&(0,_.jsx)("div",{style:{position:"absolute",width:50,borderRadius:10,border:"1px solid rgb(190, 220, 255)",borderRight:"none",height:56*(e.length-1),top:46,left:15},children:(0,_.jsx)(P.Z,{type:"primary",size:"small",style:{position:"absolute",top:"50%",translate:"-50% -50%",padding:"0 3px",cursor:"pointer"},onClick:function(){M("and"===L?"or":"and")},children:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("span",{children:T[L]}),(0,_.jsx)(k.Z,{type:"ql-icon-d-caret"})]})})}),(0,_.jsxs)("div",{children:[e.map((function(e){var t,n,i=e.key,o=e.name,l=r()(e,B);return(0,_.jsx)(m.Z.Item,{label:0===o?p.ZP.get("筛选条件"):"",style:{marginBottom:0},required:!0,className:"filter-item",children:(0,_.jsxs)(v.Z,{className:"view-create-modal-filters",align:"baseline",children:[(0,_.jsx)(m.Z.Item,s()(s()({},l),{},{name:[o,"property"],rules:[{required:!0}],children:K(I,{width:120})})),(0,_.jsx)(m.Z.Item,s()(s()({},l),{},{name:[o,"operation"],rules:[{required:!0,message:p.ZP.get("请选择操作符")}],children:(0,_.jsx)(Y,{name:o})})),(0,_.jsx)(m.Z.Item,s()(s()({},l),{},{name:[o,"value"],rules:[{required:!0,message:p.ZP.get("请输入内容")}],children:"select"===N[null==A?void 0:A[o].operation]?(t=null==A?void 0:A[o].property,(0,_.jsx)(h.Z,{mode:"tags",allowClear:!0,placeholder:p.ZP.get("输入后回车增加自定义选项"),children:null===(n=H[t])||void 0===n?void 0:n.map((function(e){return(0,_.jsx)(h.Z.Option,{value:e.value,children:e.name},e.name)}))})):(0,_.jsx)(x.Z,{placeholder:p.ZP.get("请输入内容")})})),0!==o&&(0,_.jsx)(w.Z,{onClick:function(){return a(o)}})]})},i)})),(0,_.jsx)(m.Z.Item,{children:(0,_.jsxs)("a",{onClick:function(){return i({property:"command",operation:"Reg"})},children:[(0,_.jsx)(j.Z,{}),p.ZP.get("新增筛选条件")]})}),(0,_.jsx)(m.Z.ErrorList,{errors:o})]})]})}}),(0,_.jsx)(m.Z.List,{name:"sorts",children:function(e,t,n){var i=t.add,a=t.remove,o=n.errors;return(0,_.jsxs)("div",{style:{position:"relative"},className:"view-filters-container ".concat(e.length>1?"active":""),children:[e.length>1&&(0,_.jsx)("div",{style:{position:"absolute",width:50,borderRadius:10,border:"1px solid rgb(190, 220, 255)",borderRight:"none",height:56*(e.length-1),top:46,left:15},children:(0,_.jsx)(P.Z,{type:"primary",size:"small",style:{position:"absolute",top:"50%",translate:"-50% -50%",padding:"0 3px",cursor:"pointer"},children:(0,_.jsx)(_.Fragment,{children:(0,_.jsx)("span",{children:T[L]})})})}),(0,_.jsxs)("div",{children:[e.map((function(e){var t=e.key,n=e.name,i=r()(e,R);return(0,_.jsx)(m.Z.Item,{label:0===n?p.ZP.get("排序方式"):"",style:{marginBottom:0},className:"filter-item",children:(0,_.jsxs)(v.Z,{className:"view-create-modal-sorts",align:"baseline",children:[(0,_.jsx)(m.Z.Item,s()(s()({},i),{},{name:[n,"property"],rules:[{required:!0}],children:K(I)})),(0,_.jsx)(m.Z.Item,s()(s()({},i),{},{name:[n,"type"],rules:[{required:!0}],children:Q})),(0,_.jsx)(w.Z,{onClick:function(){return a(n)}})]})},t)})),(0,_.jsx)(m.Z.Item,{children:(0,_.jsxs)("a",{onClick:function(){return i({property:"command",type:"ASC"})},children:[(0,_.jsx)(j.Z,{}),p.ZP.get("新增排序方式")]})}),(0,_.jsx)(m.Z.ErrorList,{errors:o})]})]})}})]})})}},29453:function(e,t,n){"use strict";n.r(t);var i=n(15558),r=n.n(i),a=n(26068),o=n.n(a),l=n(48305),s=n.n(l),c=n(67825),u=n.n(c),d=n(72317),g=n(75271),p=n(50691),f=n(9171),m=n(63505),h=n(45520),Z=n(61508),x=n(93481),P=n(10948),v=n(94978),b=n(20710),y=n(28423),w=n(88939),j=n(83559),k=n(13103),C=n(90951),S=n(4690),_=n(49065),q=n(52676),B=["index","moveRow","className","style"],R=p.Z.Text,I="DragableBodyRow",N=function(e){var t=e.index,n=e.moveRow,i=e.className,r=e.style,a=u()(e,B),l=(0,g.useRef)(),c=(0,j.L)({accept:I,collect:function(e){var n=(e.getItem()||{}).index;return n===t?{}:{isOver:e.isOver(),dropClassName:n<t?" drop-over-downward":" drop-over-upward"}},drop:function(e){n(e.index,t)}}),d=s()(c,2),p=d[0],f=p.isOver,m=p.dropClassName,h=d[1],Z=(0,k.c)({type:I,item:{index:t},collect:function(e){return{isDragging:e.isDragging()}}});return h((0,s()(Z,2)[1])(l)),(0,q.jsx)("tr",o()({ref:l,className:"".concat(i).concat(f?m:""),style:o()({cursor:"move"},r)},a))};t.default=function(e){var t=e.cronViews,n=e.handleCancel,i=e.visible,a=e.cronViewChange,l=function(e){return j.filter((function(e){return!e.isDisabled})).length<=1&&!e.isDisabled},c=[{title:d.ZP.get("名称"),dataIndex:"name",key:"name",render:function(e){return"全部任务"===e?d.ZP.get("全部任务"):e}},{title:d.ZP.get("类型"),dataIndex:"type",key:"type",render:function(e){return 1===e?d.ZP.get("系统"):d.ZP.get("个人")}},{title:d.ZP.get("显示"),key:"isDisabled",dataIndex:"isDisabled",width:100,render:function(e,t,n){return(0,q.jsx)(f.Z,{disabled:l(t),checked:!t.isDisabled,onChange:function(e){return M(e,t,n)}})}},{title:d.ZP.get("操作"),key:"action",width:100,render:function(e,t,n){return 1!==t.type?(0,q.jsxs)(m.Z,{size:"middle",children:[(0,q.jsx)("a",{onClick:function(){return z(t,n)},children:(0,q.jsx)(y.Z,{})}),!l(t)&&(0,q.jsx)("a",{onClick:function(){return L(t,n)},children:(0,q.jsx)(w.Z,{})})]}):"-"}}],u=(0,g.useState)([]),p=s()(u,2),j=p[0],k=p[1],B=(0,g.useState)(!1),I=s()(B,2),D=I[0],E=I[1],T=(0,g.useState)(null),W=s()(T,2),O=W[0],F=W[1],z=function(e,t){F(e),E(!0)},L=function(e,t){h.Z.confirm({title:d.ZP.get("确认删除"),content:(0,q.jsxs)(q.Fragment,{children:[d.ZP.get("确认删除视图")," ",(0,q.jsx)(R,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",d.ZP.get("吗")]}),onOk:function(){v.W.delete("".concat(b.Z.apiPrefix,"crons/views"),{data:[e.id]}).then((function(e){var t=e.code;e.data;200===t&&(Z.ZP.success(d.ZP.get("删除成功")),a())}))},onCancel:function(){console.log("Cancel")}})},M=function(e,t,n){v.W.put("".concat(b.Z.apiPrefix,"crons/views/").concat(e?"enable":"disable"),[t.id]).then((function(t){var i=t.code;t.data;if(200===i){var l=r()(j);l.splice(n,1,o()(o()({},j[n]),{},{isDisabled:!e})),k(l),a()}}))},A={body:{row:N}},V=(0,g.useCallback)((function(e,t){if(e!==t){var n=j[e];v.W.put("".concat(b.Z.apiPrefix,"crons/views/move"),{fromIndex:e,toIndex:t,id:n.id}).then((function(i){var l=i.code,s=i.data;if(200===l){var c=r()(j);c.splice(e,1),c.splice(t,0,o()(o()({},n),s)),k(c),a()}}))}}),[j]);return(0,g.useEffect)((function(){k(t)}),[t]),(0,q.jsxs)(h.Z,{title:d.ZP.get("视图管理"),open:i,centered:!0,width:620,onCancel:function(){return n()},className:"view-manage-modal",forceRender:!0,footer:!1,maskClosable:!1,children:[(0,q.jsx)(m.Z,{style:{display:"flex",justifyContent:"flex-end",marginBottom:10},children:(0,q.jsx)(x.Z,{type:"primary",onClick:function(){F(null),E(!0)},children:d.ZP.get("创建视图")},"2")}),(0,q.jsx)(C.W,{backend:S.PD,children:(0,q.jsx)(P.Z,{bordered:!0,columns:c,pagination:!1,dataSource:j,rowKey:"id",size:"middle",style:{marginBottom:20},components:A,onRow:function(e,t){return{index:t,moveRow:V}}})}),(0,q.jsx)(_.default,{view:O,visible:D,handleCancel:function(e){E(!1),a(e)}})]})}},20710:function(e,t,n){"use strict";var i=n(72317),r=window.__ENV__QlBaseUrl||"/";t.Z={siteName:i.ZP.get("青龙"),baseUrl:r,apiPrefix:"".concat(r,"api/"),authKey:"token",layouts:[{name:"primary",include:[/.*/],exclude:[/(\/(en|zh))*\/login/]}],i18n:{languages:[{key:"pt-br",title:"Português",flag:"/portugal.svg"},{key:"en",title:"English",flag:"/america.svg"},{key:"zh",title:i.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:i.ZP.get("定时任务"),value:"crons"},{name:i.ZP.get("环境变量"),value:"envs"},{name:i.ZP.get("订阅管理"),value:"subscriptions"},{name:i.ZP.get("配置文件"),value:"configs"},{name:i.ZP.get("脚本管理"),value:"scripts"},{name:i.ZP.get("日志管理"),value:"logs"},{name:i.ZP.get("依赖管理"),value:"dependencies"},{name:i.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:i.ZP.get("定时任务"),envs:i.ZP.get("环境变量"),subscriptions:i.ZP.get("订阅管理"),configs:i.ZP.get("配置文件"),scripts:i.ZP.get("脚本管理"),logs:i.ZP.get("日志管理"),dependencies:i.ZP.get("依赖管理"),system:i.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"ntfy",label:"Ntfy"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:i.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:i.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:i.ZP.get("钉钉机器人")},{value:"weWorkBot",label:i.ZP.get("企业微信机器人")},{value:"weWorkApp",label:i.ZP.get("企业微信应用")},{value:"aibotk",label:i.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"wePlusBot",label:i.ZP.get("微加机器人")},{value:"wxPusherBot",label:"wxPusher"},{value:"chat",label:i.ZP.get("群晖chat")},{value:"email",label:i.ZP.get("邮箱")},{value:"lark",label:i.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:i.ZP.get("自定义通知")},{value:"closed",label:i.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:i.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:i.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:i.ZP.get("推送消息的优先级")}],ntfy:[{label:"ntfyUrl",tip:i.ZP.get("ntfy的url地址,例如 https://ntfy.sh"),required:!0},{label:"ntfyTopic",tip:i.ZP.get("ntfy的消息应用topic"),required:!0},{label:"ntfyPriority",tip:i.ZP.get("推送消息的优先级")}],chat:[{label:"chatUrl",tip:i.ZP.get("chat的url地址"),required:!0},{label:"chatToken",tip:i.ZP.get("chat的token码"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:i.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:i.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:i.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:i.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:i.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:i.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:i.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:i.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:i.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:i.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:i.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:i.ZP.get("BARK推送消息的跳转URL")},{label:"barkArchive",tip:i.ZP.get("BARK是否保存推送消息")}],telegramBot:[{label:"telegramBotToken",tip:i.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:i.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:i.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:i.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:i.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:i.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:i.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:i.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:i.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:i.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:i.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:i.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:i.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:i.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:i.ZP.get("请输入要发送的目标"),items:[{value:"room",label:i.ZP.get("群聊")},{value:"contact",label:i.ZP.get("好友")}]},{label:"aibotkName",tip:i.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:i.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:i.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:i.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:i.ZP.get("发送模板")},{label:"pushplusChannel",tip:i.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:i.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:i.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:i.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:i.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:i.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:i.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:i.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:i.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:i.ZP.get("wxPusherBot的uids"),required:!1}],lark:[{label:"larkKey",tip:i.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:i.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json"),required:!0},{label:"emailUser",tip:i.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:i.ZP.get("SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定"),required:!0}],pushMe:[{label:"pushMeKey",tip:i.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0},{label:"pushMeUrl",tip:i.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],chronocat:[{label:"chronocatURL",tip:i.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:i.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:i.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:i.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:i.ZP.get("请求头Content-Type"),required:!0,items:[{value:"text/plain"},{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:i.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:i.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:i.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":i.ZP.get("登录"),"/initialization":i.ZP.get("初始化"),"/crontab":i.ZP.get("定时任务"),"/env":i.ZP.get("环境变量"),"/subscription":i.ZP.get("订阅管理"),"/config":i.ZP.get("配置文件"),"/script":i.ZP.get("脚本管理"),"/diff":i.ZP.get("对比工具"),"/log":i.ZP.get("日志管理"),"/setting":i.ZP.get("系统设置"),"/error":i.ZP.get("错误日志"),"/dependence":i.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},68601:function(e,t,n){"use strict";function i(e){var t=1e3*e,n=Math.floor(t/864e5),i=t%864e5,r=Math.floor(i/36e5),a=i%36e5,o=Math.floor(a/6e4),l=a%6e4,s=Math.round(l/1e3)+"秒";return o>0&&(s=o+"分"+s),r>0&&(s=r+"小时"+s),n>0&&(s=n+"天"+s),s}n.d(t,{E:function(){return i}})},94978:function(e,t,n){"use strict";n.d(t,{W:function(){return m}});var i=n(90228),r=n.n(i),a=n(87999),o=n.n(a),l=n(72317),s=n(61508),c=n(20710),u=n(31038),d=n(74799);s.ZP.config({duration:2});var g=Date.now(),p=d.Z.create({timeout:6e4,params:{t:g}}),f=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];p.interceptors.request.use((function(e){var t=localStorage.getItem(c.Z.authKey);return t&&!f.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),p.interceptors.response.use(function(){var e=o()(r()().mark((function e(t){var n,i,a;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.status,![502,504].includes(n)){e.next=5;break}u.history.push("/error"),e.next=18;break;case 5:if(401!==n){e.next=9;break}"/login"!==u.history.location.pathname&&(localStorage.removeItem(c.Z.authKey),u.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(i=t.data).code&&(a=i.message||i.data)&&s.ZP.error({content:a,style:{maxWidth:500,margin:"0 auto"}}),e.abrupt("return",i);case 15:e.prev=15,e.t0=e.catch(9);case 17:case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e,null,[[9,15]])})));return function(t){return e.apply(this,arguments)}}(),(function(e){if(e.response){var t=e.response.data?e.response.data.message||e.message||e.response.data:e.response.statusText,n=e.response.status;if([502,504].includes(n))u.history.push("/error");else if(401===n)"/login"!==u.history.location.pathname&&(s.ZP.error(l.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(c.Z.authKey),u.history.push("/login"));else{var i,r;if("function"==typeof(null===(i=e.config)||void 0===i?void 0:i.onError))return null===(r=e.config)||void 0===r?void 0:r.onError(e.response);s.ZP.error({content:t,style:{maxWidth:500,margin:"0 auto"}})}}else console.log(e.message);return Promise.reject(e)}));var m=p},65609:function(e,t,n){"use strict";n.d(t,{ZP:function(){return c},I1:function(){return g},o4:function(){return P},w7:function(){return d},DY:function(){return p},FA:function(){return m},rS:function(){return Z},H$:function(){return x},W9:function(){return u},x$:function(){return f}});var i=n(15558),r=n.n(i),a=n(72317),o={".py":"python",".js":"javascript",".mjs":"javascript",".sh":"shell",".ts":"typescript",".ini":"ini",".json":"json"},l=n(94046),s=n.n(l);function c(){var e=navigator.userAgent.toLowerCase(),t=function(t){return t.test(e)},n=function(t){return(e.match(t)||[]).toString().replace(/[^0-9|_.]/g,"").replace(/_/g,".")},i="unknow";t(/windows|win32|win64|wow32|wow64/g)?i="windows":t(/macintosh|macintel/g)?i="macos":t(/x11/g)?i="linux":t(/android|adr/g)?i="android":t(/ios|iphone|ipad|ipod|iwatch/g)&&(i="ios");var r="unknow";"windows"===i?t(/windows nt 5.0|windows 2000/g)?r="2000":t(/windows nt 5.1|windows xp/g)?r="xp":t(/windows nt 5.2|windows 2003/g)?r="2003":t(/windows nt 6.0|windows vista/g)?r="vista":t(/windows nt 6.1|windows 7/g)?r="7":t(/windows nt 6.2|windows 8/g)?r="8":t(/windows nt 6.3|windows 8.1/g)?r="8.1":t(/windows nt 10.0|windows 10/g)&&(r="10"):"macos"===i?r=n(/os x [\d._]+/g):"android"===i?r=n(/android [\d._]+/g):"ios"===i&&(r=n(/os [\d._]+/g));var a="unknow";"windows"===i||"macos"===i||"linux"===i?a="desktop":("android"===i||"ios"===i||t(/mobile/g))&&(a="mobile");var o="unknow",l="unknow";t(/applewebkit/g)?(o="webkit",t(/edge/g)?l="edge":t(/opr/g)?l="opera":t(/chrome/g)?l="chrome":t(/safari/g)&&(l="safari")):t(/gecko/g)&&t(/firefox/g)?(o="gecko",l="firefox"):t(/presto/g)?(o="presto",l="opera"):t(/trident|compatible|msie/g)&&(o="trident",l="iexplore");var s="unknow";"webkit"===o?s=n(/applewebkit\/[\d._]+/g):"gecko"===o?s=n(/gecko\/[\d._]+/g):"presto"===o?s=n(/presto\/[\d._]+/g):"trident"===o&&(s=n(/trident\/[\d._]+/g));var c="unknow";"chrome"===l?c=n(/chrome\/[\d._]+/g):"safari"===l?c=n(/version\/[\d._]+/g):"firefox"===l?c=n(/firefox\/[\d._]+/g):"opera"===l?c=n(/opr\/[\d._]+/g):"iexplore"===l?c=n(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===l&&(c=n(/edge\/[\d._]+/g));var u="none",d="unknow";t(/micromessenger/g)?(u="wechat",d=n(/micromessenger\/[\d._]+/g)):t(/qqbrowser/g)?(u="qq",d=n(/qqbrowser\/[\d._]+/g)):t(/ucbrowser/g)?(u="uc",d=n(/ucbrowser\/[\d._]+/g)):t(/qihu 360se/g)?u="360":t(/2345explorer/g)?(u="2345",d=n(/2345explorer\/[\d._]+/g)):t(/metasr/g)?u="sougou":t(/lbbrowser/g)?u="liebao":t(/maxthon/g)&&(u="maxthon",d=n(/maxthon\/[\d._]+/g));var g=Object.assign({engine:o,engineVs:s,platform:a,supporter:l,supporterVs:c,system:i,systemVs:r},"none"===u?{}:{shell:u,shellVs:d});return console.log("%c\n .d88b. d888888b d8b db d888b db .d88b. d8b db d888b \n.8P Y8. `88' 888o 88 88' Y8b 88 .8P Y8. 888o 88 88' Y8b \n88 88 88 88V8o 88 88 88 88 88 88V8o 88 88 \n88 88 88 88 V8o88 88 ooo 88 88 88 88 V8o88 88 ooo \n`8P d8' .88. 88 V888 88. ~8~ 88booo. `8b d8' 88 V888 88. ~8~ \n `Y88'Y8 Y888888P VP V8P Y888P Y88888P `Y88P' VP V8P Y888P \n \n \n","color: blue;font-size: 14px;"),console.log("%c忘形雨笠烟蓑,知心牧唱樵歌。明月清风共我,闲人三个,从他今古消磨。\n","color: yellow;font-size: 18px;"),console.log("%c青龙运行环境:\n\n系统:".concat(g.system,"/").concat(g.systemVs,"\n浏览器:").concat(g.supporter,"/").concat(g.supporterVs,"\n内核:").concat(g.engine,"/").concat(g.engineVs),"color: green;font-size: 14px;font-weight: bold;"),g}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.extraHeight,n=e.target;void 0===t&&(t=99);var i=null,r=0;(i=n||document.querySelector(".ant-table-wrapper"))&&(r=i.getBoundingClientRect().top);var a=document.body.clientHeight-r-t;return a}function d(e,t){var n,i,r=window.URL||window.webkitURL||window,a=new Blob([t]),o=document.createElementNS("http://www.w3.org/1999/xhtml","a");o.href=r.createObjectURL(a),o.download=e,n=o,(i=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(i)}function g(e,t,n){var i=r()(e),a=[];return function e(i){if(i)for(var r=0;r<(null==i?void 0:i.length);r++){if(t(i[r]))return n?void(i[r].children?i[r].children.unshift(n):i[r].children=[n]):void i.splice(r,1);i[r].children&&(a.push(i[r].key),e(i[r].children))}}(i),i}function p(e,t){var n;return function e(i){if(i)for(var r=0;r<(null==i?void 0:i.length);r++)t(i[r])?n=i[r]:i[r].children&&e(i[r].children)}(r()(e)),n}function f(e){return[" ",a.ZP.get("执行结束")].some((function(t){return e.includes(t)}))}function m(e){var t=e.split(" ");if("repo"===t[1]||"raw"===t[1])return t[2];var n=t.find((function(e){return[".js",".ts",".sh",".py"].some((function(t){return e.endsWith(t)}))}));if(n){var i,r,a="".concat(window.__ENV__QL_DIR,"/data/scripts");n.startsWith(a)&&(n=n.replace(a,""));var o=n.lastIndexOf("/");return o>=0?(r=n.slice(o+1),i=n.slice(0,o)):(r=n,i=""),[r,i]}}function h(e){try{var t=s().parseExpression(e);if(t)return t.next().toDate()}catch(e){}return null}function Z(e,t){var n=h(e);return null!=t&&t.length&&t.forEach((function(e){var t=h(e.schedule);t&&(!n||t<n)&&(n=t)})),n}function x(e){var t=function(e){if(!e)return"";var t=e.split(".");return".".concat(t[t.length-1])}(e);return o[t]}function P(){var e=document.createElement("div");e.style.position="fixed",e.style.top="0px",e.style.left="0px",e.style.width="100%",e.style.height="100%",e.style.backgroundColor="transparent",e.style.zIndex="9999",document.body.appendChild(e),e.addEventListener("click",(function(e){e.stopPropagation(),e.preventDefault()})),document.body.style.overflow="hidden"}},50810:function(){}}]);
|