From cbbf3ba0ba3504d3f52cddcf4f177bacbda5f41b Mon Sep 17 00:00:00 2001 From: Li4n0 <34324462+Li4n0@users.noreply.github.com> Date: Tue, 25 May 2021 20:41:37 +0800 Subject: [PATCH] release 0.1.3-beta (#19) Co-authored-by: E99p1ant --- LICENSE | 201 ++++++++++++++++++++++ README.md | 244 ++++++++++++++++++++++++++- frontend/dist/css/app.css | 2 +- frontend/dist/css/chunk-016c45cf.css | 1 + frontend/dist/css/chunk-0cb5e9e6.css | 1 + frontend/dist/css/chunk-247d6284.css | 1 + frontend/dist/css/chunk-36391b77.css | 1 - frontend/dist/css/chunk-42105840.css | 1 - frontend/dist/css/chunk-43748c28.css | 1 + frontend/dist/css/chunk-49fbda44.css | 1 + frontend/dist/css/chunk-65a35ecf.css | 1 - frontend/dist/css/chunk-7bcb83e6.css | 1 - frontend/dist/css/chunk-b8f538aa.css | 1 - frontend/dist/index.html | 2 +- frontend/dist/js/app.js | 2 +- frontend/dist/js/chunk-016c45cf.js | 1 + frontend/dist/js/chunk-0cb5e9e6.js | 1 + frontend/dist/js/chunk-1da7f23b.js | 2 +- frontend/dist/js/chunk-247d6284.js | 1 + frontend/dist/js/chunk-330a7e95.js | 2 +- frontend/dist/js/chunk-36391b77.js | 1 - frontend/dist/js/chunk-3d13e56e.js | 2 +- frontend/dist/js/chunk-42105840.js | 1 - frontend/dist/js/chunk-43748c28.js | 1 + frontend/dist/js/chunk-49fbda44.js | 1 + frontend/dist/js/chunk-65a35ecf.js | 1 - frontend/dist/js/chunk-7bcb83e6.js | 1 - frontend/dist/js/chunk-b8f538aa.js | 1 - frontend/dist/js/chunk-e039e75a.js | 2 +- frontend/dist/js/chunk-fef965c2.js | 2 +- frontend/src/App.vue | 5 +- frontend/src/views/logs/Dns.vue | 12 +- frontend/src/views/logs/Ftp.vue | 12 +- frontend/src/views/logs/Http.vue | 18 +- frontend/src/views/logs/Mysql.vue | 21 ++- frontend/src/views/logs/Rmi.vue | 14 +- frontend/src/views/rules/Dns.vue | 16 +- frontend/src/views/rules/Ftp.vue | 16 +- frontend/src/views/rules/Http.vue | 14 +- frontend/src/views/rules/Mysql.vue | 3 +- frontend/src/views/rules/Rmi.vue | 17 +- images/create_rule.png | Bin 0 -> 67805 bytes images/do_request.png | Bin 0 -> 32111 bytes images/evil_dtd_rule.png | Bin 0 -> 36606 bytes images/ftp-scan.gif | Bin 0 -> 1773299 bytes images/ftp_scan_rule.png | Bin 0 -> 26254 bytes images/http_log.png | Bin 0 -> 52382 bytes images/sse.gif | Bin 0 -> 916638 bytes images/xxe.png | Bin 0 -> 138034 bytes internal/newdns/.travis.yml | 12 -- internal/newdns/Makefile | 10 -- internal/record/record.go | 2 +- pkg/dns/dns.go | 4 +- pkg/dns/rule.go | 4 +- pkg/ftp/ftp.go | 11 +- pkg/ftp/rule.go | 4 +- pkg/mysql/mysql.go | 8 +- pkg/mysql/record.go | 7 +- pkg/mysql/rule.go | 4 +- pkg/rhttp/http.go | 15 +- pkg/rhttp/record.go | 8 +- pkg/rhttp/rule.go | 4 +- pkg/rmi/rmi.go | 4 +- pkg/rmi/rule.go | 4 +- pkg/server/controller.go | 18 +- pkg/server/router.go | 4 +- pkg/server/server.go | 43 ++++- pkg/server/settings.go | 42 +++-- 68 files changed, 640 insertions(+), 197 deletions(-) create mode 100644 LICENSE create mode 100644 frontend/dist/css/chunk-016c45cf.css create mode 100644 frontend/dist/css/chunk-0cb5e9e6.css create mode 100644 frontend/dist/css/chunk-247d6284.css delete mode 100644 frontend/dist/css/chunk-36391b77.css delete mode 100644 frontend/dist/css/chunk-42105840.css create mode 100644 frontend/dist/css/chunk-43748c28.css create mode 100644 frontend/dist/css/chunk-49fbda44.css delete mode 100644 frontend/dist/css/chunk-65a35ecf.css delete mode 100644 frontend/dist/css/chunk-7bcb83e6.css delete mode 100644 frontend/dist/css/chunk-b8f538aa.css create mode 100644 frontend/dist/js/chunk-016c45cf.js create mode 100644 frontend/dist/js/chunk-0cb5e9e6.js create mode 100644 frontend/dist/js/chunk-247d6284.js delete mode 100644 frontend/dist/js/chunk-36391b77.js delete mode 100644 frontend/dist/js/chunk-42105840.js create mode 100644 frontend/dist/js/chunk-43748c28.js create mode 100644 frontend/dist/js/chunk-49fbda44.js delete mode 100644 frontend/dist/js/chunk-65a35ecf.js delete mode 100644 frontend/dist/js/chunk-7bcb83e6.js delete mode 100644 frontend/dist/js/chunk-b8f538aa.js create mode 100644 images/create_rule.png create mode 100644 images/do_request.png create mode 100644 images/evil_dtd_rule.png create mode 100644 images/ftp-scan.gif create mode 100644 images/ftp_scan_rule.png create mode 100644 images/http_log.png create mode 100644 images/sse.gif create mode 100644 images/xxe.png delete mode 100644 internal/newdns/.travis.yml delete mode 100644 internal/newdns/Makefile diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..53435d0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2021 Li4n0 + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index 917dfb4..c94e268 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,244 @@ -# RevSuit - A Reverse Platform Developed in Golang +# RevSuit - A Flexible and Powerful Reverse Connection Platform ## Overview -RevSuit is an open-sourced Reverse Platform designed for receive connection from target host in bug bounty. \ No newline at end of file + +RevSuit is a flexible and powerful reverse connection platform designed for receiving connection from target host in +penetration. It currently supports HTTP, DNS, RMI, MySQL and FTP protocols. + +Flexible: + +1. Revsuit can set flexible rules to capture different connections. +2. Deploy and run via binaries without worrying about nasty dependency errors. + +Powerful: + +1. Revsuit allows users to customize the response for different connections through rules and supports dynamic response + generation using template variables. +2. Support a variety of protocols, and support the in-depth utilization of some protocols, such as DNS rebinding, MySQL + Load Local Data, JDBC Deserialize Exploit, FTP Passive Mode SSRF, etc. +3. Native support for use with scanners. +4. Support push notifications to popular office software. +5. Other thoughtful and detailed features. + +## Basic Usage + +### Preparation + +Download the latest release firstly. + +RevSuit will generate default configuration file on first run. Modify the configuration file according to your needs, +then re-run. + +To confirm the location of the connection IP, if there is no qqwry.dat in the current directory or its modification time +is more than 5 days ago. RevSuit will download it.(Support for GeoIP is in the planning stages). + +```bash +$ ./revsuit +2021/05/16 22:55:10 [ INFO] Downloading qqwry.dat... + + ____ _____ _ __ + / __ \___ _ __/ ___/__ __(_) /_ + / /_/ / _ \ | / /\__ \/ / / / / __/ + / _, _/ __/ |/ /___/ / /_/ / / /_ +/_/ |_|\___/|___//____/\__,_/_/\__/ + vBeta0.1 + https://revsuit.pro +2021/05/16 22:55:22 [ INFO] Starting HTTP Server at :80, token:your_token +2021/05/16 22:55:22 [ INFO] Start to listen FTP PASV port at :2020, PasvIP is 10.9.8.7 +2021/05/16 22:55:22 [ INFO] Starting FTP Server at :21 +2021/05/16 22:55:22 [ INFO] Starting MySQL Server at :3306 +2021/05/16 22:55:22 [ INFO] Starting RMI Server at :1099 +2021/05/16 22:55:22 [ INFO] Starting DNS Server at :53 +``` + +After running, you can visit the `/revsuit/admin/` path of HTTP Server and enter the token to access the control panel. + +### Create Rules and Receive Connection + +Take the creation of HTTP rules as an example: + +A few notes are as follows: + +1. The `name` and `flagFormat` of rule are unique. +2. `FlagFormat` uses regular expression syntax, and for different protocols, the fields matched by flagFormat are + different, you can check the corresponding hints to get details when creating rules. +3. Rules with high rank will take effect first. +4. For different protocol rules, you can make different custom configurations, and for some protocols, template + variables can be used. +5. You can set the named grouping of regular expressions in `flagFormat`, and the result of the matching grouping will + also be used as a template variable. + +As shown below, we create a rule that uses the built-in template variables and custom template variables of the http +protocol, and names it `test_create_rule`: + +![img.png](./images/create_rule.png) + +Then make a request that satisfies the rule and view the response. + +![img.png](./images/do_request.png) + +The request will be logged on the platform at the same time. + +![img.png](./images/http_log.png) + +### Notice + +If you want to be notified of new connections on your office software, you can configure the webhook address of the +relevant software in the configuration file and turn on the `Notice` switch for the corresponding rule. Only support to +four software types currently: dingtalk,wechat,lark,slack.(Discord and telegram support is in the plan.) + +### Import/Export Rules + +If you're migrating platforms or purging data, it can be a hassle to recreate rules. That's why the platform supports +import and export of rules. + +The entry point for this function is located at `Settings>RULES`. + +The rules are stored in yaml format for import and export, like the following: + +```yaml +http: + - name: test_create_rule + flag_format: (?P\w+)\? + rank: 0 + push_to_client: false + notice: false + response_status_code: "302" + response_headers: + Location: ${query.url} + response_body: ${header.say} ${what} + - name: other_rule + flag_format: other + rank: 1 + push_to_client: false + notice: true + response_status_code: "200" + response_headers: { } + response_body: Hello Revsuit! +dns: + ... ... +``` + +## Advance Usage + +### Use with Scanner + +RevSuit was split from my scanner project, so its native support works with scanners. + +From RevSuit's perspective, we call a scanner a client. + +#### Create Connection + +RevSuit +uses [HTTP Server-sent Events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events) +(SSE) to establish a one-way communication channel with the client. + +The API for the channel is: `/revsuit/api/events?message` .The client first needs to add the `Token: your token` header +to the Header, and then access the API to establish the channel. When the platform receives a new connection, the `flag` +captured by the rule will be passed to the client through this channel. +![img.png](./images/sse.gif) + +Here is a [simple demo](https://gist.github.com/Li4n0/21aa0bec2d626114a729ca2677efb05a) using Golang's sse library as an +example. + +#### Multi-client + +RevSuit supports multiple clients, and each client in the connected state receives a push of `flag`, so distributed +scanning can be supported. + +#### Temporary storage queue + +RevSuit will store `flag` temporarily in the queue when there is no client connection and send it when the client +connects, so you don't have to worry about missing the vulnerability because the client disconnects. (This is especially +helpful for discovering delay-triggered vulnerabilities.) + +#### Use flagGroup + +`FlagGroup` is the content matched by the anonymous group in the `flagFormat` field of the rule. The platform will check +the content matched in the grouping,and the flag is only pushed to the client when then content(`flagGroup`) captured +for the first time. + +In a real-world vulnerability scanning scenario, you may send a large number of different payloads for a single +vulnerability point, and they may all be valid, which can result in the backlink platform receiving many requests, yet +they are caused by the same vulnerability. If you don't want the client to receive so many `flags` for the same +vulnerability, you can take advantage of the `flagGroup` feature of rule's flagFormat. + +For example, SSRF scanning. + +Firstly create a rule like the following: + +```yaml +http: + - name: ssrf + flag_format: (ssrf[a-z0-9]{6})[0-9]{1,3} + rank: 0 + push_to_client: false + notice: false + response_status_code: "200" + response_headers: { } + response_body: "Here is a SSRF!" +``` + +Suppose our target is `https://www.testvuln.com?url=api.com&p=useless`, and for SSRF we have 5 payloads. The final +request sent by the scanner may +be `['https://www.testvuln.com?url=http://revsuit.com/ssrfa98oni1&p=useless, ... ,'https://www.testvuln.com?url=//revsuit.com/ssrfa98oni5&p=useless`'] +. They may all attack successfully. + +However, because anonymous grouping is used in the rule's `flagFormat`, The platform will query the +connected `flagGroup`, in this case `ssrfa98oni`, and push `flag` to the client only at its first appearance, so the +client will only receive one flag:`ssrfa98oni1`. But this is enough, because it already proves that the `url` parameter +of the target is vulnerable. + +### Multi-module collocation + +In actual penetration testing scenarios, certain tasks can be done easily and quickly by combining and matching various +modules of RevSuit. The following is an example of a blind XXE scenario, showing how to use RevSuit's HTTP and FTP +modules, combined with template variables, to quickly complete a port scan. + +First use create an HTTP rule to return evil.dtd, customize the response to the contents of dtd so that it goes to +connect to RevSuit's FTP service, and use template variables to pass the Host and Port to be scanned to FTP via FTP's +user and password. + +![create evil.dtd rule](./images/evil_dtd_rule.png) + +Then create an FTP rule that receives the Host and port to be scanned from the user and password template variables, set +to Pasv Address. + +![create ftp scan rule](./images/ftp_scan_rule.png) + +Then use BurpSuit to launch the scan, by setting the host and port parameters in the evil.dtd URL to set the target of +the port scan. + +![xxe](./images/xxe.png) + +The running effect is as follows: + +![ftp-scan](./images/ftp-scan.gif) + +It because the FTP connection will be crashed if `Passive Address` is not accessible, we can determine whether the port +is open or not based on whether the connection exits normally.For this example, we successfully detected that port 8005 +and 8080 are open. + +## More Usage + +A more detailed wiki is being prepared, you can explore by yourself before it. + +## Advice and Communication + +Submit an issue or contact me through Weixin: `Li4n06` + +## Acknowledgements + +### Reference + +* [https://github.com/rmb122/rogue_mysql_server](https://github.com/rmb122/rogue_mysql_server) +* [https://github.com/256dpi/newdns](https://github.com/256dpi/newdns) + +### Specifically + +Thanks to my friend [@E99plant](https://github.com/wuhan005/) for all the help and advice I received during the +development of this project. + +## License + +@Apache License 2.0 diff --git a/frontend/dist/css/app.css b/frontend/dist/css/app.css index d6873d1..0badb7d 100644 --- a/frontend/dist/css/app.css +++ b/frontend/dist/css/app.css @@ -1 +1 @@ -.custom-icons-list[data-v-05a908c2] .anticon{margin-right:6px}body[data-v-4ae4fda9],html[data-v-4ae4fda9]{height:100%;margin:0}.fade-transform-enter-active[data-v-4ae4fda9],.fade-transform-leave-active[data-v-4ae4fda9]{transition:all .3s;opacity:0}.fade-transform-enter[data-v-4ae4fda9],.fade-transform-leave[data-v-4ae4fda9]{opacity:0}.fade-transform-enter-to[data-v-4ae4fda9]{opacity:0}.ant-menu-item>span>a[data-v-4ae4fda9]{color:hsla(0,0%,100%,.65)}.ant-menu-item-selected>span>a[data-v-4ae4fda9]{color:#fff}#nav[data-v-4ae4fda9]{height:100%}#nav .trigger[data-v-4ae4fda9]{font-size:18px;line-height:64px;padding:0 24px;cursor:pointer;transition:color .3s}#nav .trigger[data-v-4ae4fda9]:hover{color:#1890ff}#nav .logo[data-v-4ae4fda9]{height:32px;background:#0a1d2d;margin:16px;text-align:center;font-size:1.2rem;color:#fff;padding-bottom:5px;border-bottom:2px solid #b6befa}.copyright[data-v-4ae4fda9]{color:#888;text-align:right;margin-right:1rem} \ No newline at end of file +.custom-icons-list[data-v-05a908c2] .anticon{margin-right:6px}body[data-v-07ed630b],html[data-v-07ed630b]{height:100%;margin:0}.fade-transform-enter-active[data-v-07ed630b],.fade-transform-leave-active[data-v-07ed630b]{transition:all .3s;opacity:0}.fade-transform-enter[data-v-07ed630b],.fade-transform-leave[data-v-07ed630b]{opacity:0}.fade-transform-enter-to[data-v-07ed630b]{opacity:0}.ant-menu-item>span>a[data-v-07ed630b]{color:hsla(0,0%,100%,.65)}.ant-menu-item-selected>span>a[data-v-07ed630b]{color:#fff}#nav[data-v-07ed630b]{height:100%}#nav .trigger[data-v-07ed630b]{font-size:18px;line-height:64px;padding:0 24px;cursor:pointer;transition:color .3s}#nav .trigger[data-v-07ed630b]:hover{color:#1890ff}#nav .logo[data-v-07ed630b]{height:32px;background:#0a1d2d;margin:16px;text-align:center;font-size:1.2rem;color:#fff;padding-bottom:5px;border-bottom:2px solid #b6befa}.copyright[data-v-07ed630b]{color:#888;text-align:right;margin-right:1rem} \ No newline at end of file diff --git a/frontend/dist/css/chunk-016c45cf.css b/frontend/dist/css/chunk-016c45cf.css new file mode 100644 index 0000000..d446b2a --- /dev/null +++ b/frontend/dist/css/chunk-016c45cf.css @@ -0,0 +1 @@ +#add-rule[data-v-50ca3b7c]{margin-bottom:10px} \ No newline at end of file diff --git a/frontend/dist/css/chunk-0cb5e9e6.css b/frontend/dist/css/chunk-0cb5e9e6.css new file mode 100644 index 0000000..d7ae63c --- /dev/null +++ b/frontend/dist/css/chunk-0cb5e9e6.css @@ -0,0 +1 @@ +#add-rule[data-v-4fed8448]{margin-bottom:10px} \ No newline at end of file diff --git a/frontend/dist/css/chunk-247d6284.css b/frontend/dist/css/chunk-247d6284.css new file mode 100644 index 0000000..2863728 --- /dev/null +++ b/frontend/dist/css/chunk-247d6284.css @@ -0,0 +1 @@ +#add-rule[data-v-1f4c0376]{margin-bottom:10px}.full-screen-icon[data-v-1f4c0376]{position:absolute;z-index:5;color:#9e9e9e;right:1px;font-size:1rem;cursor:pointer;transition:font-size .1s}.full-screen-icon[data-v-1f4c0376]:hover{font-size:1.1rem;transition:font-size .1s} \ No newline at end of file diff --git a/frontend/dist/css/chunk-36391b77.css b/frontend/dist/css/chunk-36391b77.css deleted file mode 100644 index 5e9af07..0000000 --- a/frontend/dist/css/chunk-36391b77.css +++ /dev/null @@ -1 +0,0 @@ -#add-rule[data-v-ae6501fc]{margin-bottom:10px} \ No newline at end of file diff --git a/frontend/dist/css/chunk-42105840.css b/frontend/dist/css/chunk-42105840.css deleted file mode 100644 index ae122f5..0000000 --- a/frontend/dist/css/chunk-42105840.css +++ /dev/null @@ -1 +0,0 @@ -#add-rule[data-v-5aa75eae]{margin-bottom:10px} \ No newline at end of file diff --git a/frontend/dist/css/chunk-43748c28.css b/frontend/dist/css/chunk-43748c28.css new file mode 100644 index 0000000..59e211d --- /dev/null +++ b/frontend/dist/css/chunk-43748c28.css @@ -0,0 +1 @@ +#add-rule[data-v-1361da51]{margin-bottom:10px} \ No newline at end of file diff --git a/frontend/dist/css/chunk-49fbda44.css b/frontend/dist/css/chunk-49fbda44.css new file mode 100644 index 0000000..35588c7 --- /dev/null +++ b/frontend/dist/css/chunk-49fbda44.css @@ -0,0 +1 @@ +#add-rule[data-v-6f29426c]{margin-bottom:10px} \ No newline at end of file diff --git a/frontend/dist/css/chunk-65a35ecf.css b/frontend/dist/css/chunk-65a35ecf.css deleted file mode 100644 index e74e925..0000000 --- a/frontend/dist/css/chunk-65a35ecf.css +++ /dev/null @@ -1 +0,0 @@ -#add-rule[data-v-4bcc6b83]{margin-bottom:10px} \ No newline at end of file diff --git a/frontend/dist/css/chunk-7bcb83e6.css b/frontend/dist/css/chunk-7bcb83e6.css deleted file mode 100644 index aa4ca44..0000000 --- a/frontend/dist/css/chunk-7bcb83e6.css +++ /dev/null @@ -1 +0,0 @@ -#add-rule[data-v-79ad429e]{margin-bottom:10px}.full-screen-icon[data-v-79ad429e]{position:absolute;z-index:5;color:#9e9e9e;right:1px;font-size:1rem;cursor:pointer;transition:font-size .1s}.full-screen-icon[data-v-79ad429e]:hover{font-size:1.1rem;transition:font-size .1s} \ No newline at end of file diff --git a/frontend/dist/css/chunk-b8f538aa.css b/frontend/dist/css/chunk-b8f538aa.css deleted file mode 100644 index b93ce12..0000000 --- a/frontend/dist/css/chunk-b8f538aa.css +++ /dev/null @@ -1 +0,0 @@ -#add-rule[data-v-376729b6]{margin-bottom:10px} \ No newline at end of file diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 56d7804..033501f 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -1 +1 @@ -RevSuit Control Panel
\ No newline at end of file +RevSuit Control Panel
\ No newline at end of file diff --git a/frontend/dist/js/app.js b/frontend/dist/js/app.js index dc8ae17..7ca76b9 100644 --- a/frontend/dist/js/app.js +++ b/frontend/dist/js/app.js @@ -1 +1 @@ -(function(e){function t(t){for(var s,a,i=t[0],c=t[1],l=t[2],u=0,f=[];u=200&&e<300}});t["a"]=o},4678:function(e,t,n){var s={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn-bd":"9686","./bn-bd.js":"9686","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-in":"ec2e","./en-in.js":"ec2e","./en-nz":"6f50","./en-nz.js":"6f50","./en-sg":"b7e9","./en-sg.js":"b7e9","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-mx":"b5b7","./es-mx.js":"b5b7","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fil":"d69a","./fil.js":"d69a","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-deva":"aaf2","./gom-deva.js":"aaf2","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./oc-lnc":"167b","./oc-lnc.js":"167b","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tk":"5aff","./tk.js":"5aff","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-mo":"3a6c","./zh-mo.js":"3a6c","./zh-tw":"90ea","./zh-tw.js":"90ea"};function a(e){var t=r(e);return n(t)}function r(e){if(!n.o(s,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return s[e]}a.keys=function(){return Object.keys(s)},a.resolve=r,e.exports=a,a.id="4678"},"56d7":function(e,t,n){"use strict";n.r(t),n.d(t,"store",(function(){return E}));n("e260"),n("e6cf"),n("cca6"),n("a79d");var s=n("a026"),a=n("f23d"),r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-layout",{attrs:{id:"nav"}},[n("a-layout-sider",{attrs:{trigger:null,collapsible:""},model:{value:e.collapsed,callback:function(t){e.collapsed=t},expression:"collapsed"}},[n("div",{staticClass:"logo"},[n("b",[e._v("R")]),e.collapsed?e._e():n("span",[n("b",[e._v("ev")]),e._v("Suit")])]),n("a-menu",{attrs:{theme:"dark",mode:"inline",selectedKeys:[this.$route.path],openKeys:e.openKeys},on:{"update:openKeys":function(t){e.openKeys=t},"update:open-keys":function(t){e.openKeys=t}}},[n("a-sub-menu",{key:"logs"},[n("span",{attrs:{slot:"title"},slot:"title"},[n("a-icon",{attrs:{type:"bar-chart"}}),n("span",[e._v("Logs")])],1),n("a-menu-item",{key:"/logs/http"},[n("router-link",{attrs:{to:"/logs/http"}},[e._v("HTTP Logs")])],1),n("a-menu-item",{key:"/logs/dns"},[n("router-link",{attrs:{to:"/logs/dns"}},[e._v("DNS Logs")])],1),n("a-menu-item",{key:"/logs/rmi"},[n("router-link",{attrs:{to:"/logs/rmi"}},[e._v("RMI Logs")])],1),n("a-menu-item",{key:"/logs/mysql"},[n("router-link",{attrs:{to:"/logs/mysql"}},[e._v("MySQL Logs")])],1),n("a-menu-item",{key:"/logs/ftp"},[n("router-link",{attrs:{to:"/logs/ftp"}},[e._v("FTP Logs")])],1)],1),n("a-sub-menu",{key:"rules"},[n("span",{attrs:{slot:"title"},slot:"title"},[n("rule-icon"),n("span",[e._v("Rules")])],1),n("a-menu-item",{key:"/rules/http"},[n("router-link",{attrs:{to:"/rules/http"}},[e._v("HTTP Rules")])],1),n("a-menu-item",{key:"/rules/dns"},[n("router-link",{attrs:{to:"/rules/dns"}},[e._v("DNS Rules")])],1),n("a-menu-item",{key:"/rules/rmi"},[n("router-link",{attrs:{to:"/rules/rmi"}},[e._v("RMI Rules")])],1),n("a-menu-item",{key:"/rules/mysql"},[n("router-link",{attrs:{to:"/rules/mysql"}},[e._v("MySQL Rules")])],1),n("a-menu-item",{key:"/rules/ftp"},[n("router-link",{attrs:{to:"/rules/ftp"}},[e._v("FTP Rules")])],1)],1),n("a-menu-item",{key:"/settings"},[n("router-link",{attrs:{to:"/settings"}},[n("a-icon",{attrs:{type:"setting"}}),n("span",[e._v("Settings")])],1)],1)],1)],1),n("a-layout",[n("a-layout-header",{staticStyle:{background:"#fff",padding:"0"}},[n("a-icon",{staticClass:"trigger",attrs:{type:e.collapsed?"menu-unfold":"menu-fold"},on:{click:function(){return e.collapsed=!e.collapsed}}}),e.isLogMode?n("div",{staticStyle:{float:"right","min-width":"60%",padding:"12px 0","line-height":"24px"}},[n("a-row",{attrs:{gutter:24,type:"flex"}},[n("a-col",{attrs:{span:21}},[n("a-form-model",{directives:[{name:"show",rawName:"v-show",value:e.showSettings,expression:"showSettings"}],ref:"settings",attrs:{layout:"inline"}},[n("a-row",{attrs:{gutter:24,type:"flex"}},[n("a-col",{attrs:{span:9,offset:2}},[n("a-form-model-item",{attrs:{label:"Auto Refresh"}},[n("a-switch",{attrs:{id:"auto-refresh"},model:{value:e.autoRefresh,callback:function(t){e.autoRefresh=t},expression:"autoRefresh"}})],1)],1),n("a-col",{attrs:{span:13}},[n("a-form-model-item",{attrs:{label:"Refresh Interval"}},[n("a-input-number",{staticStyle:{"margin-right":"-3rem"},attrs:{id:"refresh-interval",disabled:!e.autoRefresh},model:{value:e.refreshInterval,callback:function(t){e.refreshInterval=t},expression:"refreshInterval"}})],1)],1)],1)],1)],1),n("a-col",{attrs:{span:3}},[n("a-icon",{style:"font-size: 18px;padding: 12px 0;"+(e.showSettings?"color: #1b90ff;":""),attrs:{type:"setting"},on:{click:function(t){e.showSettings=!e.showSettings}}})],1)],1)],1):e._e()],1),n("a-layout-content",{style:{margin:"24px 16px",padding:"24px",borderRadius:"20px",background:"#fff",minHeight:"initial"}},[n("transition",{attrs:{name:"fade-transform"}},[n("router-view",{ref:"content"})],1)],1),n("div",{staticClass:"copyright"},[n("p",{},[e._v(" RevSuit Current Version: "+e._s(this.version)+" ©2021 "),n("a",{attrs:{href:"https://github.com/Li4n0"}},[e._v("Li4n0")]),e._v(". "),n("a",{attrs:{href:"https://github.com/Li4n0/revsuit"}},[e._v("GitHub")])])])],1),n("Auth")],1)},o=[],i=(n("caad"),n("2532"),n("1276"),n("ac1f"),n("d3b7"),n("25f0"),function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("a-modal",{attrs:{title:"Auth with token",visible:e.visible,"confirm-loading":e.confirmLoading},on:{cancel:e.cancel,ok:e.auth}},[n("a-input",{attrs:{placeholder:"Your token"},on:{pressEnter:e.auth},model:{value:e.token,callback:function(t){e.token=t},expression:"token"}})],1)],1)}),c=[],l=n("365c");function u(e){return Object(l["a"])({url:"/auth",method:"get",headers:{Token:e}})}function f(){return Object(l["a"])({url:"/version",method:"get"})}var h={data:function(){return{confirmLoading:!1,token:""}},computed:{visible:function(){return!E.authed}},methods:{auth:function(){var e=this;this.confirmLoading=!0,u(this.token).then((function(){E.authed=!0,e.confirmLoading=!1,e.token=""})).catch((function(t){403===t.response.status&&e.$notification.error({message:"Wrong token",description:"Your token is wrong, please check your server config file.",style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:2.5}),e.confirmLoading=!1}))},cancel:function(){E.authed=!0}}},d=h,p=n("2877"),m=Object(p["a"])(d,i,c,!1,null,null,null),b=m.exports,g=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-icon",{attrs:{component:e.RuleSvg}})},j=[],v={template:'\n \n'},k={name:"RuleIcon",data:function(){return{RuleSvg:v}}},y=k,S=(n("912e"),Object(p["a"])(y,g,j,!1,null,"05a908c2",null)),w=S.exports,z={data:function(){return{store:E,autoRefresh:"true"===localStorage.getItem("autoRefresh"),refreshInterval:localStorage.getItem("refreshInterval")?localStorage.getItem("refreshInterval"):5,pageSize:E.pageSize,collapsed:!1,showSettings:!1,openKeys:[],version:""}},computed:{isLogMode:function(){return this.$route.path.includes("logs")}},methods:{timing:function(){var e=this;null!==this.timer&&clearInterval(this.timer),this.timer=setInterval((function(){e.$refs.content.fetch()}),1e3*this.refreshInterval)},GetVersion:function(){var e=this;f().then((function(t){e.version=t.data.result}))}},mounted:function(){this.autoRefresh&&this.isLogMode&&this.timing(),this.GetVersion()},created:function(){var e=this.$watch("$route",(function(t,n){"/"===n.path&&0===this.openKeys.length&&(this.openKeys.push(t.path.split("/")[1]),e())}))},destroyed:function(){clearInterval(this.timer)},watch:{autoRefresh:function(e){e?this.timing():clearInterval(this.timer),localStorage.setItem("autoRefresh",e)},isLogMode:function(e){e?this.timing():clearInterval(this.timer)},refreshInterval:function(e){clearInterval(this.timer),this.timing(),localStorage.setItem("refreshInterval",e)},pageSize:function(e){(e<=0||e>100)&&(e=10),E.pageSize=e,localStorage.setItem("pageSize",e)},"store.authed":function(e){e&&(this.$refs.content.fetch(),this.GetVersion())},"store.pageSize":function(){this.$refs.content.pagination.pageSize=E.pageSize,localStorage.setItem("pageSize",E.pageSize.toString()),this.$refs.content.fetch()}},components:{RuleIcon:w,Auth:b}},_=z,x=(n("e0bf"),Object(p["a"])(_,r,o,!1,null,"4ae4fda9",null)),R=x.exports,L=(n("3ca3"),n("ddb0"),n("8c4f"));s["a"].use(L["a"]);var I=[{path:"/",name:"Home",redirect:"/logs/http"},{path:"/logs/http",name:"HttpLogs",component:function(){return n.e("chunk-1da7f23b").then(n.bind(null,"f889"))}},{path:"/logs/dns",name:"DnsLogs",component:function(){return n.e("chunk-e039e75a").then(n.bind(null,"5ea0"))}},{path:"/logs/mysql",name:"MysqlLogs",component:function(){return n.e("chunk-fef965c2").then(n.bind(null,"2e9f"))}},{path:"/logs/rmi",name:"RmiLogs",component:function(){return n.e("chunk-330a7e95").then(n.bind(null,"975e"))}},{path:"/logs/ftp",name:"FtpLogs",component:function(){return n.e("chunk-3d13e56e").then(n.bind(null,"c5bf"))}},{path:"/rules/http",name:"HttpRules",component:function(){return Promise.all([n.e("chunk-08f9fbe8"),n.e("chunk-7bcb83e6")]).then(n.bind(null,"9520c"))}},{path:"/rules/dns",name:"DnsRules",component:function(){return Promise.all([n.e("chunk-08f9fbe8"),n.e("chunk-b8f538aa")]).then(n.bind(null,"2e08"))}},{path:"/rules/mysql",name:"MysqlRules",component:function(){return Promise.all([n.e("chunk-08f9fbe8"),n.e("chunk-42105840")]).then(n.bind(null,"05cd"))}},{path:"/rules/rmi",name:"RmiRules",component:function(){return Promise.all([n.e("chunk-08f9fbe8"),n.e("chunk-36391b77")]).then(n.bind(null,"ac60"))}},{path:"/rules/ftp",name:"FtpRules",component:function(){return Promise.all([n.e("chunk-08f9fbe8"),n.e("chunk-65a35ecf")]).then(n.bind(null,"f832"))}},{path:"/settings",name:"Settings",component:function(){return n.e("chunk-b241c712").then(n.bind(null,"ee09"))}}],M=new L["a"]({routes:I}),O=M;n("202f"),n("ed08");s["a"].config.productionTip=!1,s["a"].use(a["a"]);var E=s["a"].observable({authed:!0,pageSize:localStorage.getItem("pageSize")?parseInt(localStorage.getItem("pageSize")):10});new s["a"]({router:O,render:function(e){return e(R)}}).$mount("#app")},"912e":function(e,t,n){"use strict";n("e805")},c723:function(e,t,n){},e0bf:function(e,t,n){"use strict";n("c723")},e805:function(e,t,n){},ed08:function(e,t,n){n("5319"),n("ac1f"),n("4d63"),n("25f0"),Date.prototype.format=function(e){var t={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var n in/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),t)new RegExp("("+n+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?t[n]:("00"+t[n]).substr((""+t[n]).length)));return e}}}); \ No newline at end of file +(function(e){function t(t){for(var s,a,i=t[0],c=t[1],l=t[2],u=0,f=[];u=200&&e<300}});t["a"]=o},4678:function(e,t,n){var s={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn-bd":"9686","./bn-bd.js":"9686","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-in":"ec2e","./en-in.js":"ec2e","./en-nz":"6f50","./en-nz.js":"6f50","./en-sg":"b7e9","./en-sg.js":"b7e9","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-mx":"b5b7","./es-mx.js":"b5b7","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fil":"d69a","./fil.js":"d69a","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-deva":"aaf2","./gom-deva.js":"aaf2","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./oc-lnc":"167b","./oc-lnc.js":"167b","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tk":"5aff","./tk.js":"5aff","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-mo":"3a6c","./zh-mo.js":"3a6c","./zh-tw":"90ea","./zh-tw.js":"90ea"};function a(e){var t=r(e);return n(t)}function r(e){if(!n.o(s,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return s[e]}a.keys=function(){return Object.keys(s)},a.resolve=r,e.exports=a,a.id="4678"},"56d7":function(e,t,n){"use strict";n.r(t),n.d(t,"store",(function(){return E}));n("e260"),n("e6cf"),n("cca6"),n("a79d");var s=n("a026"),a=n("f23d"),r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-layout",{attrs:{id:"nav"}},[n("a-layout-sider",{attrs:{trigger:null,collapsible:""},model:{value:e.collapsed,callback:function(t){e.collapsed=t},expression:"collapsed"}},[n("div",{staticClass:"logo"},[n("b",[e._v("R")]),e.collapsed?e._e():n("span",[n("b",[e._v("ev")]),e._v("Suit")])]),n("a-menu",{attrs:{theme:"dark",mode:"inline",selectedKeys:[this.$route.path],openKeys:e.openKeys},on:{"update:openKeys":function(t){e.openKeys=t},"update:open-keys":function(t){e.openKeys=t}}},[n("a-sub-menu",{key:"logs"},[n("span",{attrs:{slot:"title"},slot:"title"},[n("a-icon",{attrs:{type:"bar-chart"}}),n("span",[e._v("Logs")])],1),n("a-menu-item",{key:"/logs/http"},[n("router-link",{attrs:{to:"/logs/http"}},[e._v("HTTP Logs")])],1),n("a-menu-item",{key:"/logs/dns"},[n("router-link",{attrs:{to:"/logs/dns"}},[e._v("DNS Logs")])],1),n("a-menu-item",{key:"/logs/rmi"},[n("router-link",{attrs:{to:"/logs/rmi"}},[e._v("RMI Logs")])],1),n("a-menu-item",{key:"/logs/mysql"},[n("router-link",{attrs:{to:"/logs/mysql"}},[e._v("MySQL Logs")])],1),n("a-menu-item",{key:"/logs/ftp"},[n("router-link",{attrs:{to:"/logs/ftp"}},[e._v("FTP Logs")])],1)],1),n("a-sub-menu",{key:"rules"},[n("span",{attrs:{slot:"title"},slot:"title"},[n("rule-icon"),n("span",[e._v("Rules")])],1),n("a-menu-item",{key:"/rules/http"},[n("router-link",{attrs:{to:"/rules/http"}},[e._v("HTTP Rules")])],1),n("a-menu-item",{key:"/rules/dns"},[n("router-link",{attrs:{to:"/rules/dns"}},[e._v("DNS Rules")])],1),n("a-menu-item",{key:"/rules/rmi"},[n("router-link",{attrs:{to:"/rules/rmi"}},[e._v("RMI Rules")])],1),n("a-menu-item",{key:"/rules/mysql"},[n("router-link",{attrs:{to:"/rules/mysql"}},[e._v("MySQL Rules")])],1),n("a-menu-item",{key:"/rules/ftp"},[n("router-link",{attrs:{to:"/rules/ftp"}},[e._v("FTP Rules")])],1)],1),n("a-menu-item",{key:"/settings"},[n("router-link",{attrs:{to:"/settings"}},[n("a-icon",{attrs:{type:"setting"}}),n("span",[e._v("Settings")])],1)],1)],1)],1),n("a-layout",[n("a-layout-header",{staticStyle:{background:"#fff",padding:"0"}},[n("a-icon",{staticClass:"trigger",attrs:{type:e.collapsed?"menu-unfold":"menu-fold"},on:{click:function(){return e.collapsed=!e.collapsed}}}),e.isLogMode?n("div",{staticStyle:{float:"right","min-width":"60%",padding:"12px 0","line-height":"24px"}},[n("a-row",{attrs:{gutter:24,type:"flex"}},[n("a-col",{attrs:{span:21}},[n("a-form-model",{directives:[{name:"show",rawName:"v-show",value:e.showSettings,expression:"showSettings"}],ref:"settings",attrs:{layout:"inline"}},[n("a-row",{attrs:{gutter:24,type:"flex"}},[n("a-col",{attrs:{span:9,offset:2}},[n("a-form-model-item",{attrs:{label:"Auto Refresh"}},[n("a-switch",{attrs:{id:"auto-refresh"},model:{value:e.autoRefresh,callback:function(t){e.autoRefresh=t},expression:"autoRefresh"}})],1)],1),n("a-col",{attrs:{span:13}},[n("a-form-model-item",{attrs:{label:"Refresh Interval"}},[n("a-input-number",{staticStyle:{"margin-right":"-3rem"},attrs:{id:"refresh-interval",disabled:!e.autoRefresh},model:{value:e.refreshInterval,callback:function(t){e.refreshInterval=t},expression:"refreshInterval"}})],1)],1)],1)],1)],1),n("a-col",{attrs:{span:3}},[n("a-icon",{style:"font-size: 18px;padding: 12px 0;"+(e.showSettings?"color: #1b90ff;":""),attrs:{type:"setting"},on:{click:function(t){e.showSettings=!e.showSettings}}})],1)],1)],1):e._e()],1),n("a-layout-content",{style:{margin:"24px 16px",padding:"24px",borderRadius:"20px",background:"#fff",minHeight:"initial"}},[n("transition",{attrs:{name:"fade-transform"}},[n("router-view",{ref:"content"})],1)],1),n("div",{staticClass:"copyright"},[n("p",{},[e._v(" RevSuit Current Version: "+e._s(this.version)+" ©2021 "),n("a",{attrs:{href:"https://github.com/Li4n0"}},[e._v("Li4n0")]),e._v(". "),n("a",{attrs:{href:"https://github.com/Li4n0/revsuit"}},[e._v("GitHub")])])])],1),n("Auth")],1)},o=[],i=(n("caad"),n("2532"),n("1276"),n("ac1f"),n("d3b7"),n("25f0"),function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("a-modal",{attrs:{title:"Auth with token",visible:e.visible,"confirm-loading":e.confirmLoading},on:{cancel:e.cancel,ok:e.auth}},[n("a-input",{attrs:{placeholder:"Your token"},on:{pressEnter:e.auth},model:{value:e.token,callback:function(t){e.token=t},expression:"token"}})],1)],1)}),c=[],l=n("365c");function u(e){return Object(l["a"])({url:"/auth",method:"get",headers:{Token:e}})}function f(){return Object(l["a"])({url:"/version",method:"get"})}var d={data:function(){return{confirmLoading:!1,token:""}},computed:{visible:function(){return!E.authed}},methods:{auth:function(){var e=this;this.confirmLoading=!0,u(this.token).then((function(){E.authed=!0,e.confirmLoading=!1,e.token=""})).catch((function(t){403===t.response.status&&e.$notification.error({message:"Wrong token",description:"Your token is wrong, please check your server config file.",style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:2.5}),e.confirmLoading=!1}))},cancel:function(){E.authed=!0}}},h=d,p=n("2877"),m=Object(p["a"])(h,i,c,!1,null,null,null),g=m.exports,b=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-icon",{attrs:{component:e.RuleSvg}})},j=[],v={template:'\n \n'},k={name:"RuleIcon",data:function(){return{RuleSvg:v}}},y=k,S=(n("912e"),Object(p["a"])(y,b,j,!1,null,"05a908c2",null)),w=S.exports,z={data:function(){return{store:E,autoRefresh:"true"===localStorage.getItem("autoRefresh"),refreshInterval:localStorage.getItem("refreshInterval")?localStorage.getItem("refreshInterval"):5,pageSize:E.pageSize,collapsed:!1,showSettings:!1,openKeys:[],version:""}},computed:{isLogMode:function(){return this.$route.path.includes("logs")}},methods:{timing:function(){var e=this;null!==this.timer&&clearInterval(this.timer),this.timer=setInterval((function(){e.$refs.content.fetch()}),1e3*this.refreshInterval)},GetVersion:function(){var e=this;f().then((function(t){e.version=t.data.result}))}},mounted:function(){null===localStorage.getItem("autoRefresh")&&(this.autoRefresh=!0),this.autoRefresh&&this.isLogMode&&this.timing(),this.GetVersion()},created:function(){var e=this.$watch("$route",(function(t,n){"/"===n.path&&0===this.openKeys.length&&(this.openKeys.push(t.path.split("/")[1]),e())}))},destroyed:function(){clearInterval(this.timer)},watch:{autoRefresh:function(e){e?this.timing():clearInterval(this.timer),localStorage.setItem("autoRefresh",e)},isLogMode:function(e){e||clearInterval(this.timer)},refreshInterval:function(e){clearInterval(this.timer),this.timing(),localStorage.setItem("refreshInterval",e)},pageSize:function(e){(e<=0||e>100)&&(e=10),E.pageSize=e,localStorage.setItem("pageSize",e)},"store.authed":function(e){e&&(this.$refs.content.fetch(),this.GetVersion())},"store.pageSize":function(){this.$refs.content.pagination.pageSize=E.pageSize,localStorage.setItem("pageSize",E.pageSize.toString()),this.$refs.content.fetch()}},components:{RuleIcon:w,Auth:g}},R=z,_=(n("f1bf"),Object(p["a"])(R,r,o,!1,null,"07ed630b",null)),x=_.exports,L=(n("3ca3"),n("ddb0"),n("8c4f"));s["a"].use(L["a"]);var I=[{path:"/",name:"Home",redirect:"/logs/http"},{path:"/logs/http",name:"HttpLogs",component:function(){return n.e("chunk-1da7f23b").then(n.bind(null,"f889"))}},{path:"/logs/dns",name:"DnsLogs",component:function(){return n.e("chunk-e039e75a").then(n.bind(null,"5ea0"))}},{path:"/logs/mysql",name:"MysqlLogs",component:function(){return n.e("chunk-fef965c2").then(n.bind(null,"2e9f"))}},{path:"/logs/rmi",name:"RmiLogs",component:function(){return n.e("chunk-330a7e95").then(n.bind(null,"975e"))}},{path:"/logs/ftp",name:"FtpLogs",component:function(){return n.e("chunk-3d13e56e").then(n.bind(null,"c5bf"))}},{path:"/rules/http",name:"HttpRules",component:function(){return Promise.all([n.e("chunk-08f9fbe8"),n.e("chunk-247d6284")]).then(n.bind(null,"9520c"))}},{path:"/rules/dns",name:"DnsRules",component:function(){return Promise.all([n.e("chunk-08f9fbe8"),n.e("chunk-43748c28")]).then(n.bind(null,"2e08"))}},{path:"/rules/mysql",name:"MysqlRules",component:function(){return Promise.all([n.e("chunk-08f9fbe8"),n.e("chunk-0cb5e9e6")]).then(n.bind(null,"05cd"))}},{path:"/rules/rmi",name:"RmiRules",component:function(){return Promise.all([n.e("chunk-08f9fbe8"),n.e("chunk-016c45cf")]).then(n.bind(null,"ac60"))}},{path:"/rules/ftp",name:"FtpRules",component:function(){return Promise.all([n.e("chunk-08f9fbe8"),n.e("chunk-49fbda44")]).then(n.bind(null,"f832"))}},{path:"/settings",name:"Settings",component:function(){return n.e("chunk-b241c712").then(n.bind(null,"ee09"))}}],M=new L["a"]({routes:I}),O=M;n("202f"),n("ed08");s["a"].config.productionTip=!1,s["a"].use(a["a"]);var E=s["a"].observable({authed:!0,pageSize:localStorage.getItem("pageSize")?parseInt(localStorage.getItem("pageSize")):10});new s["a"]({router:O,render:function(e){return e(x)}}).$mount("#app")},"900c":function(e,t,n){},"912e":function(e,t,n){"use strict";n("e805")},e805:function(e,t,n){},ed08:function(e,t,n){n("5319"),n("ac1f"),n("4d63"),n("25f0"),Date.prototype.format=function(e){var t={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var n in/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),t)new RegExp("("+n+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?t[n]:("00"+t[n]).substr((""+t[n]).length)));return e}},f1bf:function(e,t,n){"use strict";n("900c")}}); \ No newline at end of file diff --git a/frontend/dist/js/chunk-016c45cf.js b/frontend/dist/js/chunk-016c45cf.js new file mode 100644 index 0000000..a69e82d --- /dev/null +++ b/frontend/dist/js/chunk-016c45cf.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-016c45cf"],{"28be":function(t,e,n){"use strict";n("d142")},ac60:function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("a-button",{attrs:{id:"add-rule",type:"primary"},on:{click:t.addRule}},[n("a-icon",{attrs:{type:"plus"}}),t._v(" New Rule ")],1),n("a-drawer",{attrs:{title:t.formAction+" RMI rule",width:490,visible:t.formVisible,"body-style":{paddingBottom:"80px"}},on:{close:t.closeDrawer}},[n("a-form-model",{ref:"form",attrs:{model:t.form,layout:"vertical"},on:{submit:t.handleSubmit}},[n("BasicRule",{attrs:{form:t.form,readOnly:t.formReadOnly,flagFormat:"path"}})],1),n("div",{style:{position:"absolute",right:0,bottom:0,width:"100%",borderTop:"1px solid #e9e9e9",padding:"10px 16px",background:"#fff",textAlign:"right",zIndex:1}},[n("a-button",{style:{marginRight:"8px"},on:{click:t.handleCancel}},[t._v(" Cancel ")]),n("a-button",{attrs:{type:"primary",disabled:t.formReadOnly},on:{click:t.handleSubmit}},[t._v(" Submit ")])],1)],1),n("a-table",{staticStyle:{"overflow-x":"auto"},attrs:{columns:t.columns,"data-source":t.data,loading:t.loading,pagination:t.pagination},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"filterDropdown",fn:function(e){var o=e.setSelectedKeys,a=e.selectedKeys,i=(e.clearFilters,e.column);return n("div",{staticStyle:{padding:"8px"}},[n("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+i.dataIndex,value:a[0]},on:{change:function(t){return o(t.target.value?[t.target.value]:[])},pressEnter:function(){t.filters[i.dataIndex]=a[0],t.fetch()}}}),n("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[i.dataIndex]=a[0],t.fetch()}}},[t._v(" Search ")])],1)}},{key:"filterIcon",fn:function(t){return n("a-icon",{style:{color:t?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"rank",fn:function(e){return n("span",{},[n("a-tag",{attrs:{color:"#"+(2996213+80*e).toString(16)}},[t._v(" "+t._s(e)+" ")])],1)}},{key:"switchRender",fn:function(e,o,a,i){return n("span",{},[n("a-switch",{attrs:{checked:e},on:{click:function(e){return t.clickSwitch(o,i.dataIndex)}}})],1)}},{key:"valueRender",fn:function(e){return n("span",{},t._l(e.split(","),(function(e){return n("span",{key:e},[t._v(t._s(e)),n("br")])})),0)}},{key:"action",fn:function(e,o,a){return n("span",{},[n("a-button",{staticStyle:{color:"#67C23A","background-color":"transparent","border-color":"#67C23A","text-shadow":"none",margin:"0 10px 3px 0"},attrs:{size:"small",ghost:""},on:{click:function(e){return t.viewRule(o)}}},[t._v("View")]),n("a-button",{staticStyle:{color:"#909399","background-color":"transparent","border-color":"#909399","text-shadow":"none",margin:"0 10px 3px 0"},attrs:{size:"small",ghost:""},on:{click:function(e){return t.editRule(o,a)}}},[t._v("Edit")]),n("a-popconfirm",{attrs:{title:"Are you sure delete this task?","ok-text":"Yes","cancel-text":"No"},on:{confirm:function(e){return t.deleteRule(o,a)}}},[n("a-button",{attrs:{type:"danger",size:"small",ghost:""}},[t._v("Delete")])],1)],1)}}])})],1)},a=[],i=n("5530"),r=(n("a434"),n("34c6")),c=n("56d7"),s=n("2084"),l="View",d="Edit",u="Create",f=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"NAME",dataIndex:"name",key:"name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG FORMAT",dataIndex:"flag_format",key:"flag_format",ellipsis:!0},{title:"RANK",dataIndex:"rank",key:"rank",scopedSlots:{customRender:"rank"}},{title:"PUSH TO CLIENT",dataIndex:"push_to_client",key:"push_to_client",scopedSlots:{customRender:"switchRender"}},{title:"NOTICE",dataIndex:"notice",key:"notice",scopedSlots:{customRender:"switchRender"}},{title:"Action",key:"action",scopedSlots:{customRender:"action"}}],p={name:"RmiRules",data:function(){return{store:c["store"],data:[],formVisible:!1,pagination:{current:1,showSizeChanger:!0,pageSize:c["store"].pageSize,onShowSizeChange:function(t,e){c["store"].pageSize=e}},filters:{},loading:!1,columns:f,form:{},formReadOnly:!1,formAction:""}},methods:{handleTableChange:function(t,e,n){var o=Object(i["a"])({},this.pagination);o.current=t.current,this.pagination=o,this.order="ascend"===n.order?"asc":"desc",this.fetch()},fetch:function(){var t=this,e=Object(i["a"])(Object(i["a"])({},this.filters),{},{page:this.pagination.current,pageSize:this.pagination.pageSize,order:this.order});this.loading=!0,Object(r["j"])(e).then((function(e){var n=e.data.result;t.data=n.data;var o=Object(i["a"])({},t.pagination);o.total=n.count,t.pagination=o,t.loading=!1})).catch((function(e){403!==e.response.status&&t.$message.error("Unknown error with status code: "+e.response.status)}))},clickSwitch:function(t,e){var n=this;t[e]=!t[e],Object(r["o"])(t).then().catch((function(t){n.$notification.error({message:"Edit failed",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))},addRule:function(){this.form={},this.showForm(u)},viewRule:function(t){this.form=t,this.showForm(l)},editRule:function(t){this.form=JSON.parse(JSON.stringify(t)),this.showForm(d)},deleteRule:function(t,e){var n=this;Object(r["e"])(t).then((function(){n.data.splice(e,1)})).catch((function(t){n.$notification.error({message:"Error",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))},showForm:function(t){this.formAction=t,this.formReadOnly=t===l,this.formVisible=!0},closeDrawer:function(){this.formVisible=!1},handleSubmit:function(){var t=this;this.$refs.form.validate((function(e){e&&Object(r["o"])(t.form).then((function(){t.closeDrawer(),t.fetch({page:t.pagination.current}),t.$notification.info({message:"Success",style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:2.5})})).catch((function(e){t.$notification.error({message:t.formAction+" failed",description:e.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))}))},handleCancel:function(){this.form={},this.closeDrawer()}},mounted:function(){this.fetch({page:"1"})},components:{BasicRule:s["a"]}},h=p,m=(n("28be"),n("2877")),g=Object(m["a"])(h,o,a,!1,null,"50ca3b7c",null);e["default"]=g.exports},d142:function(t,e,n){}}]); \ No newline at end of file diff --git a/frontend/dist/js/chunk-0cb5e9e6.js b/frontend/dist/js/chunk-0cb5e9e6.js new file mode 100644 index 0000000..c238bd2 --- /dev/null +++ b/frontend/dist/js/chunk-0cb5e9e6.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0cb5e9e6"],{"05cd":function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("a-button",{attrs:{id:"add-rule",type:"primary"},on:{click:t.addRule}},[a("a-icon",{attrs:{type:"plus"}}),t._v(" New Rule ")],1),a("a-drawer",{attrs:{title:t.formAction+" MySQL rule",width:490,visible:t.formVisible,"body-style":{paddingBottom:"80px"}},on:{close:t.closeDrawer}},[a("a-form-model",{ref:"form",attrs:{model:t.form,layout:"vertical"},on:{submit:t.handleSubmit}},[a("BasicRule",{attrs:{form:t.form,readOnly:t.formReadOnly,flagField:"user or schema"}}),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:24}},[a("a-form-model-item",{attrs:{label:"Files",rules:t.rules.files}},[a("a-input",{staticStyle:{width:"100%"},attrs:{placeholder:"please enter file name,use ';' to split multiple file names",readOnly:t.formReadOnly,disabled:t.form.exploit_jdbc_client},model:{value:t.form.files,callback:function(e){t.$set(t.form,"files",e)},expression:"form.files"}})],1)],1)],1),a("a-row",[a("a-form-model-item",[a("div",{staticClass:"ant-form-item-label"},[a("label",{attrs:{for:"exploit-jdbc-client"}},[t._v("Exploit Jdbc Client "),a("a-tooltip",{attrs:{placement:"topLeft",title:"Whether test to exploit jdbc client."}},[a("a-icon",{attrs:{type:"question-circle"}})],1)],1)]),a("a-switch",{attrs:{id:"exploit-jdbc-client",disabled:t.formReadOnly},model:{value:t.form.exploit_jdbc_client,callback:function(e){t.$set(t.form,"exploit_jdbc_client",e)},expression:"form.exploit_jdbc_client"}})],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:24}},[a("a-form-model-item",[a("label",{attrs:{for:"payload"}},[t._v("Payload "),a("a-tooltip",{attrs:{placement:"topLeft",title:"Need to set ${payload} variable by flag format first. Payload which key is same as ${payload} will be used."}},[a("a-icon",{attrs:{type:"question-circle"}})],1)],1),t._l(t.payloadKeys,(function(e){return a("a-input-group",{key:e,attrs:{id:"payload",compact:""}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["Key-"+e],expression:"['Key-'+payloadKey,]"}],staticStyle:{width:"47%","margin-bottom":"5px"},attrs:{defaultOpen:!1,placeholder:"Key",disabled:!t.form.exploit_jdbc_client,readOnly:t.formReadOnly},model:{value:t.form["Key-"+e],callback:function(a){t.$set(t.form,"Key-"+e,a)},expression:"form['Key-'+payloadKey]"}}),a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["Value-"+e],expression:"['Value-'+payloadKey,]"}],staticStyle:{width:"53%"},attrs:{placeholder:"Base64 encoded payload Value",disabled:!t.form.exploit_jdbc_client,readOnly:t.formReadOnly},on:{focus:function(){!t.formReadOnly&&e===t.payloadKeys[t.payloadKeys.length-1]&&t.form["Key-"+e]&&t.addPayload()}},model:{value:t.form["Value-"+e],callback:function(a){t.$set(t.form,"Value-"+e,a)},expression:"form['Value-'+payloadKey]"}},[a("a-icon",{staticClass:"dynamic-delete-button",attrs:{slot:"addonAfter",type:"minus-circle-o"},on:{click:function(){return t.form.exploit_jdbc_client?t.removePayload(e):null}},slot:"addonAfter"})],1)],1)}))],2)],1)],1)],1),a("div",{style:{position:"absolute",right:0,bottom:0,width:"100%",borderTop:"1px solid #e9e9e9",padding:"10px 16px",background:"#fff",textAlign:"right",zIndex:1}},[a("a-button",{style:{marginRight:"8px"},on:{click:t.handleCancel}},[t._v(" Cancel ")]),a("a-button",{attrs:{type:"primary",disabled:t.formReadOnly},on:{click:t.handleSubmit}},[t._v(" Submit ")])],1)],1),a("a-table",{staticStyle:{"overflow-x":"auto"},attrs:{columns:t.columns,"data-source":t.data,loading:t.loading,pagination:t.pagination},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"filterDropdown",fn:function(e){var o=e.setSelectedKeys,i=e.selectedKeys,n=(e.clearFilters,e.column);return a("div",{staticStyle:{padding:"8px"}},[a("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+n.dataIndex,value:i[0]},on:{change:function(t){return o(t.target.value?[t.target.value]:[])},pressEnter:function(){t.filters[n.dataIndex]=i[0],t.fetch()}}}),a("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[n.dataIndex]=i[0],t.fetch()}}},[t._v(" Search ")])],1)}},{key:"filterIcon",fn:function(t){return a("a-icon",{style:{color:t?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"rank",fn:function(e){return a("span",{},[a("a-tag",{attrs:{color:"#"+(2996213+80*e).toString(16)}},[t._v(" "+t._s(e)+" ")])],1)}},{key:"switchRender",fn:function(e,o,i,n){return a("span",{},[a("a-switch",{attrs:{checked:e},on:{click:function(e){return t.clickSwitch(o,n.dataIndex)}}})],1)}},{key:"action",fn:function(e,o,i){return a("span",{},[a("a-button",{staticStyle:{color:"#67C23A","background-color":"transparent","border-color":"#67C23A","text-shadow":"none",margin:"0 10px 3px 0"},attrs:{size:"small",ghost:""},on:{click:function(e){return t.viewRule(o)}}},[t._v("View")]),a("a-button",{staticStyle:{color:"#909399","background-color":"transparent","border-color":"#909399","text-shadow":"none",margin:"0 10px 3px 0"},attrs:{size:"small",ghost:""},on:{click:function(e){return t.editRule(o,i)}}},[t._v("Edit")]),a("a-popconfirm",{attrs:{title:"Are you sure delete this task?","ok-text":"Yes","cancel-text":"No"},on:{confirm:function(e){return t.deleteRule(o,i)}}},[a("a-button",{attrs:{type:"danger",size:"small",ghost:""}},[t._v("Delete")])],1)],1)}}])})],1)},i=[],n=a("5530"),r=(a("a434"),a("34c6")),l=a("56d7"),s=a("2084"),c="View",d="Edit",f="Create",u=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"NAME",dataIndex:"name",key:"name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG FORMAT",dataIndex:"flag_format",key:"flag_format",ellipsis:!0},{title:"RANK",dataIndex:"rank",key:"rank",scopedSlots:{customRender:"rank"}},{title:"FILES",dataIndex:"files",key:"files",ellipsis:!0},{title:"PUSH TO CLIENT",dataIndex:"push_to_client",key:"push_to_client",scopedSlots:{customRender:"switchRender"}},{title:"NOTICE",dataIndex:"notice",key:"notice",scopedSlots:{customRender:"switchRender"}},{title:"Action",key:"action",scopedSlots:{customRender:"action"}}],p={files:[{required:!1,message:"please enter file name"}]},m={name:"MysqlRules",data:function(){return{store:l["store"],data:[],formVisible:!1,pagination:{current:1,showSizeChanger:!0,pageSize:l["store"].pageSize,onShowSizeChange:function(t,e){l["store"].pageSize=e}},filters:{},loading:!1,columns:u,form:{},rules:p,payloadKeys:[1],formReadOnly:!1,formAction:""}},methods:{handleTableChange:function(t,e,a){var o=Object(n["a"])({},this.pagination);o.current=t.current,this.pagination=o,this.order="ascend"===a.order?"asc":"desc",this.fetch()},fetch:function(){var t=this,e=Object(n["a"])(Object(n["a"])({},this.filters),{},{page:this.pagination.current,pageSize:this.pagination.pageSize,order:this.order});this.loading=!0,Object(r["i"])(e).then((function(e){var a=e.data.result;t.data=a.data;var o=Object(n["a"])({},t.pagination);o.total=a.count,t.pagination=o,t.loading=!1})).catch((function(e){t.$notification.error({message:"Unknown error: "+e.response.status,style:{width:"400px",marginLeft:"".concat(-265,"px")},duration:4})}))},clickSwitch:function(t,e){var a=this;t[e]=!t[e],Object(r["n"])(t).then().catch((function(t){a.$notification.error({message:"Edit failed",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))},addRule:function(){this.form={},this.showForm(f)},viewRule:function(t){this.form=t,this.showForm(c)},editRule:function(t){this.form=JSON.parse(JSON.stringify(t)),this.showForm(d)},deleteRule:function(t,e){var a=this;Object(r["d"])(t).then((function(){a.data.splice(e,1)})).catch((function(t){a.$notification.error({message:"Error",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))},showForm:function(t){for(var e in this.formAction=t,this.formReadOnly=t===c,this.formVisible=!0,this.form.payloads)this.form["Key-"+this.payloadKeys.length]=e,this.form["Value-"+this.payloadKeys.length]=this.form.payloads[e],this.addPayload();this.formReadOnly&&this.removePayload(this.payloadKeys.length)},closeDrawer:function(){this.formVisible=!1,this.payloadKeys=[1]},addPayload:function(){this.payloadKeys.push(this.payloadKeys[this.payloadKeys.length-1]+1)},removePayload:function(t){this.payloadKeys.length>1&&this.payloadKeys.splice(this.payloadKeys.indexOf(t),1)},handleSubmit:function(){var t=this;this.$refs.form.validate((function(e){if(e){var a={},o={};for(var i in t.form)if(0===i.indexOf("Key-")){var n=i.substr("Key-".length);t.form["Value-"+n]&&(a[t.form[i]]=t.form["Value-"+n])}else-1===i.indexOf("Value-")&&(o[i]=t.form[i]);o.payloads=a,Object(r["n"])(o).then((function(){t.closeDrawer(),t.fetch({page:t.pagination.current}),t.$notification.info({message:"Success",style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:2.5})})).catch((function(e){t.$notification.error({message:t.formAction+" failed",description:e.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))}}))},handleCancel:function(){this.form={},this.closeDrawer()}},mounted:function(){this.fetch({page:"1"})},components:{BasicRule:s["a"]}},h=m,y=(a("6a0a"),a("2877")),g=Object(y["a"])(h,o,i,!1,null,"4fed8448",null);e["default"]=g.exports},"10bb":function(t,e,a){},"6a0a":function(t,e,a){"use strict";a("10bb")}}]); \ No newline at end of file diff --git a/frontend/dist/js/chunk-1da7f23b.js b/frontend/dist/js/chunk-1da7f23b.js index 598b9fd..5faaf03 100644 --- a/frontend/dist/js/chunk-1da7f23b.js +++ b/frontend/dist/js/chunk-1da7f23b.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1da7f23b"],{"057f":function(t,e,r){var n=r("fc6a"),o=r("241c").f,i={}.toString,c="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return o(t)}catch(e){return c.slice()}};t.exports.f=function(t){return c&&"[object Window]"==i.call(t)?a(t):o(n(t))}},"159b":function(t,e,r){var n=r("da84"),o=r("fdbc"),i=r("17c2"),c=r("9112");for(var a in o){var f=n[a],s=f&&f.prototype;if(s&&s.forEach!==i)try{c(s,"forEach",i)}catch(u){s.forEach=i}}},"17c2":function(t,e,r){"use strict";var n=r("b727").forEach,o=r("a640"),i=o("forEach");t.exports=i?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},"1dde":function(t,e,r){var n=r("d039"),o=r("b622"),i=r("2d00"),c=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[],r=e.constructor={};return r[c]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"30d9":function(t,e,r){},"4de4":function(t,e,r){"use strict";var n=r("23e7"),o=r("b727").filter,i=r("1dde"),c=i("filter");n({target:"Array",proto:!0,forced:!c},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},5530:function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));r("b64b"),r("a4d3"),r("4de4"),r("e439"),r("159b"),r("dbb4");function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;ei)o.push(arguments[i++]);if(n=e,(p(e)||void 0!==t)&&!at(t))return d(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!at(e))return e}),o[1]=e,G.apply(null,o)}})}$[M][q]||D($[M],q,$[M].valueOf),K($,L),T[U]=!0},a640:function(t,e,r){"use strict";var n=r("d039");t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},b64b:function(t,e,r){var n=r("23e7"),o=r("7b0b"),i=r("df75"),c=r("d039"),a=c((function(){i(1)}));n({target:"Object",stat:!0,forced:a},{keys:function(t){return i(o(t))}})},b727:function(t,e,r){var n=r("0366"),o=r("44ad"),i=r("7b0b"),c=r("50c4"),a=r("65f0"),f=[].push,s=function(t){var e=1==t,r=2==t,s=3==t,u=4==t,l=6==t,d=7==t,p=5==t||l;return function(b,h,y,g){for(var m,v,w=i(b),O=o(w),S=n(h,y,3),j=c(O.length),x=0,E=g||a,I=e?E(b,j):r||d?E(b,0):void 0;j>x;x++)if((p||x in O)&&(m=O[x],v=S(m,x,w),t))if(e)I[x]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return x;case 2:f.call(I,m)}else switch(t){case 4:return!1;case 7:f.call(I,m)}return l?-1:s||u?u:I}};t.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterOut:s(7)}},db40:function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{padding:"8px"},attrs:{slot:"filterDropdown"},slot:"filterDropdown"},[r("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+t.column.dataIndex,value:t.selectedKeys[0]},on:{change:function(e){return t.setSelectedKeys(e.target.value?[e.target.value]:[])},pressEnter:function(){t.filters[t.column.dataIndex]=t.selectedKeys[0],t.fetch()}}}),r("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[t.column.dataIndex]=t.selectedKeys[0],t.fetch()}}},[t._v(" Search ")]),r("a-button",{staticStyle:{width:"90px"},attrs:{size:"small"},on:{click:function(){t.clearFilters(),delete t.filters[t.column.dataIndex],t.fetch()}}},[t._v(" Reset ")])],1)},o=[],i={name:"FilterDropdown",props:["setSelectedKeys","selectedKeys","clearFilters","column","filters","fetch"]},c=i,a=r("2877"),f=Object(a["a"])(c,n,o,!1,null,"5e6f101e",null);e["a"]=f.exports},dbb4:function(t,e,r){var n=r("23e7"),o=r("83ab"),i=r("56ef"),c=r("fc6a"),a=r("06cf"),f=r("8418");n({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){var e,r,n=c(t),o=a.f,s=i(n),u={},l=0;while(s.length>l)r=o(n,e=s[l++]),void 0!==r&&f(u,e,r);return u}})},dbbc:function(t,e,r){"use strict";r("30d9")},e439:function(t,e,r){var n=r("23e7"),o=r("d039"),i=r("fc6a"),c=r("06cf").f,a=r("83ab"),f=o((function(){c(1)})),s=!a||f;n({target:"Object",stat:!0,forced:s,sham:!a},{getOwnPropertyDescriptor:function(t,e){return c(i(t),e)}})},e5383:function(t,e,r){var n=r("b622");e.f=n},e5bf:function(t,e,r){"use strict";r.d(e,"c",(function(){return o})),r.d(e,"a",(function(){return i})),r.d(e,"d",(function(){return c})),r.d(e,"e",(function(){return a})),r.d(e,"b",(function(){return f}));var n=r("365c");function o(t){return Object(n["a"])({url:"/record/http",params:t,method:"get"})}function i(t){return Object(n["a"])({url:"/record/dns",params:t,method:"get"})}function c(t){return Object(n["a"])({url:"/record/mysql",params:t,method:"get"})}function a(t){return Object(n["a"])({url:"/record/rmi",params:t,method:"get"})}function f(t){return Object(n["a"])({url:"/record/ftp",params:t,method:"get"})}},e8b5:function(t,e,r){var n=r("c6b6");t.exports=Array.isArray||function(t){return"Array"==n(t)}},f889:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("a-table",{attrs:{columns:t.columns,"data-source":t.data,loading:t.loading,pagination:t.pagination,rowClassName:function(t,e){return e%2===0?"":"gray-table-row"}},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"filterDropdown",fn:function(e){var n=e.setSelectedKeys,o=e.selectedKeys,i=e.clearFilters,c=e.column;return r("filter-dropdown",{attrs:{"set-selected-keys":n,"selected-keys":o,"clear-filters":i,column:c,filters:t.filters,fetch:t.fetch}})}},{key:"filterIcon",fn:function(t){return r("a-icon",{style:{color:t?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"time",fn:function(e){return r("span",{},[t._v(" "+t._s(new Date(e).format("yyyy-MM-dd hh:mm:ss"))+" ")])}},{key:"method",fn:function(e){return r("span",{},[r("a-tag",{attrs:{color:t.colors[e]}},[t._v(" "+t._s(e.toUpperCase())+" ")])],1)}},{key:"expandedRowRender",fn:function(e){return r("code",{staticStyle:{margin:"0"}},[r("b",{staticStyle:{color:"gray"}},[t._v("RAW REQUEST:")]),r("br"),r("hr"),r("span",{staticStyle:{"white-space":"pre-line"}},[t._v(t._s(e.raw_request))])])}}])})},o=[],i=r("5530"),c=r("e5bf"),a=r("56d7"),f=r("db40"),s={GET:"#52c41a",POST:"#f5222d",PUT:"#eb2f96",HEAD:"#02a7ff",OPTIONS:"#13c2c2",DELETE:"#722ed1"},u=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"REQUEST TIME",dataIndex:"request_time",key:"request_time",scopedSlots:{customRender:"time"}},{title:"RULE",dataIndex:"rule_name",key:"rule_name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG",dataIndex:"flag",key:"flag",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"METHOD",dataIndex:"method",key:"method",scopedSlots:{customRender:"method",filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"PATH",dataIndex:"path",key:"path",ellipsis:!0,scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"REMOTE IP",key:"remote_ip",dataIndex:"remote_ip",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"IP AREA",key:"ip_area",dataIndex:"ip_area"}],l={name:"HttpLogs",data:function(){return{store:a["store"],data:[],pagination:{current:1,showSizeChanger:!0,pageSize:a["store"].pageSize,onShowSizeChange:function(t,e){a["store"].pageSize=e}},filters:{},order:"desc",loading:!1,columns:u,colors:s}},methods:{handleTableChange:function(t,e,r){var n=Object(i["a"])({},this.pagination);n.current=t.current,this.pagination=n,this.order="ascend"===r.order?"asc":"desc",this.fetch()},fetch:function(){var t=this,e=Object(i["a"])(Object(i["a"])({},this.filters),{},{page:this.pagination.current,pageSize:this.pagination.pageSize,order:this.order});this.loading=!0,Object(c["c"])(e).then((function(e){var r=e.data.result;t.data=r.data;var n=Object(i["a"])({},t.pagination);n.total=r.count,t.pagination=n,t.loading=!1})).catch((function(e){t.$notification.error({message:"Unknown error: "+e.response.status,style:{width:"100px",marginLeft:"".concat(-265,"px")},duration:4})}))}},mounted:function(){this.fetch()},components:{FilterDropdown:f["a"]}},d=l,p=(r("dbbc"),r("2877")),b=Object(p["a"])(d,n,o,!1,null,null,null);e["default"]=b.exports}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1da7f23b"],{"057f":function(t,e,r){var n=r("fc6a"),o=r("241c").f,i={}.toString,c="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return o(t)}catch(e){return c.slice()}};t.exports.f=function(t){return c&&"[object Window]"==i.call(t)?a(t):o(n(t))}},"159b":function(t,e,r){var n=r("da84"),o=r("fdbc"),i=r("17c2"),c=r("9112");for(var a in o){var s=n[a],f=s&&s.prototype;if(f&&f.forEach!==i)try{c(f,"forEach",i)}catch(u){f.forEach=i}}},"17c2":function(t,e,r){"use strict";var n=r("b727").forEach,o=r("a640"),i=o("forEach");t.exports=i?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},"1dde":function(t,e,r){var n=r("d039"),o=r("b622"),i=r("2d00"),c=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[],r=e.constructor={};return r[c]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"30d9":function(t,e,r){},"4de4":function(t,e,r){"use strict";var n=r("23e7"),o=r("b727").filter,i=r("1dde"),c=i("filter");n({target:"Array",proto:!0,forced:!c},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},5530:function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));r("b64b"),r("a4d3"),r("4de4"),r("e439"),r("159b"),r("dbb4");function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;ei)o.push(arguments[i++]);if(n=e,(p(e)||void 0!==t)&&!at(t))return d(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!at(e))return e}),o[1]=e,G.apply(null,o)}})}$[q][J]||D($[q],J,$[q].valueOf),K($,M),T[U]=!0},a640:function(t,e,r){"use strict";var n=r("d039");t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},b64b:function(t,e,r){var n=r("23e7"),o=r("7b0b"),i=r("df75"),c=r("d039"),a=c((function(){i(1)}));n({target:"Object",stat:!0,forced:a},{keys:function(t){return i(o(t))}})},b727:function(t,e,r){var n=r("0366"),o=r("44ad"),i=r("7b0b"),c=r("50c4"),a=r("65f0"),s=[].push,f=function(t){var e=1==t,r=2==t,f=3==t,u=4==t,l=6==t,d=7==t,p=5==t||l;return function(b,h,y,g){for(var m,v,w=i(b),O=o(w),S=n(h,y,3),j=c(O.length),x=0,E=g||a,I=e?E(b,j):r||d?E(b,0):void 0;j>x;x++)if((p||x in O)&&(m=O[x],v=S(m,x,w),t))if(e)I[x]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return x;case 2:s.call(I,m)}else switch(t){case 4:return!1;case 7:s.call(I,m)}return l?-1:f||u?u:I}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterOut:f(7)}},db40:function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{padding:"8px"},attrs:{slot:"filterDropdown"},slot:"filterDropdown"},[r("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+t.column.dataIndex,value:t.selectedKeys[0]},on:{change:function(e){return t.setSelectedKeys(e.target.value?[e.target.value]:[])},pressEnter:function(){t.filters[t.column.dataIndex]=t.selectedKeys[0],t.fetch()}}}),r("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[t.column.dataIndex]=t.selectedKeys[0],t.fetch()}}},[t._v(" Search ")]),r("a-button",{staticStyle:{width:"90px"},attrs:{size:"small"},on:{click:function(){t.clearFilters(),delete t.filters[t.column.dataIndex],t.fetch()}}},[t._v(" Reset ")])],1)},o=[],i={name:"FilterDropdown",props:["setSelectedKeys","selectedKeys","clearFilters","column","filters","fetch"]},c=i,a=r("2877"),s=Object(a["a"])(c,n,o,!1,null,"5e6f101e",null);e["a"]=s.exports},dbb4:function(t,e,r){var n=r("23e7"),o=r("83ab"),i=r("56ef"),c=r("fc6a"),a=r("06cf"),s=r("8418");n({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){var e,r,n=c(t),o=a.f,f=i(n),u={},l=0;while(f.length>l)r=o(n,e=f[l++]),void 0!==r&&s(u,e,r);return u}})},dbbc:function(t,e,r){"use strict";r("30d9")},e439:function(t,e,r){var n=r("23e7"),o=r("d039"),i=r("fc6a"),c=r("06cf").f,a=r("83ab"),s=o((function(){c(1)})),f=!a||s;n({target:"Object",stat:!0,forced:f,sham:!a},{getOwnPropertyDescriptor:function(t,e){return c(i(t),e)}})},e5383:function(t,e,r){var n=r("b622");e.f=n},e5bf:function(t,e,r){"use strict";r.d(e,"c",(function(){return o})),r.d(e,"a",(function(){return i})),r.d(e,"d",(function(){return c})),r.d(e,"e",(function(){return a})),r.d(e,"b",(function(){return s}));var n=r("365c");function o(t){return Object(n["a"])({url:"/record/http",params:t,method:"get"})}function i(t){return Object(n["a"])({url:"/record/dns",params:t,method:"get"})}function c(t){return Object(n["a"])({url:"/record/mysql",params:t,method:"get"})}function a(t){return Object(n["a"])({url:"/record/rmi",params:t,method:"get"})}function s(t){return Object(n["a"])({url:"/record/ftp",params:t,method:"get"})}},e8b5:function(t,e,r){var n=r("c6b6");t.exports=Array.isArray||function(t){return"Array"==n(t)}},f889:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("a-table",{staticStyle:{"overflow-x":"auto"},attrs:{columns:t.columns,"data-source":t.data,loading:t.loading,pagination:t.pagination,rowClassName:function(t,e){return e%2===0?"":"gray-table-row"}},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"filterDropdown",fn:function(e){var n=e.setSelectedKeys,o=e.selectedKeys,i=e.clearFilters,c=e.column;return r("filter-dropdown",{attrs:{"set-selected-keys":n,"selected-keys":o,"clear-filters":i,column:c,filters:t.filters,fetch:t.fetch}})}},{key:"filterIcon",fn:function(t){return r("a-icon",{style:{color:t?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"time",fn:function(e){return r("span",{},[t._v(" "+t._s(new Date(e).format("yyyy-MM-dd hh:mm:ss"))+" ")])}},{key:"method",fn:function(e){return r("span",{},[r("a-tag",{attrs:{color:t.colors[e]}},[t._v(" "+t._s(e.toUpperCase())+" ")])],1)}},{key:"expandedRowRender",fn:function(e){return r("code",{staticStyle:{margin:"0"}},[r("b",{staticStyle:{color:"gray"}},[t._v("RAW REQUEST:")]),r("br"),r("hr"),r("span",{staticStyle:{"white-space":"pre-line"}},[t._v(t._s(e.raw_request))])])}}])})},o=[],i=r("5530"),c=r("e5bf"),a=r("56d7"),s=r("db40"),f={GET:"#52c41a",POST:"#f5222d",PUT:"#eb2f96",HEAD:"#02a7ff",OPTIONS:"#13c2c2",DELETE:"#722ed1"},u=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"REQUEST TIME",dataIndex:"request_time",key:"request_time",scopedSlots:{customRender:"time"}},{title:"RULE",dataIndex:"rule_name",key:"rule_name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG",dataIndex:"flag",key:"flag",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"METHOD",dataIndex:"method",key:"method",scopedSlots:{customRender:"method",filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"URI",dataIndex:"uri",key:"uri",ellipsis:!0,scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"REMOTE IP",key:"remote_ip",dataIndex:"remote_ip",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"IP AREA",key:"ip_area",dataIndex:"ip_area"}],l={name:"HttpLogs",data:function(){return{store:a["store"],data:[],pagination:{current:1,showSizeChanger:!0,pageSize:a["store"].pageSize,onShowSizeChange:function(t,e){a["store"].pageSize=e}},filters:{},order:"desc",loading:!1,columns:u,colors:f}},methods:{handleTableChange:function(t,e,r){var n=Object(i["a"])({},this.pagination);n.current=t.current,this.pagination=n,this.order="ascend"===r.order?"asc":"desc",this.fetch()},fetch:function(){var t=this,e=Object(i["a"])(Object(i["a"])({},this.filters),{},{page:this.pagination.current,pageSize:this.pagination.pageSize,order:this.order});this.loading=!0,Object(c["c"])(e).then((function(e){var r=e.data.result;t.data=r.data;var n=Object(i["a"])({},t.pagination);n.total=r.count,t.pagination=n,t.loading=!1})).catch((function(e){403!==e.response.status&&t.$message.error("Unknown error with status code: "+e.response.status)}))}},mounted:function(){this.fetch()},components:{FilterDropdown:s["a"]}},d=l,p=(r("dbbc"),r("2877")),b=Object(p["a"])(d,n,o,!1,null,null,null);e["default"]=b.exports}}]); \ No newline at end of file diff --git a/frontend/dist/js/chunk-247d6284.js b/frontend/dist/js/chunk-247d6284.js new file mode 100644 index 0000000..7fc7477 --- /dev/null +++ b/frontend/dist/js/chunk-247d6284.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-247d6284"],{"3df5":function(e,t,a){},"7bfc":function(e,t,a){"use strict";a("3df5")},"9520c":function(e,t,a){"use strict";a.r(t);var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("a-button",{attrs:{id:"add-rule",type:"primary"},on:{click:e.addRule}},[a("a-icon",{attrs:{type:"plus"}}),e._v(" New Rule ")],1),a("a-drawer",{attrs:{title:e.formAction+" HTTP rule",width:490,visible:e.formVisible,"body-style":{paddingBottom:"80px"}},on:{close:e.closeDrawer}},[a("a-form-model",{ref:"form",attrs:{model:e.form,layout:"vertical"},on:{submit:e.handleSubmit}},[a("BasicRule",{attrs:{form:e.form,readOnly:e.formReadOnly,flagFormat:"raw message"}}),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:24}},[a("a-form-model-item",{attrs:{rules:e.rules.response_status_code,prop:"response_status_code"}},[a("span",{attrs:{slot:"label"},slot:"label"},[e._v(" Response Status Code "),a("a-tooltip",{attrs:{title:"Number between 100-600, or template such as ${query.varname}/${body.varname}/${header.varname}"}},[a("a-icon",{attrs:{type:"question-circle-o"}})],1)],1),a("a-input",{staticStyle:{width:"100%"},attrs:{placeholder:"200",disabled:e.formReadOnly},model:{value:e.form.response_status_code,callback:function(t){e.$set(e.form,"response_status_code",t)},expression:"form.response_status_code"}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:24}},[a("a-form-model-item",[a("span",{attrs:{slot:"label"},slot:"label"},[e._v(" Response Headers "),a("a-tooltip",{attrs:{title:"Support template such as ${query.varname}/${body.varname}/${header.varname}"}},[a("a-icon",{attrs:{type:"question-circle-o"}})],1)],1),e._l(e.headerKeys,(function(t){return a("a-input-group",{key:t,attrs:{compact:""}},[a("a-auto-complete",{directives:[{name:"decorator",rawName:"v-decorator",value:["Header-"+t],expression:"['Header-'+headerKey,]"}],staticStyle:{width:"47%","margin-bottom":"5px"},attrs:{dataSource:e.headerSet,filterOption:e.filterOption,defaultOpen:!1,placeholder:"Header",disabled:e.formReadOnly},model:{value:e.form["Header-"+t],callback:function(a){e.$set(e.form,"Header-"+t,a)},expression:"form['Header-'+headerKey]"}}),a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["Value-"+t],expression:"['Value-'+headerKey,]"}],staticStyle:{width:"53%"},attrs:{placeholder:"Value",disabled:e.formReadOnly},on:{focus:function(){!e.formReadOnly&&t===e.headerKeys[e.headerKeys.length-1]&&e.form["Header-"+t]&&e.addHeader()}},model:{value:e.form["Value-"+t],callback:function(a){e.$set(e.form,"Value-"+t,a)},expression:"form['Value-'+headerKey]"}},[a("a-icon",{staticClass:"dynamic-delete-button",attrs:{slot:"addonAfter",type:"minus-circle-o"},on:{click:function(){return e.formReadOnly?null:e.removeHeader(t)}},slot:"addonAfter"})],1)],1)}))],2)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:24}},[a("a-form-model-item",[a("span",{attrs:{slot:"label"},slot:"label"},[e._v(" Response Body "),a("a-tooltip",{attrs:{title:"Support template such as ${query.varname}/${body.varname}/${header.varname}"}},[a("a-icon",{attrs:{type:"question-circle-o"}})],1)],1),a("a-icon",{staticClass:"full-screen-icon",attrs:{type:"fullscreen"},on:{click:function(t){e.fullScreenTextarea=!0}}}),a("a-textarea",{attrs:{placeholder:"Hello RevSuit!",readOnly:e.formReadOnly,"auto-size":{minRows:10,maxRows:30}},model:{value:e.form.response_body,callback:function(t){e.$set(e.form,"response_body",t)},expression:"form.response_body"}}),a("a-modal",{attrs:{"dialog-style":{top:"40px",bottom:"20px"},width:"80rem",visible:e.fullScreenTextarea,title:"Response Body",okText:""},on:{ok:function(t){e.fullScreenTextarea=!1},cancel:function(t){e.fullScreenTextarea=!1}}},[a("a-textarea",{staticStyle:{height:"100%"},attrs:{placeholder:"Hello RevSuit!",readOnly:e.formReadOnly,"auto-size":{minRows:e.fullScreenTextareaMinRows(),maxRows:1.5*e.fullScreenTextareaMinRows()}},model:{value:e.form.response_body,callback:function(t){e.$set(e.form,"response_body",t)},expression:"form.response_body"}})],1)],1)],1)],1)],1),a("div",{style:{position:"absolute",right:0,bottom:0,width:"100%",borderTop:"1px solid #e9e9e9",padding:"10px 16px",background:"#fff",textAlign:"right",zIndex:1}},[a("a-button",{style:{marginRight:"8px"},on:{click:e.handleCancel}},[e._v(" Cancel ")]),a("a-button",{attrs:{type:"primary",disabled:e.formReadOnly},on:{click:e.handleSubmit}},[e._v(" Submit ")])],1)],1),a("a-table",{staticStyle:{"overflow-x":"auto"},attrs:{columns:e.columns,"data-source":e.data,loading:e.loading,pagination:e.pagination},on:{change:e.handleTableChange},scopedSlots:e._u([{key:"filterDropdown",fn:function(t){var o=t.setSelectedKeys,r=t.selectedKeys,n=(t.clearFilters,t.column);return a("div",{staticStyle:{padding:"8px"}},[a("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+n.dataIndex,value:r[0]},on:{change:function(e){return o(e.target.value?[e.target.value]:[])},pressEnter:function(){e.filters[n.dataIndex]=r[0],e.fetch()}}}),a("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){e.filters[n.dataIndex]=r[0],e.fetch()}}},[e._v(" Search ")])],1)}},{key:"filterIcon",fn:function(e){return a("a-icon",{style:{color:e?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"rank",fn:function(t){return a("span",{},[a("a-tag",{attrs:{color:"#"+(2996213+80*t).toString(16)}},[e._v(" "+e._s(t)+" ")])],1)}},{key:"switchRender",fn:function(t,o,r,n){return a("span",{},[a("a-switch",{attrs:{checked:t},on:{click:function(t){return e.clickSwitch(o,n.dataIndex)}}})],1)}},{key:"action",fn:function(t,o,r){return a("span",{},[a("a-button",{staticStyle:{color:"#67C23A","background-color":"transparent","border-color":"#67C23A","text-shadow":"none",margin:"0 10px 3px 0"},attrs:{size:"small",ghost:""},on:{click:function(t){return e.viewRule(o)}}},[e._v("View")]),a("a-button",{staticStyle:{color:"#909399","background-color":"transparent","border-color":"#909399","text-shadow":"none",margin:"0 10px 3px 0"},attrs:{size:"small",ghost:""},on:{click:function(t){return e.editRule(o,r)}}},[e._v("Edit")]),a("a-popconfirm",{attrs:{title:"Are you sure delete this task?","ok-text":"Yes","cancel-text":"No"},on:{confirm:function(t){return e.deleteRule(o,r)}}},[a("a-button",{attrs:{type:"danger",size:"small",ghost:""}},[e._v("Delete")])],1)],1)}}])})],1)},r=[],n=a("5530"),s=(a("a434"),a("fb6a"),a("34c6")),i=a("56d7"),l=a("2084"),c="View",d="Edit",u="Create",f=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"NAME",dataIndex:"name",key:"name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG FORMAT",dataIndex:"flag_format",key:"flag_format",ellipsis:!0},{title:"RANK",dataIndex:"rank",key:"rank",scopedSlots:{customRender:"rank"}},{title:"PUSH TO CLIENT",dataIndex:"push_to_client",key:"push_to_client",scopedSlots:{customRender:"switchRender"}},{title:"NOTICE",dataIndex:"notice",key:"notice",scopedSlots:{customRender:"switchRender"}},{title:"Action",key:"action",scopedSlots:{customRender:"action"}}],p={response_status_code:[{validator:function(e,t,a){return void 0===t||!isNaN(t)&&1001&&this.headerKeys.splice(this.headerKeys.indexOf(e),1)},filterOption:function(e,t){return t.componentOptions.children[0].text.toUpperCase().indexOf(e.toUpperCase())>=0},handleSubmit:function(){var e=this;this.$refs.form.validate((function(t){if(!t)return!1;var a={},o={};for(var r in e.form)if(0===r.indexOf("Header-")){var n=r.substr("Header-".length);e.form["Value-"+n]&&(o[e.form[r]]=e.form["Value-"+n])}else-1===r.indexOf("Value-")&&(a[r]=e.form[r]);a.response_headers=o,Object(s["m"])(a).then((function(){e.closeDrawer(),e.fetch({page:e.pagination.current}),e.$notification.info({message:"Success",style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:2.5})})).catch((function(t){e.$notification.error({message:e.formAction+" failed",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))}))},handleCancel:function(){this.form={},this.closeDrawer()},fullScreenTextareaMinRows:function(){return document.body.clientHeight/window.getComputedStyle(document.body)["fontSize"].slice(0,-2)*.5}},mounted:function(){this.fetch({page:"1"})},components:{BasicRule:l["a"]}},m=h,y=(a("7bfc"),a("2877")),g=Object(y["a"])(m,o,r,!1,null,"1f4c0376",null);t["default"]=g.exports},fb6a:function(e,t,a){"use strict";var o=a("23e7"),r=a("861d"),n=a("e8b5"),s=a("23cb"),i=a("50c4"),l=a("fc6a"),c=a("8418"),d=a("b622"),u=a("1dde"),f=u("slice"),p=d("species"),h=[].slice,m=Math.max;o({target:"Array",proto:!0,forced:!f},{slice:function(e,t){var a,o,d,u=l(this),f=i(u.length),y=s(e,f),g=s(void 0===t?f:t,f);if(n(u)&&(a=u.constructor,"function"!=typeof a||a!==Array&&!n(a.prototype)?r(a)&&(a=a[p],null===a&&(a=void 0)):a=void 0,a===Array||void 0===a))return h.call(u,y,g);for(o=new(void 0===a?Array:a)(m(g-y,0)),d=0;y1?arguments[1]:void 0)}},"1dde":function(t,e,r){var n=r("d039"),o=r("b622"),i=r("2d00"),c=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[],r=e.constructor={};return r[c]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"4de4":function(t,e,r){"use strict";var n=r("23e7"),o=r("b727").filter,i=r("1dde"),c=i("filter");n({target:"Array",proto:!0,forced:!c},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},5530:function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));r("b64b"),r("a4d3"),r("4de4"),r("e439"),r("159b"),r("dbb4");function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;ei)o.push(arguments[i++]);if(n=e,(p(e)||void 0!==t)&&!at(t))return d(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!at(e))return e}),o[1]=e,G.apply(null,o)}})}B[M][q]||D(B[M],q,B[M].valueOf),R(B,L),A[J]=!0},a640:function(t,e,r){"use strict";var n=r("d039");t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},b64b:function(t,e,r){var n=r("23e7"),o=r("7b0b"),i=r("df75"),c=r("d039"),a=c((function(){i(1)}));n({target:"Object",stat:!0,forced:a},{keys:function(t){return i(o(t))}})},b727:function(t,e,r){var n=r("0366"),o=r("44ad"),i=r("7b0b"),c=r("50c4"),a=r("65f0"),f=[].push,s=function(t){var e=1==t,r=2==t,s=3==t,u=4==t,l=6==t,d=7==t,p=5==t||l;return function(b,h,y,g){for(var m,v,w=i(b),O=o(w),S=n(h,y,3),j=c(O.length),x=0,I=g||a,k=e?I(b,j):r||d?I(b,0):void 0;j>x;x++)if((p||x in O)&&(m=O[x],v=S(m,x,w),t))if(e)k[x]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return x;case 2:f.call(k,m)}else switch(t){case 4:return!1;case 7:f.call(k,m)}return l?-1:s||u?u:k}};t.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterOut:s(7)}},db40:function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{padding:"8px"},attrs:{slot:"filterDropdown"},slot:"filterDropdown"},[r("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+t.column.dataIndex,value:t.selectedKeys[0]},on:{change:function(e){return t.setSelectedKeys(e.target.value?[e.target.value]:[])},pressEnter:function(){t.filters[t.column.dataIndex]=t.selectedKeys[0],t.fetch()}}}),r("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[t.column.dataIndex]=t.selectedKeys[0],t.fetch()}}},[t._v(" Search ")]),r("a-button",{staticStyle:{width:"90px"},attrs:{size:"small"},on:{click:function(){t.clearFilters(),delete t.filters[t.column.dataIndex],t.fetch()}}},[t._v(" Reset ")])],1)},o=[],i={name:"FilterDropdown",props:["setSelectedKeys","selectedKeys","clearFilters","column","filters","fetch"]},c=i,a=r("2877"),f=Object(a["a"])(c,n,o,!1,null,"5e6f101e",null);e["a"]=f.exports},dbb4:function(t,e,r){var n=r("23e7"),o=r("83ab"),i=r("56ef"),c=r("fc6a"),a=r("06cf"),f=r("8418");n({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){var e,r,n=c(t),o=a.f,s=i(n),u={},l=0;while(s.length>l)r=o(n,e=s[l++]),void 0!==r&&f(u,e,r);return u}})},e439:function(t,e,r){var n=r("23e7"),o=r("d039"),i=r("fc6a"),c=r("06cf").f,a=r("83ab"),f=o((function(){c(1)})),s=!a||f;n({target:"Object",stat:!0,forced:s,sham:!a},{getOwnPropertyDescriptor:function(t,e){return c(i(t),e)}})},e5383:function(t,e,r){var n=r("b622");e.f=n},e5bf:function(t,e,r){"use strict";r.d(e,"c",(function(){return o})),r.d(e,"a",(function(){return i})),r.d(e,"d",(function(){return c})),r.d(e,"e",(function(){return a})),r.d(e,"b",(function(){return f}));var n=r("365c");function o(t){return Object(n["a"])({url:"/record/http",params:t,method:"get"})}function i(t){return Object(n["a"])({url:"/record/dns",params:t,method:"get"})}function c(t){return Object(n["a"])({url:"/record/mysql",params:t,method:"get"})}function a(t){return Object(n["a"])({url:"/record/rmi",params:t,method:"get"})}function f(t){return Object(n["a"])({url:"/record/ftp",params:t,method:"get"})}},e8b5:function(t,e,r){var n=r("c6b6");t.exports=Array.isArray||function(t){return"Array"==n(t)}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-330a7e95"],{"057f":function(t,e,r){var n=r("fc6a"),o=r("241c").f,i={}.toString,c="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return o(t)}catch(e){return c.slice()}};t.exports.f=function(t){return c&&"[object Window]"==i.call(t)?a(t):o(n(t))}},"159b":function(t,e,r){var n=r("da84"),o=r("fdbc"),i=r("17c2"),c=r("9112");for(var a in o){var s=n[a],f=s&&s.prototype;if(f&&f.forEach!==i)try{c(f,"forEach",i)}catch(u){f.forEach=i}}},"17c2":function(t,e,r){"use strict";var n=r("b727").forEach,o=r("a640"),i=o("forEach");t.exports=i?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},"1dde":function(t,e,r){var n=r("d039"),o=r("b622"),i=r("2d00"),c=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[],r=e.constructor={};return r[c]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"4de4":function(t,e,r){"use strict";var n=r("23e7"),o=r("b727").filter,i=r("1dde"),c=i("filter");n({target:"Array",proto:!0,forced:!c},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},5530:function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));r("b64b"),r("a4d3"),r("4de4"),r("e439"),r("159b"),r("dbb4");function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;ei)o.push(arguments[i++]);if(n=e,(p(e)||void 0!==t)&&!at(t))return d(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!at(e))return e}),o[1]=e,G.apply(null,o)}})}B[q][L]||D(B[q],L,B[q].valueOf),R(B,M),A[J]=!0},a640:function(t,e,r){"use strict";var n=r("d039");t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},b64b:function(t,e,r){var n=r("23e7"),o=r("7b0b"),i=r("df75"),c=r("d039"),a=c((function(){i(1)}));n({target:"Object",stat:!0,forced:a},{keys:function(t){return i(o(t))}})},b727:function(t,e,r){var n=r("0366"),o=r("44ad"),i=r("7b0b"),c=r("50c4"),a=r("65f0"),s=[].push,f=function(t){var e=1==t,r=2==t,f=3==t,u=4==t,l=6==t,d=7==t,p=5==t||l;return function(b,h,y,g){for(var m,v,w=i(b),O=o(w),S=n(h,y,3),j=c(O.length),x=0,I=g||a,k=e?I(b,j):r||d?I(b,0):void 0;j>x;x++)if((p||x in O)&&(m=O[x],v=S(m,x,w),t))if(e)k[x]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return x;case 2:s.call(k,m)}else switch(t){case 4:return!1;case 7:s.call(k,m)}return l?-1:f||u?u:k}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterOut:f(7)}},db40:function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{padding:"8px"},attrs:{slot:"filterDropdown"},slot:"filterDropdown"},[r("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+t.column.dataIndex,value:t.selectedKeys[0]},on:{change:function(e){return t.setSelectedKeys(e.target.value?[e.target.value]:[])},pressEnter:function(){t.filters[t.column.dataIndex]=t.selectedKeys[0],t.fetch()}}}),r("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[t.column.dataIndex]=t.selectedKeys[0],t.fetch()}}},[t._v(" Search ")]),r("a-button",{staticStyle:{width:"90px"},attrs:{size:"small"},on:{click:function(){t.clearFilters(),delete t.filters[t.column.dataIndex],t.fetch()}}},[t._v(" Reset ")])],1)},o=[],i={name:"FilterDropdown",props:["setSelectedKeys","selectedKeys","clearFilters","column","filters","fetch"]},c=i,a=r("2877"),s=Object(a["a"])(c,n,o,!1,null,"5e6f101e",null);e["a"]=s.exports},dbb4:function(t,e,r){var n=r("23e7"),o=r("83ab"),i=r("56ef"),c=r("fc6a"),a=r("06cf"),s=r("8418");n({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){var e,r,n=c(t),o=a.f,f=i(n),u={},l=0;while(f.length>l)r=o(n,e=f[l++]),void 0!==r&&s(u,e,r);return u}})},e439:function(t,e,r){var n=r("23e7"),o=r("d039"),i=r("fc6a"),c=r("06cf").f,a=r("83ab"),s=o((function(){c(1)})),f=!a||s;n({target:"Object",stat:!0,forced:f,sham:!a},{getOwnPropertyDescriptor:function(t,e){return c(i(t),e)}})},e5383:function(t,e,r){var n=r("b622");e.f=n},e5bf:function(t,e,r){"use strict";r.d(e,"c",(function(){return o})),r.d(e,"a",(function(){return i})),r.d(e,"d",(function(){return c})),r.d(e,"e",(function(){return a})),r.d(e,"b",(function(){return s}));var n=r("365c");function o(t){return Object(n["a"])({url:"/record/http",params:t,method:"get"})}function i(t){return Object(n["a"])({url:"/record/dns",params:t,method:"get"})}function c(t){return Object(n["a"])({url:"/record/mysql",params:t,method:"get"})}function a(t){return Object(n["a"])({url:"/record/rmi",params:t,method:"get"})}function s(t){return Object(n["a"])({url:"/record/ftp",params:t,method:"get"})}},e8b5:function(t,e,r){var n=r("c6b6");t.exports=Array.isArray||function(t){return"Array"==n(t)}}}]); \ No newline at end of file diff --git a/frontend/dist/js/chunk-36391b77.js b/frontend/dist/js/chunk-36391b77.js deleted file mode 100644 index 0c7eb0e..0000000 --- a/frontend/dist/js/chunk-36391b77.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-36391b77"],{"69a3":function(t,e,n){},"952a":function(t,e,n){"use strict";n("69a3")},ac60:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("a-button",{attrs:{id:"add-rule",type:"primary"},on:{click:t.addRule}},[n("a-icon",{attrs:{type:"plus"}}),t._v(" New Rule ")],1),n("a-drawer",{attrs:{title:t.formAction+" RMI rule",width:490,visible:t.formVisible,"body-style":{paddingBottom:"80px"}},on:{close:t.closeDrawer}},[n("a-form-model",{ref:"form",attrs:{model:t.form,layout:"vertical"},on:{submit:t.handleSubmit}},[n("BasicRule",{attrs:{form:t.form,readOnly:t.formReadOnly}})],1),n("div",{style:{position:"absolute",right:0,bottom:0,width:"100%",borderTop:"1px solid #e9e9e9",padding:"10px 16px",background:"#fff",textAlign:"right",zIndex:1}},[n("a-button",{style:{marginRight:"8px"},on:{click:t.handleCancel}},[t._v(" Cancel ")]),n("a-button",{attrs:{type:"primary",disabled:t.formReadOnly},on:{click:t.handleSubmit}},[t._v(" Submit ")])],1)],1),n("a-table",{attrs:{columns:t.columns,"data-source":t.data,loading:t.loading,pagination:t.pagination},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"filterDropdown",fn:function(e){var a=e.setSelectedKeys,o=e.selectedKeys,i=(e.clearFilters,e.column);return n("div",{staticStyle:{padding:"8px"}},[n("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+i.dataIndex,value:o[0]},on:{change:function(t){return a(t.target.value?[t.target.value]:[])},pressEnter:function(){t.filters[i.dataIndex]=o[0],t.fetch()}}}),n("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[i.dataIndex]=o[0],t.fetch()}}},[t._v(" Search ")])],1)}},{key:"filterIcon",fn:function(t){return n("a-icon",{style:{color:t?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"rank",fn:function(e){return n("span",{},[n("a-tag",{attrs:{color:"#"+(2996213+80*e).toString(16)}},[t._v(" "+t._s(e)+" ")])],1)}},{key:"switchRender",fn:function(e,a,o,i){return n("span",{},[n("a-switch",{attrs:{checked:e},on:{click:function(e){return t.clickSwitch(a,i.dataIndex)}}})],1)}},{key:"valueRender",fn:function(e){return n("span",{},t._l(e.split(","),(function(e){return n("span",{key:e},[t._v(t._s(e)),n("br")])})),0)}},{key:"action",fn:function(e,a,o){return n("span",{},[n("a-button",{staticStyle:{color:"#67C23A","background-color":"transparent","border-color":"#67C23A","text-shadow":"none",margin:"0 10px 3px 0"},attrs:{size:"small",ghost:""},on:{click:function(e){return t.viewRule(a)}}},[t._v("View")]),n("a-button",{staticStyle:{color:"#909399","background-color":"transparent","border-color":"#909399","text-shadow":"none",margin:"0 10px 3px 0"},attrs:{size:"small",ghost:""},on:{click:function(e){return t.editRule(a,o)}}},[t._v("Edit")]),n("a-popconfirm",{attrs:{title:"Are you sure delete this task?","ok-text":"Yes","cancel-text":"No"},on:{confirm:function(e){return t.deleteRule(a,o)}}},[n("a-button",{attrs:{type:"danger",size:"small",ghost:""}},[t._v("Delete")])],1)],1)}}])})],1)},o=[],i=n("5530"),r=(n("a434"),n("34c6")),c=n("56d7"),s=n("2084"),l="View",d="Edit",u="Create",f=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"NAME",dataIndex:"name",key:"name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG FORMAT",dataIndex:"flag_format",key:"flag_format",ellipsis:!0},{title:"RANK",dataIndex:"rank",key:"rank",scopedSlots:{customRender:"rank"}},{title:"PUSH TO CLIENT",dataIndex:"push_to_client",key:"push_to_client",scopedSlots:{customRender:"switchRender"}},{title:"NOTICE",dataIndex:"notice",key:"notice",scopedSlots:{customRender:"switchRender"}},{title:"Action",key:"action",scopedSlots:{customRender:"action"}}],p={name:"RmiRules",data:function(){return{store:c["store"],data:[],formVisible:!1,pagination:{current:1,showSizeChanger:!0,pageSize:c["store"].pageSize,onShowSizeChange:function(t,e){c["store"].pageSize=e}},filters:{},loading:!1,columns:f,form:{},formReadOnly:!1,formAction:""}},methods:{handleTableChange:function(t,e,n){var a=Object(i["a"])({},this.pagination);a.current=t.current,this.pagination=a,this.order="ascend"===n.order?"asc":"desc",this.fetch()},fetch:function(){var t=this,e=Object(i["a"])(Object(i["a"])({},this.filters),{},{page:this.pagination.current,pageSize:this.pagination.pageSize,order:this.order});this.loading=!0,Object(r["j"])(e).then((function(e){var n=e.data.result;t.data=n.data;var a=Object(i["a"])({},t.pagination);a.total=n.count,t.pagination=a,t.loading=!1})).catch((function(e){t.$notification.error({message:"Unknown error: "+e.response.status,style:{width:"100px",marginLeft:"".concat(-265,"px")},duration:4})}))},clickSwitch:function(t,e){var n=this;t[e]=!t[e],Object(r["o"])(t).then().catch((function(t){n.$notification.error({message:"Edit failed",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))},addRule:function(){this.form={},this.showForm(u)},viewRule:function(t){this.form=t,this.showForm(l)},editRule:function(t){this.form=JSON.parse(JSON.stringify(t)),this.showForm(d)},deleteRule:function(t,e){var n=this;Object(r["e"])(t).then((function(){n.data.splice(e,1)})).catch((function(t){n.$notification.error({message:"Error",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))},showForm:function(t){this.formAction=t,this.formReadOnly=t===l,this.formVisible=!0},closeDrawer:function(){this.formVisible=!1},handleSubmit:function(){var t=this;this.$refs.form.validate((function(e){e&&Object(r["o"])(t.form).then((function(){t.closeDrawer(),t.fetch({page:t.pagination.current}),t.$notification.info({message:"Success",style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:2.5})})).catch((function(e){t.$notification.error({message:t.formAction+" failed",description:e.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))}))},handleCancel:function(){this.form={},this.closeDrawer()}},mounted:function(){this.fetch({page:"1"})},components:{BasicRule:s["a"]}},h=p,m=(n("952a"),n("2877")),g=Object(m["a"])(h,a,o,!1,null,"ae6501fc",null);e["default"]=g.exports}}]); \ No newline at end of file diff --git a/frontend/dist/js/chunk-3d13e56e.js b/frontend/dist/js/chunk-3d13e56e.js index eb45743..836da2d 100644 --- a/frontend/dist/js/chunk-3d13e56e.js +++ b/frontend/dist/js/chunk-3d13e56e.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3d13e56e"],{"057f":function(t,e,r){var n=r("fc6a"),o=r("241c").f,i={}.toString,c="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return o(t)}catch(e){return c.slice()}};t.exports.f=function(t){return c&&"[object Window]"==i.call(t)?a(t):o(n(t))}},"159b":function(t,e,r){var n=r("da84"),o=r("fdbc"),i=r("17c2"),c=r("9112");for(var a in o){var s=n[a],f=s&&s.prototype;if(f&&f.forEach!==i)try{c(f,"forEach",i)}catch(u){f.forEach=i}}},"17c2":function(t,e,r){"use strict";var n=r("b727").forEach,o=r("a640"),i=o("forEach");t.exports=i?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},"1dde":function(t,e,r){var n=r("d039"),o=r("b622"),i=r("2d00"),c=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[],r=e.constructor={};return r[c]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"382b":function(t,e,r){},"430c":function(t,e,r){"use strict";r("382b")},"4de4":function(t,e,r){"use strict";var n=r("23e7"),o=r("b727").filter,i=r("1dde"),c=i("filter");n({target:"Array",proto:!0,forced:!c},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},5530:function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));r("b64b"),r("a4d3"),r("4de4"),r("e439"),r("159b"),r("dbb4");function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;ei)o.push(arguments[i++]);if(n=e,(p(e)||void 0!==t)&&!at(t))return d(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!at(e))return e}),o[1]=e,W.apply(null,o)}})}Q[U][M]||j(Q[U],M,Q[U].valueOf),H(Q,L),A[z]=!0},a640:function(t,e,r){"use strict";var n=r("d039");t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},b64b:function(t,e,r){var n=r("23e7"),o=r("7b0b"),i=r("df75"),c=r("d039"),a=c((function(){i(1)}));n({target:"Object",stat:!0,forced:a},{keys:function(t){return i(o(t))}})},b727:function(t,e,r){var n=r("0366"),o=r("44ad"),i=r("7b0b"),c=r("50c4"),a=r("65f0"),s=[].push,f=function(t){var e=1==t,r=2==t,f=3==t,u=4==t,l=6==t,d=7==t,p=5==t||l;return function(h,b,y,g){for(var m,v,w=i(h),S=o(w),O=n(b,y,3),I=c(S.length),x=0,D=g||a,k=e?D(h,I):r||d?D(h,0):void 0;I>x;x++)if((p||x in S)&&(m=S[x],v=O(m,x,w),t))if(e)k[x]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return x;case 2:s.call(k,m)}else switch(t){case 4:return!1;case 7:s.call(k,m)}return l?-1:f||u?u:k}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterOut:f(7)}},c5bf:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("a-table",{attrs:{columns:t.columns,"data-source":t.data,loading:t.loading,pagination:t.pagination,rowClassName:function(t,e){return e%2===0?"":"gray-table-row"}},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"selectDropdown",fn:function(e){e.setSelectedKeys,e.selectedKeys,e.clearFilters;var n=e.column;return r("div",{staticStyle:{padding:"8px"}},[r("a-checkbox",{attrs:{checked:"CRASHED"===t.filters[n.dataIndex]},on:{change:function(e){e.target.checked?t.filters[n.dataIndex]="CRASHED":t.filters[n.dataIndex]="",t.fetch()}}},[t._v(" CRASHED ")]),r("br"),r("a-checkbox",{attrs:{checked:"FINISHED"===t.filters[n.dataIndex]},on:{change:function(e){e.target.checked?t.filters[n.dataIndex]="FINISHED":t.filters[n.dataIndex]="",t.fetch()}}},[t._v(" FINISHED ")])],1)}},{key:"filterDropdown",fn:function(e){var n=e.setSelectedKeys,o=e.selectedKeys,i=e.clearFilters,c=e.column;return r("filter-dropdown",{attrs:{"set-selected-keys":n,"selected-keys":o,"clear-filters":i,column:c,filters:t.filters,fetch:t.fetch}})}},{key:"filterIcon",fn:function(t){return r("a-icon",{style:{color:t?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"method",fn:function(e){return r("span",{},[e?r("a-tag",{attrs:{color:"UPLOAD"===e?"#eb2f96":"#02a7ff"}},[t._v(t._s(e))]):t._e()],1)}},{key:"file",fn:function(e){return r("span",{},[e?r("a-tag",{attrs:{color:"#f5222d"}},[r("a",{attrs:{target:"_blank",href:"/revsuit/api/file/ftp/"+e.id}},[t._v("TRUE")])]):r("a-tag",{attrs:{color:"#722ed1"}},[t._v(" FALSE ")])],1)}},{key:"time",fn:function(e){return r("span",{},[t._v(" "+t._s(new Date(e).format("yyyy-MM-dd hh:mm:ss"))+" ")])}},{key:"status",fn:function(e){return r("span",{},[r("a-tag",{attrs:{color:t.colors[e]}},[t._v(" "+t._s(e)+" ")])],1)}}])})},o=[],i=r("5530"),c=r("e5bf"),a=r("56d7"),s=r("db40"),f={CRASHED:"#f50",FINISHED:"#52c41a"},u=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"REQUEST TIME",dataIndex:"request_time",key:"request_time",scopedSlots:{customRender:"time"}},{title:"RULE",dataIndex:"rule_name",key:"rule_name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG",dataIndex:"flag",key:"flag",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"USER",dataIndex:"user",key:"user",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"PASSWORD",dataIndex:"password",key:"password",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"PATH",dataIndex:"path",key:"path",ellipsis:!0,scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"METHOD",dataIndex:"method",key:"method",scopedSlots:{customRender:"method",filterDropdown:"selectDropdown",filterIcon:"filterIcon"}},{title:"FILE",dataIndex:"file",key:"file",scopedSlots:{customRender:"file"}},{title:"STATUS",dataIndex:"status",key:"status",scopedSlots:{customRender:"status",filterDropdown:"selectDropdown",filterIcon:"filterIcon"}},{title:"REMOTE IP",key:"remote_ip",dataIndex:"remote_ip",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"IP AREA",key:"ip_area",dataIndex:"ip_area"}],l={name:"FtpLogs",data:function(){return{store:a["store"],data:[],pagination:{current:1,showSizeChanger:!0,pageSize:a["store"].pageSize,onShowSizeChange:function(t,e){a["store"].pageSize=e}},filters:{},order:"desc",loading:!1,columns:u,colors:f}},methods:{handleTableChange:function(t,e,r){var n=Object(i["a"])({},this.pagination);n.current=t.current,this.pagination=n,this.order="ascend"===r.order?"asc":"desc",this.fetch()},fetch:function(){var t=this,e=Object(i["a"])(Object(i["a"])({},this.filters),{},{page:this.pagination.current,pageSize:this.pagination.pageSize,order:this.order});this.loading=!0,Object(c["b"])(e).then((function(e){var r=e.data.result;t.data=r.data;var n=Object(i["a"])({},t.pagination);n.total=r.count,t.pagination=n,t.loading=!1})).catch((function(e){t.$notification.error({message:"Unknown error: "+e.response.status,style:{width:"100px",marginLeft:"".concat(-265,"px")},duration:4})}))}},mounted:function(){this.fetch()},components:{FilterDropdown:s["a"]}},d=l,p=(r("430c"),r("2877")),h=Object(p["a"])(d,n,o,!1,null,null,null);e["default"]=h.exports},db40:function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{padding:"8px"},attrs:{slot:"filterDropdown"},slot:"filterDropdown"},[r("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+t.column.dataIndex,value:t.selectedKeys[0]},on:{change:function(e){return t.setSelectedKeys(e.target.value?[e.target.value]:[])},pressEnter:function(){t.filters[t.column.dataIndex]=t.selectedKeys[0],t.fetch()}}}),r("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[t.column.dataIndex]=t.selectedKeys[0],t.fetch()}}},[t._v(" Search ")]),r("a-button",{staticStyle:{width:"90px"},attrs:{size:"small"},on:{click:function(){t.clearFilters(),delete t.filters[t.column.dataIndex],t.fetch()}}},[t._v(" Reset ")])],1)},o=[],i={name:"FilterDropdown",props:["setSelectedKeys","selectedKeys","clearFilters","column","filters","fetch"]},c=i,a=r("2877"),s=Object(a["a"])(c,n,o,!1,null,"5e6f101e",null);e["a"]=s.exports},dbb4:function(t,e,r){var n=r("23e7"),o=r("83ab"),i=r("56ef"),c=r("fc6a"),a=r("06cf"),s=r("8418");n({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){var e,r,n=c(t),o=a.f,f=i(n),u={},l=0;while(f.length>l)r=o(n,e=f[l++]),void 0!==r&&s(u,e,r);return u}})},e439:function(t,e,r){var n=r("23e7"),o=r("d039"),i=r("fc6a"),c=r("06cf").f,a=r("83ab"),s=o((function(){c(1)})),f=!a||s;n({target:"Object",stat:!0,forced:f,sham:!a},{getOwnPropertyDescriptor:function(t,e){return c(i(t),e)}})},e5383:function(t,e,r){var n=r("b622");e.f=n},e5bf:function(t,e,r){"use strict";r.d(e,"c",(function(){return o})),r.d(e,"a",(function(){return i})),r.d(e,"d",(function(){return c})),r.d(e,"e",(function(){return a})),r.d(e,"b",(function(){return s}));var n=r("365c");function o(t){return Object(n["a"])({url:"/record/http",params:t,method:"get"})}function i(t){return Object(n["a"])({url:"/record/dns",params:t,method:"get"})}function c(t){return Object(n["a"])({url:"/record/mysql",params:t,method:"get"})}function a(t){return Object(n["a"])({url:"/record/rmi",params:t,method:"get"})}function s(t){return Object(n["a"])({url:"/record/ftp",params:t,method:"get"})}},e8b5:function(t,e,r){var n=r("c6b6");t.exports=Array.isArray||function(t){return"Array"==n(t)}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3d13e56e"],{"057f":function(t,e,r){var n=r("fc6a"),o=r("241c").f,i={}.toString,c="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return o(t)}catch(e){return c.slice()}};t.exports.f=function(t){return c&&"[object Window]"==i.call(t)?a(t):o(n(t))}},"159b":function(t,e,r){var n=r("da84"),o=r("fdbc"),i=r("17c2"),c=r("9112");for(var a in o){var s=n[a],f=s&&s.prototype;if(f&&f.forEach!==i)try{c(f,"forEach",i)}catch(u){f.forEach=i}}},"17c2":function(t,e,r){"use strict";var n=r("b727").forEach,o=r("a640"),i=o("forEach");t.exports=i?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},"1dde":function(t,e,r){var n=r("d039"),o=r("b622"),i=r("2d00"),c=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[],r=e.constructor={};return r[c]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"382b":function(t,e,r){},"430c":function(t,e,r){"use strict";r("382b")},"4de4":function(t,e,r){"use strict";var n=r("23e7"),o=r("b727").filter,i=r("1dde"),c=i("filter");n({target:"Array",proto:!0,forced:!c},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},5530:function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));r("b64b"),r("a4d3"),r("4de4"),r("e439"),r("159b"),r("dbb4");function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;ei)o.push(arguments[i++]);if(n=e,(p(e)||void 0!==t)&&!at(t))return d(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!at(e))return e}),o[1]=e,W.apply(null,o)}})}Q[L][M]||j(Q[L],M,Q[L].valueOf),H(Q,U),A[z]=!0},a640:function(t,e,r){"use strict";var n=r("d039");t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},b64b:function(t,e,r){var n=r("23e7"),o=r("7b0b"),i=r("df75"),c=r("d039"),a=c((function(){i(1)}));n({target:"Object",stat:!0,forced:a},{keys:function(t){return i(o(t))}})},b727:function(t,e,r){var n=r("0366"),o=r("44ad"),i=r("7b0b"),c=r("50c4"),a=r("65f0"),s=[].push,f=function(t){var e=1==t,r=2==t,f=3==t,u=4==t,l=6==t,d=7==t,p=5==t||l;return function(h,b,y,g){for(var m,v,w=i(h),S=o(w),O=n(b,y,3),I=c(S.length),x=0,D=g||a,k=e?D(h,I):r||d?D(h,0):void 0;I>x;x++)if((p||x in S)&&(m=S[x],v=O(m,x,w),t))if(e)k[x]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return x;case 2:s.call(k,m)}else switch(t){case 4:return!1;case 7:s.call(k,m)}return l?-1:f||u?u:k}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterOut:f(7)}},c5bf:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("a-table",{staticStyle:{"overflow-x":"auto"},attrs:{columns:t.columns,"data-source":t.data,loading:t.loading,pagination:t.pagination,rowClassName:function(t,e){return e%2===0?"":"gray-table-row"}},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"selectDropdown",fn:function(e){e.setSelectedKeys,e.selectedKeys,e.clearFilters;var n=e.column;return r("div",{staticStyle:{padding:"8px"}},[r("a-checkbox",{attrs:{checked:"CRASHED"===t.filters[n.dataIndex]},on:{change:function(e){e.target.checked?t.filters[n.dataIndex]="CRASHED":t.filters[n.dataIndex]="",t.fetch()}}},[t._v(" CRASHED ")]),r("br"),r("a-checkbox",{attrs:{checked:"FINISHED"===t.filters[n.dataIndex]},on:{change:function(e){e.target.checked?t.filters[n.dataIndex]="FINISHED":t.filters[n.dataIndex]="",t.fetch()}}},[t._v(" FINISHED ")])],1)}},{key:"filterDropdown",fn:function(e){var n=e.setSelectedKeys,o=e.selectedKeys,i=e.clearFilters,c=e.column;return r("filter-dropdown",{attrs:{"set-selected-keys":n,"selected-keys":o,"clear-filters":i,column:c,filters:t.filters,fetch:t.fetch}})}},{key:"filterIcon",fn:function(t){return r("a-icon",{style:{color:t?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"method",fn:function(e){return r("span",{},[e?r("a-tag",{attrs:{color:"UPLOAD"===e?"#eb2f96":"#02a7ff"}},[t._v(t._s(e))]):t._e()],1)}},{key:"file",fn:function(e){return r("span",{},[e?r("a-tag",{attrs:{color:"#f5222d"}},[r("a",{attrs:{target:"_blank",href:"/revsuit/api/file/ftp/"+e.id}},[t._v("TRUE")])]):r("a-tag",{attrs:{color:"#722ed1"}},[t._v(" FALSE ")])],1)}},{key:"time",fn:function(e){return r("span",{},[t._v(" "+t._s(new Date(e).format("yyyy-MM-dd hh:mm:ss"))+" ")])}},{key:"status",fn:function(e){return r("span",{},[r("a-tag",{attrs:{color:t.colors[e]}},[t._v(" "+t._s(e)+" ")])],1)}}])})},o=[],i=r("5530"),c=r("e5bf"),a=r("56d7"),s=r("db40"),f={CRASHED:"#f50",FINISHED:"#52c41a"},u=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"REQUEST TIME",dataIndex:"request_time",key:"request_time",scopedSlots:{customRender:"time"}},{title:"RULE",dataIndex:"rule_name",key:"rule_name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG",dataIndex:"flag",key:"flag",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"USER",dataIndex:"user",key:"user",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"PASSWORD",dataIndex:"password",key:"password",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"PATH",dataIndex:"path",key:"path",ellipsis:!0,scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"METHOD",dataIndex:"method",key:"method",scopedSlots:{customRender:"method",filterDropdown:"selectDropdown",filterIcon:"filterIcon"}},{title:"FILE",dataIndex:"file",key:"file",scopedSlots:{customRender:"file"}},{title:"STATUS",dataIndex:"status",key:"status",scopedSlots:{customRender:"status",filterDropdown:"selectDropdown",filterIcon:"filterIcon"}},{title:"REMOTE IP",key:"remote_ip",dataIndex:"remote_ip",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"IP AREA",key:"ip_area",dataIndex:"ip_area"}],l={name:"FtpLogs",data:function(){return{store:a["store"],data:[],pagination:{current:1,showSizeChanger:!0,pageSize:a["store"].pageSize,onShowSizeChange:function(t,e){a["store"].pageSize=e}},filters:{},order:"desc",loading:!1,columns:u,colors:f}},methods:{handleTableChange:function(t,e,r){var n=Object(i["a"])({},this.pagination);n.current=t.current,this.pagination=n,this.order="ascend"===r.order?"asc":"desc",this.fetch()},fetch:function(){var t=this,e=Object(i["a"])(Object(i["a"])({},this.filters),{},{page:this.pagination.current,pageSize:this.pagination.pageSize,order:this.order});this.loading=!0,Object(c["b"])(e).then((function(e){var r=e.data.result;t.data=r.data;var n=Object(i["a"])({},t.pagination);n.total=r.count,t.pagination=n,t.loading=!1})).catch((function(e){403!==e.response.status&&t.$message.error("Unknown error with status code: "+e.response.status)}))}},mounted:function(){this.fetch()},components:{FilterDropdown:s["a"]}},d=l,p=(r("430c"),r("2877")),h=Object(p["a"])(d,n,o,!1,null,null,null);e["default"]=h.exports},db40:function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{padding:"8px"},attrs:{slot:"filterDropdown"},slot:"filterDropdown"},[r("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+t.column.dataIndex,value:t.selectedKeys[0]},on:{change:function(e){return t.setSelectedKeys(e.target.value?[e.target.value]:[])},pressEnter:function(){t.filters[t.column.dataIndex]=t.selectedKeys[0],t.fetch()}}}),r("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[t.column.dataIndex]=t.selectedKeys[0],t.fetch()}}},[t._v(" Search ")]),r("a-button",{staticStyle:{width:"90px"},attrs:{size:"small"},on:{click:function(){t.clearFilters(),delete t.filters[t.column.dataIndex],t.fetch()}}},[t._v(" Reset ")])],1)},o=[],i={name:"FilterDropdown",props:["setSelectedKeys","selectedKeys","clearFilters","column","filters","fetch"]},c=i,a=r("2877"),s=Object(a["a"])(c,n,o,!1,null,"5e6f101e",null);e["a"]=s.exports},dbb4:function(t,e,r){var n=r("23e7"),o=r("83ab"),i=r("56ef"),c=r("fc6a"),a=r("06cf"),s=r("8418");n({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){var e,r,n=c(t),o=a.f,f=i(n),u={},l=0;while(f.length>l)r=o(n,e=f[l++]),void 0!==r&&s(u,e,r);return u}})},e439:function(t,e,r){var n=r("23e7"),o=r("d039"),i=r("fc6a"),c=r("06cf").f,a=r("83ab"),s=o((function(){c(1)})),f=!a||s;n({target:"Object",stat:!0,forced:f,sham:!a},{getOwnPropertyDescriptor:function(t,e){return c(i(t),e)}})},e5383:function(t,e,r){var n=r("b622");e.f=n},e5bf:function(t,e,r){"use strict";r.d(e,"c",(function(){return o})),r.d(e,"a",(function(){return i})),r.d(e,"d",(function(){return c})),r.d(e,"e",(function(){return a})),r.d(e,"b",(function(){return s}));var n=r("365c");function o(t){return Object(n["a"])({url:"/record/http",params:t,method:"get"})}function i(t){return Object(n["a"])({url:"/record/dns",params:t,method:"get"})}function c(t){return Object(n["a"])({url:"/record/mysql",params:t,method:"get"})}function a(t){return Object(n["a"])({url:"/record/rmi",params:t,method:"get"})}function s(t){return Object(n["a"])({url:"/record/ftp",params:t,method:"get"})}},e8b5:function(t,e,r){var n=r("c6b6");t.exports=Array.isArray||function(t){return"Array"==n(t)}}}]); \ No newline at end of file diff --git a/frontend/dist/js/chunk-42105840.js b/frontend/dist/js/chunk-42105840.js deleted file mode 100644 index 5c95911..0000000 --- a/frontend/dist/js/chunk-42105840.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-42105840"],{"05cd":function(e,t,a){"use strict";a.r(t);var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("a-button",{attrs:{id:"add-rule",type:"primary"},on:{click:e.addRule}},[a("a-icon",{attrs:{type:"plus"}}),e._v(" New Rule ")],1),a("a-drawer",{attrs:{title:e.formAction+" MySQL rule",width:490,visible:e.formVisible,"body-style":{paddingBottom:"80px"}},on:{close:e.closeDrawer}},[a("a-form-model",{ref:"form",attrs:{model:e.form,layout:"vertical"},on:{submit:e.handleSubmit}},[a("BasicRule",{attrs:{form:e.form,readOnly:e.formReadOnly,flagField:"user or schema"}}),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:24}},[a("a-form-model-item",{attrs:{label:"Files",rules:e.rules.files}},[a("a-input",{staticStyle:{width:"100%"},attrs:{placeholder:"please enter file name,use ';' to split multiple file names",readOnly:e.formReadOnly,disabled:e.form.exploit_jdbc_client},model:{value:e.form.files,callback:function(t){e.$set(e.form,"files",t)},expression:"form.files"}})],1)],1)],1),a("a-row",[a("a-form-model-item",[a("div",{staticClass:"ant-form-item-label"},[a("label",{attrs:{for:"exploit-jdbc-client"}},[e._v("Exploit Jdbc Client "),a("a-tooltip",{attrs:{placement:"topLeft",title:"Whether test to exploit jdbc client."}},[a("a-icon",{attrs:{type:"question-circle"}})],1)],1)]),a("a-switch",{attrs:{id:"exploit-jdbc-client",disabled:e.formReadOnly},model:{value:e.form.exploit_jdbc_client,callback:function(t){e.$set(e.form,"exploit_jdbc_client",t)},expression:"form.exploit_jdbc_client"}})],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:24}},[a("a-form-model-item",[a("label",{attrs:{for:"payload"}},[e._v("Payload "),a("a-tooltip",{attrs:{placement:"topLeft",title:"Need to set ${payload} variable by flag format first. Payload which key is same as ${payload} will be used."}},[a("a-icon",{attrs:{type:"question-circle"}})],1)],1),e._l(e.payloadKeys,(function(t){return a("a-input-group",{key:t,attrs:{id:"payload",compact:""}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["Key-"+t],expression:"['Key-'+payloadKey,]"}],staticStyle:{width:"47%","margin-bottom":"5px"},attrs:{defaultOpen:!1,placeholder:"Key",disabled:!e.form.exploit_jdbc_client,readOnly:e.formReadOnly},model:{value:e.form["Key-"+t],callback:function(a){e.$set(e.form,"Key-"+t,a)},expression:"form['Key-'+payloadKey]"}}),a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["Value-"+t],expression:"['Value-'+payloadKey,]"}],staticStyle:{width:"53%"},attrs:{placeholder:"Base64 encoded payload Value",disabled:!e.form.exploit_jdbc_client,readOnly:e.formReadOnly},on:{focus:function(){!e.formReadOnly&&t===e.payloadKeys[e.payloadKeys.length-1]&&e.form["Key-"+t]&&e.addPayload()}},model:{value:e.form["Value-"+t],callback:function(a){e.$set(e.form,"Value-"+t,a)},expression:"form['Value-'+payloadKey]"}},[a("a-icon",{staticClass:"dynamic-delete-button",attrs:{slot:"addonAfter",type:"minus-circle-o"},on:{click:function(){return e.form.exploit_jdbc_client?e.removePayload(t):null}},slot:"addonAfter"})],1)],1)}))],2)],1)],1)],1),a("div",{style:{position:"absolute",right:0,bottom:0,width:"100%",borderTop:"1px solid #e9e9e9",padding:"10px 16px",background:"#fff",textAlign:"right",zIndex:1}},[a("a-button",{style:{marginRight:"8px"},on:{click:e.handleCancel}},[e._v(" Cancel ")]),a("a-button",{attrs:{type:"primary",disabled:e.formReadOnly},on:{click:e.handleSubmit}},[e._v(" Submit ")])],1)],1),a("a-table",{attrs:{columns:e.columns,"data-source":e.data,loading:e.loading,pagination:e.pagination},on:{change:e.handleTableChange},scopedSlots:e._u([{key:"filterDropdown",fn:function(t){var o=t.setSelectedKeys,i=t.selectedKeys,n=(t.clearFilters,t.column);return a("div",{staticStyle:{padding:"8px"}},[a("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+n.dataIndex,value:i[0]},on:{change:function(e){return o(e.target.value?[e.target.value]:[])},pressEnter:function(){e.filters[n.dataIndex]=i[0],e.fetch()}}}),a("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){e.filters[n.dataIndex]=i[0],e.fetch()}}},[e._v(" Search ")])],1)}},{key:"filterIcon",fn:function(e){return a("a-icon",{style:{color:e?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"rank",fn:function(t){return a("span",{},[a("a-tag",{attrs:{color:"#"+(2996213+80*t).toString(16)}},[e._v(" "+e._s(t)+" ")])],1)}},{key:"switchRender",fn:function(t,o,i,n){return a("span",{},[a("a-switch",{attrs:{checked:t},on:{click:function(t){return e.clickSwitch(o,n.dataIndex)}}})],1)}},{key:"action",fn:function(t,o,i){return a("span",{},[a("a-button",{staticStyle:{color:"#67C23A","background-color":"transparent","border-color":"#67C23A","text-shadow":"none",margin:"0 10px 3px 0"},attrs:{size:"small",ghost:""},on:{click:function(t){return e.viewRule(o)}}},[e._v("View")]),a("a-button",{staticStyle:{color:"#909399","background-color":"transparent","border-color":"#909399","text-shadow":"none",margin:"0 10px 3px 0"},attrs:{size:"small",ghost:""},on:{click:function(t){return e.editRule(o,i)}}},[e._v("Edit")]),a("a-popconfirm",{attrs:{title:"Are you sure delete this task?","ok-text":"Yes","cancel-text":"No"},on:{confirm:function(t){return e.deleteRule(o,i)}}},[a("a-button",{attrs:{type:"danger",size:"small",ghost:""}},[e._v("Delete")])],1)],1)}}])})],1)},i=[],n=a("5530"),r=(a("a434"),a("34c6")),l=a("56d7"),s=a("2084"),c="View",d="Edit",f="Create",u=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"NAME",dataIndex:"name",key:"name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG FORMAT",dataIndex:"flag_format",key:"flag_format",ellipsis:!0},{title:"RANK",dataIndex:"rank",key:"rank",scopedSlots:{customRender:"rank"}},{title:"FILES",dataIndex:"files",key:"files",ellipsis:!0},{title:"PUSH TO CLIENT",dataIndex:"push_to_client",key:"push_to_client",scopedSlots:{customRender:"switchRender"}},{title:"NOTICE",dataIndex:"notice",key:"notice",scopedSlots:{customRender:"switchRender"}},{title:"Action",key:"action",scopedSlots:{customRender:"action"}}],p={files:[{required:!1,message:"please enter file name"}]},m={name:"MysqlRules",data:function(){return{store:l["store"],data:[],formVisible:!1,pagination:{current:1,showSizeChanger:!0,pageSize:l["store"].pageSize,onShowSizeChange:function(e,t){l["store"].pageSize=t}},filters:{},loading:!1,columns:u,form:{},rules:p,payloadKeys:[1],formReadOnly:!1,formAction:""}},methods:{handleTableChange:function(e,t,a){var o=Object(n["a"])({},this.pagination);o.current=e.current,this.pagination=o,this.order="ascend"===a.order?"asc":"desc",this.fetch()},fetch:function(){var e=this,t=Object(n["a"])(Object(n["a"])({},this.filters),{},{page:this.pagination.current,pageSize:this.pagination.pageSize,order:this.order});this.loading=!0,Object(r["i"])(t).then((function(t){var a=t.data.result;e.data=a.data;var o=Object(n["a"])({},e.pagination);o.total=a.count,e.pagination=o,e.loading=!1})).catch((function(t){e.$notification.error({message:"Unknown error: "+t.response.status,style:{width:"100px",marginLeft:"".concat(-265,"px")},duration:4})}))},clickSwitch:function(e,t){var a=this;e[t]=!e[t],Object(r["n"])(e).then().catch((function(e){a.$notification.error({message:"Edit failed",description:e.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))},addRule:function(){this.form={},this.showForm(f)},viewRule:function(e){this.form=e,this.showForm(c)},editRule:function(e){this.form=JSON.parse(JSON.stringify(e)),this.showForm(d)},deleteRule:function(e,t){var a=this;Object(r["d"])(e).then((function(){a.data.splice(t,1)})).catch((function(e){a.$notification.error({message:"Error",description:e.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))},showForm:function(e){for(var t in this.formAction=e,this.formReadOnly=e===c,this.formVisible=!0,this.form.payloads)this.form["Key-"+this.payloadKeys.length]=t,this.form["Value-"+this.payloadKeys.length]=this.form.payloads[t],this.addPayload();this.formReadOnly&&this.removePayload(this.payloadKeys.length)},closeDrawer:function(){this.formVisible=!1,this.payloadKeys=[1]},addPayload:function(){this.payloadKeys.push(this.payloadKeys[this.payloadKeys.length-1]+1)},removePayload:function(e){this.payloadKeys.length>1&&this.payloadKeys.splice(this.payloadKeys.indexOf(e),1)},handleSubmit:function(){var e=this;this.$refs.form.validate((function(t){if(t){var a={},o={};for(var i in e.form)if(0===i.indexOf("Key-")){var n=i.substr("Key-".length);e.form["Value-"+n]&&(a[e.form[i]]=e.form["Value-"+n])}else-1===i.indexOf("Value-")&&(o[i]=e.form[i]);o.payloads=a,Object(r["n"])(o).then((function(){e.closeDrawer(),e.fetch({page:e.pagination.current}),e.$notification.info({message:"Success",style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:2.5})})).catch((function(t){e.$notification.error({message:e.formAction+" failed",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))}}))},handleCancel:function(){this.form={},this.closeDrawer()}},mounted:function(){this.fetch({page:"1"})},components:{BasicRule:s["a"]}},h=m,y=(a("4e1e"),a("2877")),g=Object(y["a"])(h,o,i,!1,null,"5aa75eae",null);t["default"]=g.exports},1135:function(e,t,a){},"4e1e":function(e,t,a){"use strict";a("1135")}}]); \ No newline at end of file diff --git a/frontend/dist/js/chunk-43748c28.js b/frontend/dist/js/chunk-43748c28.js new file mode 100644 index 0000000..346f76b --- /dev/null +++ b/frontend/dist/js/chunk-43748c28.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-43748c28"],{"2e08":function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("a-button",{attrs:{id:"add-rule",type:"primary"},on:{click:t.addRule}},[a("a-icon",{attrs:{type:"plus"}}),t._v(" New Rule ")],1),a("a-drawer",{attrs:{title:t.formAction+" DNS rule",width:490,visible:t.formVisible,"body-style":{paddingBottom:"80px"}},on:{close:t.closeDrawer}},[a("a-form-model",{ref:"form",attrs:{model:t.form,layout:"vertical"},on:{submit:t.handleSubmit}},[a("BasicRule",{attrs:{form:t.form,readOnly:t.formReadOnly,flagFormat:"domain"}}),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-model-item",{attrs:{label:"Type",rules:t.rules.type}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["type"],expression:"['type']"}],staticStyle:{width:"100%"},attrs:{disabled:t.formReadOnly,placeholder:"A"},model:{value:t.form.type,callback:function(e){t.$set(t.form,"type",e)},expression:"form.type"}},[a("a-select-option",{attrs:{value:1}},[t._v("A")]),a("a-select-option",{attrs:{value:28}},[t._v("AAAA")]),a("a-select-option",{attrs:{value:5}},[t._v("CNAME")]),a("a-select-option",{attrs:{value:16}},[t._v("TXT")]),a("a-select-option",{attrs:{value:2}},[t._v("NS")]),a("a-select-option",{attrs:{value:99}},[t._v("REBINDING")])],1)],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-model-item",{attrs:{label:"TTL",rules:t.rules.ttl}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["ttl"],expression:"['ttl']"}],staticStyle:{width:"100%"},attrs:{disabled:t.formReadOnly,placeholder:"10",value:99===t.form.type?t.form.ttl=0:null},model:{value:t.form.ttl,callback:function(e){t.$set(t.form,"ttl",e)},expression:"form.ttl"}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:24}},[a("a-form-model-item",{attrs:{rules:t.rules.value}},[a("span",{attrs:{slot:"label"},slot:"label"},[t._v(" Value "),a("a-tooltip",{attrs:{title:"Support template such as ${varname}"}},[a("a-icon",{attrs:{type:"question-circle-o"}})],1)],1),a("a-input",{staticStyle:{width:"100%"},attrs:{placeholder:99===t.form.type?"8.8.8.8,127.0.0.1":"please enter resolve value",readOnly:t.formReadOnly},model:{value:t.form.value,callback:function(e){t.$set(t.form,"value",e)},expression:"form.value"}})],1)],1)],1)],1),a("div",{style:{position:"absolute",right:0,bottom:0,width:"100%",borderTop:"1px solid #e9e9e9",padding:"10px 16px",background:"#fff",textAlign:"right",zIndex:1}},[a("a-button",{style:{marginRight:"8px"},on:{click:t.handleCancel}},[t._v(" Cancel ")]),a("a-button",{attrs:{type:"primary",disabled:t.formReadOnly},on:{click:t.handleSubmit}},[t._v(" Submit ")])],1)],1),a("a-table",{staticStyle:{"overflow-x":"auto"},attrs:{columns:t.columns,"data-source":t.data,loading:t.loading,pagination:t.pagination},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"filterDropdown",fn:function(e){var o=e.setSelectedKeys,r=e.selectedKeys,n=(e.clearFilters,e.column);return a("div",{staticStyle:{padding:"8px"}},[a("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+n.dataIndex,value:r[0]},on:{change:function(t){return o(t.target.value?[t.target.value]:[])},pressEnter:function(){t.filters[n.dataIndex]=r[0],t.fetch()}}}),a("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[n.dataIndex]=r[0],t.fetch()}}},[t._v(" Search ")])],1)}},{key:"filterIcon",fn:function(t){return a("a-icon",{style:{color:t?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"rank",fn:function(e){return a("span",{},[a("a-tag",{attrs:{color:"#"+(2996213+80*e).toString(16)}},[t._v(" "+t._s(e)+" ")])],1)}},{key:"type",fn:function(e){return a("span",{},[a("a-tag",{attrs:{color:t.colors[e]}},[t._v(" "+t._s(t.resolveTypes[e])+" ")])],1)}},{key:"switchRender",fn:function(e,o,r,n){return a("span",{},[a("a-switch",{attrs:{checked:e},on:{click:function(e){return t.clickSwitch(o,n.dataIndex)}}})],1)}},{key:"valueRender",fn:function(e){return a("span",{},t._l(e.split(","),(function(e){return a("span",{key:e},[t._v(t._s(e)),a("br")])})),0)}},{key:"action",fn:function(e,o,r){return a("span",{},[a("a-button",{staticStyle:{color:"#67C23A","background-color":"transparent","border-color":"#67C23A","text-shadow":"none",margin:"0 10px 3px 0"},attrs:{size:"small",ghost:""},on:{click:function(e){return t.viewRule(o)}}},[t._v("View")]),a("a-button",{staticStyle:{color:"#909399","background-color":"transparent","border-color":"#909399","text-shadow":"none",margin:"0 10px 3px 0"},attrs:{size:"small",ghost:""},on:{click:function(e){return t.editRule(o,r)}}},[t._v("Edit")]),a("a-popconfirm",{attrs:{title:"Are you sure delete this task?","ok-text":"Yes","cancel-text":"No"},on:{confirm:function(e){return t.deleteRule(o,r)}}},[a("a-button",{attrs:{type:"danger",size:"small",ghost:""}},[t._v("Delete")])],1)],1)}}])})],1)},r=[],n=a("5530"),i=(a("a434"),a("34c6")),s=a("56d7"),l=a("2084"),c="View",d="Edit",u="Create",p={1:"geekblue",28:"green",5:"red",16:"pink",2:"purple",99:"orange"},f={1:"A",28:"AAAA",5:"CNAME",16:"TXT",2:"NS",99:"RB"},m=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"NAME",dataIndex:"name",key:"name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG FORMAT",dataIndex:"flag_format",key:"flag_format",ellipsis:!0},{title:"RANK",dataIndex:"rank",key:"rank",scopedSlots:{customRender:"rank"}},{title:"TYPE",dataIndex:"type",key:"type",scopedSlots:{customRender:"type"}},{title:"TTL",dataIndex:"ttl",key:"ttl"},{title:"VALUE",dataIndex:"value",key:"value",scopedSlots:{customRender:"valueRender"}},{title:"PUSH TO CLIENT",dataIndex:"push_to_client",key:"push_to_client",scopedSlots:{customRender:"switchRender"}},{title:"NOTICE",dataIndex:"notice",key:"notice",scopedSlots:{customRender:"switchRender"}},{title:"Action",key:"action",scopedSlots:{customRender:"action"}}],h={value:[{required:!1,message:"please enter resolve value"}],type:[{required:!1,message:"please enter resolve type"}],ttl:[{required:!1,message:"please enter resolve ttl"}]},y={name:"DnsRules",data:function(){return{store:s["store"],data:[],formVisible:!1,pagination:{current:1,showSizeChanger:!0,pageSize:s["store"].pageSize,onShowSizeChange:function(t,e){s["store"].pageSize=e}},filters:{},loading:!1,columns:m,colors:p,resolveTypes:f,form:{},rules:h,formReadOnly:!1,formAction:""}},methods:{handleTableChange:function(t,e,a){var o=Object(n["a"])({},this.pagination);o.current=t.current,this.pagination=o,this.order="ascend"===a.order?"asc":"desc",this.fetch()},fetch:function(){var t=this,e=Object(n["a"])(Object(n["a"])({},this.filters),{},{page:this.pagination.current,pageSize:this.pagination.pageSize,order:this.order});this.loading=!0,Object(i["f"])(e).then((function(e){var a=e.data.result;t.data=a.data;var o=Object(n["a"])({},t.pagination);o.total=a.count,t.pagination=o,t.loading=!1})).catch((function(e){403!==e.response.status&&t.$message.error("Unknown error with status code: "+e.response.status)}))},clickSwitch:function(t,e){var a=this;t[e]=!t[e],Object(i["k"])(t).then().catch((function(t){a.$notification.error({message:"Edit failed",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))},addRule:function(){this.form={},this.showForm(u)},viewRule:function(t){this.form=t,this.showForm(c)},editRule:function(t){this.form=JSON.parse(JSON.stringify(t)),this.showForm(d)},deleteRule:function(t,e){var a=this;Object(i["a"])(t).then((function(){a.data.splice(e,1)})).catch((function(t){a.$notification.error({message:"Error",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))},showForm:function(t){this.formAction=t,this.formReadOnly=t===c,this.formVisible=!0},closeDrawer:function(){this.formVisible=!1},handleSubmit:function(){var t=this;this.$refs.form.validate((function(e){e&&Object(i["k"])(t.form).then((function(){t.closeDrawer(),t.fetch({page:t.pagination.current}),t.$notification.info({message:"Success",style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:2.5})})).catch((function(e){t.$notification.error({message:t.formAction+" failed",description:e.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))}))},handleCancel:function(){this.form={},this.closeDrawer()}},mounted:function(){this.fetch({page:"1"})},components:{BasicRule:l["a"]}},g=y,v=(a("e0b3"),a("2877")),b=Object(v["a"])(g,o,r,!1,null,"1361da51",null);e["default"]=b.exports},"51ca":function(t,e,a){},e0b3:function(t,e,a){"use strict";a("51ca")}}]); \ No newline at end of file diff --git a/frontend/dist/js/chunk-49fbda44.js b/frontend/dist/js/chunk-49fbda44.js new file mode 100644 index 0000000..ea35e6a --- /dev/null +++ b/frontend/dist/js/chunk-49fbda44.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-49fbda44"],{a299:function(t,e,a){},a2a5:function(t,e,a){"use strict";a("a299")},f832:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("a-button",{attrs:{id:"add-rule",type:"primary"},on:{click:t.addRule}},[a("a-icon",{attrs:{type:"plus"}}),t._v(" New Rule ")],1),a("a-drawer",{attrs:{title:t.formAction+" FTP rule",width:490,visible:t.formVisible,"body-style":{paddingBottom:"80px"}},on:{close:t.closeDrawer}},[a("a-form-model",{ref:"form",attrs:{model:t.form,layout:"vertical"},on:{submit:t.handleSubmit}},[a("BasicRule",{attrs:{form:t.form,readOnly:t.formReadOnly,flagFormat:"user or password"}}),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:24}},[a("a-form-model-item",[a("span",{attrs:{slot:"label"},slot:"label"},[t._v(" Pasv Address "),a("a-tooltip",{attrs:{title:"1. Support template such as ${user}/${password}/${varname}.\n2.For setting the rebind mode, please use ',' to separate addresses."}},[a("a-icon",{attrs:{type:"question-circle-o"}})],1)],1),a("a-input",{staticStyle:{width:"100%"},attrs:{placeholder:"Use `external_ip:pasv_port` by default",readOnly:t.formReadOnly},model:{value:t.form.pasv_address,callback:function(e){t.$set(t.form,"pasv_address",e)},expression:"form.pasv_address"}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:24}},[a("a-form-model-item",[a("span",{attrs:{slot:"label"},slot:"label"},[t._v(" Data "),a("a-tooltip",{attrs:{title:"1. The data to be returned when the client executes the download request.\n 2. Please use base64 encoding.\n 3. Support template such as ${user}/${password}/${varname}"}},[a("a-icon",{attrs:{type:"question-circle-o"}})],1)],1),a("a-textarea",{attrs:{placeholder:"The data to be returned when the client executes the download request. Please use base64 encoding.",readOnly:t.formReadOnly,"auto-size":{minRows:10,maxRows:30}},model:{value:t.form.data,callback:function(e){t.$set(t.form,"data",e)},expression:"form.data"}})],1)],1)],1)],1),a("div",{style:{position:"absolute",right:0,bottom:0,width:"100%",borderTop:"1px solid #e9e9e9",padding:"10px 16px",background:"#fff",textAlign:"right",zIndex:1}},[a("a-button",{style:{marginRight:"8px"},on:{click:t.handleCancel}},[t._v(" Cancel ")]),a("a-button",{attrs:{type:"primary",disabled:t.formReadOnly},on:{click:t.handleSubmit}},[t._v(" Submit ")])],1)],1),a("a-table",{staticStyle:{"overflow-x":"auto"},attrs:{columns:t.columns,"data-source":t.data,loading:t.loading,pagination:t.pagination},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"filterDropdown",fn:function(e){var n=e.setSelectedKeys,o=e.selectedKeys,r=(e.clearFilters,e.column);return a("div",{staticStyle:{padding:"8px"}},[a("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+r.dataIndex,value:o[0]},on:{change:function(t){return n(t.target.value?[t.target.value]:[])},pressEnter:function(){t.filters[r.dataIndex]=o[0],t.fetch()}}}),a("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[r.dataIndex]=o[0],t.fetch()}}},[t._v(" Search ")])],1)}},{key:"filterIcon",fn:function(t){return a("a-icon",{style:{color:t?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"rank",fn:function(e){return a("span",{},[a("a-tag",{attrs:{color:"#"+(2996213+80*e).toString(16)}},[t._v(" "+t._s(e)+" ")])],1)}},{key:"switchRender",fn:function(e,n,o,r){return a("span",{},[a("a-switch",{attrs:{checked:e},on:{click:function(e){return t.clickSwitch(n,r.dataIndex)}}})],1)}},{key:"valueRender",fn:function(e){return a("span",{},t._l(e.split(","),(function(e){return a("span",{key:e},[t._v(t._s(e)),a("br")])})),0)}},{key:"action",fn:function(e,n,o){return a("span",{},[a("a-button",{staticStyle:{color:"#67C23A","background-color":"transparent","border-color":"#67C23A","text-shadow":"none",margin:"0 10px 3px 0"},attrs:{size:"small",ghost:""},on:{click:function(e){return t.viewRule(n)}}},[t._v("View")]),a("a-button",{staticStyle:{color:"#909399","background-color":"transparent","border-color":"#909399","text-shadow":"none",margin:"0 10px 3px 0"},attrs:{size:"small",ghost:""},on:{click:function(e){return t.editRule(n,o)}}},[t._v("Edit")]),a("a-popconfirm",{attrs:{title:"Are you sure delete this task?","ok-text":"Yes","cancel-text":"No"},on:{confirm:function(e){return t.deleteRule(n,o)}}},[a("a-button",{attrs:{type:"danger",size:"small",ghost:""}},[t._v("Delete")])],1)],1)}}])})],1)},o=[],r=a("5530"),i=(a("a434"),a("34c6")),s=a("56d7"),c=a("2084"),l="View",d="Edit",u="Create",p=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"NAME",dataIndex:"name",key:"name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG FORMAT",dataIndex:"flag_format",key:"flag_format",ellipsis:!0},{title:"RANK",dataIndex:"rank",key:"rank",scopedSlots:{customRender:"rank"}},{title:"PASV ADDRESS",dataIndex:"pasv_address",key:"pasv_address",ellipsis:!0},{title:"PUSH TO CLIENT",dataIndex:"push_to_client",key:"push_to_client",scopedSlots:{customRender:"switchRender"}},{title:"NOTICE",dataIndex:"notice",key:"notice",scopedSlots:{customRender:"switchRender"}},{title:"Action",key:"action",scopedSlots:{customRender:"action"}}],f={name:"FtpRules",data:function(){return{store:s["store"],data:[],formVisible:!1,pagination:{current:1,showSizeChanger:!0,pageSize:s["store"].pageSize,onShowSizeChange:function(t,e){s["store"].pageSize=e}},filters:{},loading:!1,columns:p,form:{},formReadOnly:!1,formAction:""}},methods:{handleTableChange:function(t,e,a){var n=Object(r["a"])({},this.pagination);n.current=t.current,this.pagination=n,this.order="ascend"===a.order?"asc":"desc",this.fetch()},fetch:function(){var t=this,e=Object(r["a"])(Object(r["a"])({},this.filters),{},{page:this.pagination.current,pageSize:this.pagination.pageSize,order:this.order});this.loading=!0,Object(i["g"])(e).then((function(e){var a=e.data.result;t.data=a.data;var n=Object(r["a"])({},t.pagination);n.total=a.count,t.pagination=n,t.loading=!1})).catch((function(e){403!==e.response.status&&t.$message.error("Unknown error with status code: "+e.response.status)}))},clickSwitch:function(t,e){var a=this;t[e]=!t[e],Object(i["l"])(t).then().catch((function(t){a.$notification.error({message:"Edit failed",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))},addRule:function(){this.form={},this.showForm(u)},viewRule:function(t){this.form=t,this.showForm(l)},editRule:function(t){this.form=JSON.parse(JSON.stringify(t)),this.showForm(d)},deleteRule:function(t,e){var a=this;Object(i["b"])(t).then((function(){a.data.splice(e,1)})).catch((function(t){a.$notification.error({message:"Error",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))},showForm:function(t){this.formAction=t,this.formReadOnly=t===l,this.formVisible=!0},closeDrawer:function(){this.formVisible=!1},handleSubmit:function(){var t=this;this.$refs.form.validate((function(e){e&&Object(i["l"])(t.form).then((function(){t.closeDrawer(),t.fetch({page:t.pagination.current}),t.$notification.info({message:"Success",style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:2.5})})).catch((function(e){t.$notification.error({message:t.formAction+" failed",description:e.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))}))},handleCancel:function(){this.form={},this.closeDrawer()}},mounted:function(){this.fetch({page:"1"})},components:{BasicRule:c["a"]}},h=f,m=(a("a2a5"),a("2877")),g=Object(m["a"])(h,n,o,!1,null,"6f29426c",null);e["default"]=g.exports}}]); \ No newline at end of file diff --git a/frontend/dist/js/chunk-65a35ecf.js b/frontend/dist/js/chunk-65a35ecf.js deleted file mode 100644 index 48df0a0..0000000 --- a/frontend/dist/js/chunk-65a35ecf.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-65a35ecf"],{"19f6":function(t,e,a){"use strict";a("d6fc")},d6fc:function(t,e,a){},f832:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("a-button",{attrs:{id:"add-rule",type:"primary"},on:{click:t.addRule}},[a("a-icon",{attrs:{type:"plus"}}),t._v(" New Rule ")],1),a("a-drawer",{attrs:{title:t.formAction+" FTP rule",width:490,visible:t.formVisible,"body-style":{paddingBottom:"80px"}},on:{close:t.closeDrawer}},[a("a-form-model",{ref:"form",attrs:{model:t.form,layout:"vertical"},on:{submit:t.handleSubmit}},[a("BasicRule",{attrs:{form:t.form,readOnly:t.formReadOnly}}),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:24}},[a("a-form-model-item",[a("span",{attrs:{slot:"label"},slot:"label"},[t._v(" Pasv Address "),a("a-tooltip",{attrs:{title:"1. Support template such as ${user}/${password}/${varname}.\n2.For setting the rebind mode, please use ',' to separate addresses."}},[a("a-icon",{attrs:{type:"question-circle-o"}})],1)],1),a("a-input",{staticStyle:{width:"100%"},attrs:{placeholder:"Use external IP by default",readOnly:t.formReadOnly},model:{value:t.form.pasv_address,callback:function(e){t.$set(t.form,"pasv_address",e)},expression:"form.pasv_address"}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:24}},[a("a-form-model-item",[a("span",{attrs:{slot:"label"},slot:"label"},[t._v(" Data "),a("a-tooltip",{attrs:{title:"1. The data to be returned when the client executes the download request.\n 2. Please use base64 encoding.\n 3. Support template such as ${user}/${password}/${varname}"}},[a("a-icon",{attrs:{type:"question-circle-o"}})],1)],1),a("a-textarea",{attrs:{placeholder:"The data to be returned when the client executes the download request. Please use base64 encoding.",readOnly:t.formReadOnly,"auto-size":{minRows:10,maxRows:30}},model:{value:t.form.data,callback:function(e){t.$set(t.form,"data",e)},expression:"form.data"}})],1)],1)],1)],1),a("div",{style:{position:"absolute",right:0,bottom:0,width:"100%",borderTop:"1px solid #e9e9e9",padding:"10px 16px",background:"#fff",textAlign:"right",zIndex:1}},[a("a-button",{style:{marginRight:"8px"},on:{click:t.handleCancel}},[t._v(" Cancel ")]),a("a-button",{attrs:{type:"primary",disabled:t.formReadOnly},on:{click:t.handleSubmit}},[t._v(" Submit ")])],1)],1),a("a-table",{attrs:{columns:t.columns,"data-source":t.data,loading:t.loading,pagination:t.pagination},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"filterDropdown",fn:function(e){var n=e.setSelectedKeys,o=e.selectedKeys,r=(e.clearFilters,e.column);return a("div",{staticStyle:{padding:"8px"}},[a("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+r.dataIndex,value:o[0]},on:{change:function(t){return n(t.target.value?[t.target.value]:[])},pressEnter:function(){t.filters[r.dataIndex]=o[0],t.fetch()}}}),a("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[r.dataIndex]=o[0],t.fetch()}}},[t._v(" Search ")])],1)}},{key:"filterIcon",fn:function(t){return a("a-icon",{style:{color:t?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"rank",fn:function(e){return a("span",{},[a("a-tag",{attrs:{color:"#"+(2996213+80*e).toString(16)}},[t._v(" "+t._s(e)+" ")])],1)}},{key:"switchRender",fn:function(e,n,o,r){return a("span",{},[a("a-switch",{attrs:{checked:e},on:{click:function(e){return t.clickSwitch(n,r.dataIndex)}}})],1)}},{key:"valueRender",fn:function(e){return a("span",{},t._l(e.split(","),(function(e){return a("span",{key:e},[t._v(t._s(e)),a("br")])})),0)}},{key:"action",fn:function(e,n,o){return a("span",{},[a("a-button",{staticStyle:{color:"#67C23A","background-color":"transparent","border-color":"#67C23A","text-shadow":"none",margin:"0 10px 3px 0"},attrs:{size:"small",ghost:""},on:{click:function(e){return t.viewRule(n)}}},[t._v("View")]),a("a-button",{staticStyle:{color:"#909399","background-color":"transparent","border-color":"#909399","text-shadow":"none",margin:"0 10px 3px 0"},attrs:{size:"small",ghost:""},on:{click:function(e){return t.editRule(n,o)}}},[t._v("Edit")]),a("a-popconfirm",{attrs:{title:"Are you sure delete this task?","ok-text":"Yes","cancel-text":"No"},on:{confirm:function(e){return t.deleteRule(n,o)}}},[a("a-button",{attrs:{type:"danger",size:"small",ghost:""}},[t._v("Delete")])],1)],1)}}])})],1)},o=[],r=a("5530"),i=(a("a434"),a("34c6")),s=a("56d7"),c=a("2084"),l="View",d="Edit",u="Create",f=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"NAME",dataIndex:"name",key:"name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG FORMAT",dataIndex:"flag_format",key:"flag_format",ellipsis:!0},{title:"RANK",dataIndex:"rank",key:"rank",scopedSlots:{customRender:"rank"}},{title:"PASV ADDRESS",dataIndex:"pasv_address",key:"pasv_address",ellipsis:!0},{title:"PUSH TO CLIENT",dataIndex:"push_to_client",key:"push_to_client",scopedSlots:{customRender:"switchRender"}},{title:"NOTICE",dataIndex:"notice",key:"notice",scopedSlots:{customRender:"switchRender"}},{title:"Action",key:"action",scopedSlots:{customRender:"action"}}],p={name:"FtpRules",data:function(){return{store:s["store"],data:[],formVisible:!1,pagination:{current:1,showSizeChanger:!0,pageSize:s["store"].pageSize,onShowSizeChange:function(t,e){s["store"].pageSize=e}},filters:{},loading:!1,columns:f,form:{},formReadOnly:!1,formAction:""}},methods:{handleTableChange:function(t,e,a){var n=Object(r["a"])({},this.pagination);n.current=t.current,this.pagination=n,this.order="ascend"===a.order?"asc":"desc",this.fetch()},fetch:function(){var t=this,e=Object(r["a"])(Object(r["a"])({},this.filters),{},{page:this.pagination.current,pageSize:this.pagination.pageSize,order:this.order});this.loading=!0,Object(i["g"])(e).then((function(e){var a=e.data.result;t.data=a.data;var n=Object(r["a"])({},t.pagination);n.total=a.count,t.pagination=n,t.loading=!1})).catch((function(e){t.$notification.error({message:"Unknown error: "+e.response.status,style:{width:"100px",marginLeft:"".concat(-265,"px")},duration:4})}))},clickSwitch:function(t,e){var a=this;t[e]=!t[e],Object(i["l"])(t).then().catch((function(t){a.$notification.error({message:"Edit failed",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))},addRule:function(){this.form={},this.showForm(u)},viewRule:function(t){this.form=t,this.showForm(l)},editRule:function(t){this.form=JSON.parse(JSON.stringify(t)),this.showForm(d)},deleteRule:function(t,e){var a=this;Object(i["b"])(t).then((function(){a.data.splice(e,1)})).catch((function(t){a.$notification.error({message:"Error",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))},showForm:function(t){this.formAction=t,this.formReadOnly=t===l,this.formVisible=!0},closeDrawer:function(){this.formVisible=!1},handleSubmit:function(){var t=this;this.$refs.form.validate((function(e){e&&Object(i["l"])(t.form).then((function(){t.closeDrawer(),t.fetch({page:t.pagination.current}),t.$notification.info({message:"Success",style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:2.5})})).catch((function(e){t.$notification.error({message:t.formAction+" failed",description:e.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))}))},handleCancel:function(){this.form={},this.closeDrawer()}},mounted:function(){this.fetch({page:"1"})},components:{BasicRule:c["a"]}},h=p,m=(a("19f6"),a("2877")),g=Object(m["a"])(h,n,o,!1,null,"4bcc6b83",null);e["default"]=g.exports}}]); \ No newline at end of file diff --git a/frontend/dist/js/chunk-7bcb83e6.js b/frontend/dist/js/chunk-7bcb83e6.js deleted file mode 100644 index dd97e9b..0000000 --- a/frontend/dist/js/chunk-7bcb83e6.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7bcb83e6"],{"3c77":function(e,t,a){},"882b":function(e,t,a){"use strict";a("3c77")},"9520c":function(e,t,a){"use strict";a.r(t);var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("a-button",{attrs:{id:"add-rule",type:"primary"},on:{click:e.addRule}},[a("a-icon",{attrs:{type:"plus"}}),e._v(" New Rule ")],1),a("a-drawer",{attrs:{title:e.formAction+" HTTP rule",width:490,visible:e.formVisible,"body-style":{paddingBottom:"80px"}},on:{close:e.closeDrawer}},[a("a-form-model",{ref:"form",attrs:{model:e.form,layout:"vertical"},on:{submit:e.handleSubmit}},[a("BasicRule",{attrs:{form:e.form,readOnly:e.formReadOnly}}),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:24}},[a("a-form-model-item",{attrs:{rules:e.rules.response_status_code,prop:"response_status_code"}},[a("span",{attrs:{slot:"label"},slot:"label"},[e._v(" Response Status Code "),a("a-tooltip",{attrs:{title:"Number between 100-600, or template such as ${query.varname}/${body.varname}/${header.varname}"}},[a("a-icon",{attrs:{type:"question-circle-o"}})],1)],1),a("a-input",{staticStyle:{width:"100%"},attrs:{placeholder:"200",disabled:e.formReadOnly},model:{value:e.form.response_status_code,callback:function(t){e.$set(e.form,"response_status_code",t)},expression:"form.response_status_code"}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:24}},[a("a-form-model-item",[a("span",{attrs:{slot:"label"},slot:"label"},[e._v(" Response Headers "),a("a-tooltip",{attrs:{title:"Support template such as ${query.varname}/${body.varname}/${header.varname}"}},[a("a-icon",{attrs:{type:"question-circle-o"}})],1)],1),e._l(e.headerKeys,(function(t){return a("a-input-group",{key:t,attrs:{compact:""}},[a("a-auto-complete",{directives:[{name:"decorator",rawName:"v-decorator",value:["Header-"+t],expression:"['Header-'+headerKey,]"}],staticStyle:{width:"47%","margin-bottom":"5px"},attrs:{dataSource:e.headerSet,filterOption:e.filterOption,defaultOpen:!1,placeholder:"Header",disabled:e.formReadOnly},model:{value:e.form["Header-"+t],callback:function(a){e.$set(e.form,"Header-"+t,a)},expression:"form['Header-'+headerKey]"}}),a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["Value-"+t],expression:"['Value-'+headerKey,]"}],staticStyle:{width:"53%"},attrs:{placeholder:"Value",disabled:e.formReadOnly},on:{focus:function(){!e.formReadOnly&&t===e.headerKeys[e.headerKeys.length-1]&&e.form["Header-"+t]&&e.addHeader()}},model:{value:e.form["Value-"+t],callback:function(a){e.$set(e.form,"Value-"+t,a)},expression:"form['Value-'+headerKey]"}},[a("a-icon",{staticClass:"dynamic-delete-button",attrs:{slot:"addonAfter",type:"minus-circle-o"},on:{click:function(){return e.formReadOnly?null:e.removeHeader(t)}},slot:"addonAfter"})],1)],1)}))],2)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:24}},[a("a-form-model-item",[a("span",{attrs:{slot:"label"},slot:"label"},[e._v(" Response Body "),a("a-tooltip",{attrs:{title:"Support template such as ${query.varname}/${body.varname}/${header.varname}"}},[a("a-icon",{attrs:{type:"question-circle-o"}})],1)],1),a("a-icon",{staticClass:"full-screen-icon",attrs:{type:"fullscreen"},on:{click:function(t){e.fullScreenTextarea=!0}}}),a("a-textarea",{attrs:{placeholder:"Hello RevSuit!",readOnly:e.formReadOnly,"auto-size":{minRows:10,maxRows:30}},model:{value:e.form.response_body,callback:function(t){e.$set(e.form,"response_body",t)},expression:"form.response_body"}}),a("a-modal",{attrs:{"dialog-style":{top:"40px",bottom:"20px"},width:"80rem",visible:e.fullScreenTextarea,title:"Response Body",okText:""},on:{ok:function(t){e.fullScreenTextarea=!1},cancel:function(t){e.fullScreenTextarea=!1}}},[a("a-textarea",{staticStyle:{height:"100%"},attrs:{placeholder:"Hello RevSuit!",readOnly:e.formReadOnly,"auto-size":{minRows:e.fullScreenTextareaMinRows(),maxRows:1.5*e.fullScreenTextareaMinRows()}},model:{value:e.form.response_body,callback:function(t){e.$set(e.form,"response_body",t)},expression:"form.response_body"}})],1)],1)],1)],1)],1),a("div",{style:{position:"absolute",right:0,bottom:0,width:"100%",borderTop:"1px solid #e9e9e9",padding:"10px 16px",background:"#fff",textAlign:"right",zIndex:1}},[a("a-button",{style:{marginRight:"8px"},on:{click:e.handleCancel}},[e._v(" Cancel ")]),a("a-button",{attrs:{type:"primary",disabled:e.formReadOnly},on:{click:e.handleSubmit}},[e._v(" Submit ")])],1)],1),a("a-table",{attrs:{columns:e.columns,"data-source":e.data,loading:e.loading,pagination:e.pagination},on:{change:e.handleTableChange},scopedSlots:e._u([{key:"filterDropdown",fn:function(t){var o=t.setSelectedKeys,r=t.selectedKeys,n=(t.clearFilters,t.column);return a("div",{staticStyle:{padding:"8px"}},[a("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+n.dataIndex,value:r[0]},on:{change:function(e){return o(e.target.value?[e.target.value]:[])},pressEnter:function(){e.filters[n.dataIndex]=r[0],e.fetch()}}}),a("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){e.filters[n.dataIndex]=r[0],e.fetch()}}},[e._v(" Search ")])],1)}},{key:"filterIcon",fn:function(e){return a("a-icon",{style:{color:e?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"rank",fn:function(t){return a("span",{},[a("a-tag",{attrs:{color:"#"+(2996213+80*t).toString(16)}},[e._v(" "+e._s(t)+" ")])],1)}},{key:"switchRender",fn:function(t,o,r,n){return a("span",{},[a("a-switch",{attrs:{checked:t},on:{click:function(t){return e.clickSwitch(o,n.dataIndex)}}})],1)}},{key:"action",fn:function(t,o,r){return a("span",{},[a("a-button",{staticStyle:{color:"#67C23A","background-color":"transparent","border-color":"#67C23A","text-shadow":"none",margin:"0 10px 3px 0"},attrs:{size:"small",ghost:""},on:{click:function(t){return e.viewRule(o)}}},[e._v("View")]),a("a-button",{staticStyle:{color:"#909399","background-color":"transparent","border-color":"#909399","text-shadow":"none",margin:"0 10px 3px 0"},attrs:{size:"small",ghost:""},on:{click:function(t){return e.editRule(o,r)}}},[e._v("Edit")]),a("a-popconfirm",{attrs:{title:"Are you sure delete this task?","ok-text":"Yes","cancel-text":"No"},on:{confirm:function(t){return e.deleteRule(o,r)}}},[a("a-button",{attrs:{type:"danger",size:"small",ghost:""}},[e._v("Delete")])],1)],1)}}])})],1)},r=[],n=a("5530"),i=(a("a434"),a("fb6a"),a("34c6")),s=a("56d7"),c=a("2084"),l="View",d="Edit",u="Create",f=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"NAME",dataIndex:"name",key:"name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG FORMAT",dataIndex:"flag_format",key:"flag_format",ellipsis:!0},{title:"RANK",dataIndex:"rank",key:"rank",scopedSlots:{customRender:"rank"}},{title:"PUSH TO CLIENT",dataIndex:"push_to_client",key:"push_to_client",scopedSlots:{customRender:"switchRender"}},{title:"NOTICE",dataIndex:"notice",key:"notice",scopedSlots:{customRender:"switchRender"}},{title:"Action",key:"action",scopedSlots:{customRender:"action"}}],p={response_status_code:[{validator:function(e,t,a){return void 0===t||!isNaN(t)&&1001&&this.headerKeys.splice(this.headerKeys.indexOf(e),1)},filterOption:function(e,t){return t.componentOptions.children[0].text.toUpperCase().indexOf(e.toUpperCase())>=0},handleSubmit:function(){var e=this;this.$refs.form.validate((function(t){if(!t)return!1;var a={},o={};for(var r in e.form)if(0===r.indexOf("Header-")){var n=r.substr("Header-".length);e.form["Value-"+n]&&(o[e.form[r]]=e.form["Value-"+n])}else-1===r.indexOf("Value-")&&(a[r]=e.form[r]);a.response_headers=o,Object(i["m"])(a).then((function(){e.closeDrawer(),e.fetch({page:e.pagination.current}),e.$notification.info({message:"Success",style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:2.5})})).catch((function(t){e.$notification.error({message:e.formAction+" failed",description:t.response.data.error,style:{width:"600px",marginLeft:"".concat(-265,"px")},duration:4})}))}))},handleCancel:function(){this.form={},this.closeDrawer()},fullScreenTextareaMinRows:function(){return document.body.clientHeight/window.getComputedStyle(document.body)["fontSize"].slice(0,-2)*.5}},mounted:function(){this.fetch({page:"1"})},components:{BasicRule:c["a"]}},m=h,y=(a("882b"),a("2877")),g=Object(y["a"])(m,o,r,!1,null,"79ad429e",null);t["default"]=g.exports},fb6a:function(e,t,a){"use strict";var o=a("23e7"),r=a("861d"),n=a("e8b5"),i=a("23cb"),s=a("50c4"),c=a("fc6a"),l=a("8418"),d=a("b622"),u=a("1dde"),f=u("slice"),p=d("species"),h=[].slice,m=Math.max;o({target:"Array",proto:!0,forced:!f},{slice:function(e,t){var a,o,d,u=c(this),f=s(u.length),y=i(e,f),g=i(void 0===t?f:t,f);if(n(u)&&(a=u.constructor,"function"!=typeof a||a!==Array&&!n(a.prototype)?r(a)&&(a=a[p],null===a&&(a=void 0)):a=void 0,a===Array||void 0===a))return h.call(u,y,g);for(o=new(void 0===a?Array:a)(m(g-y,0)),d=0;y1?arguments[1]:void 0)}},"1dde":function(t,e,r){var n=r("d039"),o=r("b622"),i=r("2d00"),c=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[],r=e.constructor={};return r[c]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"333e":function(t,e,r){"use strict";r("db2e")},"4de4":function(t,e,r){"use strict";var n=r("23e7"),o=r("b727").filter,i=r("1dde"),c=i("filter");n({target:"Array",proto:!0,forced:!c},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},5530:function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));r("b64b"),r("a4d3"),r("4de4"),r("e439"),r("159b"),r("dbb4");function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;ei)o.push(arguments[i++]);if(n=e,(p(e)||void 0!==t)&&!at(t))return d(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!at(e))return e}),o[1]=e,G.apply(null,o)}})}B[L][q]||k(B[L],q,B[L].valueOf),T(B,J),A[M]=!0},a640:function(t,e,r){"use strict";var n=r("d039");t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},b64b:function(t,e,r){var n=r("23e7"),o=r("7b0b"),i=r("df75"),c=r("d039"),a=c((function(){i(1)}));n({target:"Object",stat:!0,forced:a},{keys:function(t){return i(o(t))}})},b727:function(t,e,r){var n=r("0366"),o=r("44ad"),i=r("7b0b"),c=r("50c4"),a=r("65f0"),f=[].push,s=function(t){var e=1==t,r=2==t,s=3==t,u=4==t,l=6==t,d=7==t,p=5==t||l;return function(b,h,y,g){for(var m,v,w=i(b),O=o(w),S=n(h,y,3),j=c(O.length),x=0,I=g||a,D=e?I(b,j):r||d?I(b,0):void 0;j>x;x++)if((p||x in O)&&(m=O[x],v=S(m,x,w),t))if(e)D[x]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return x;case 2:f.call(D,m)}else switch(t){case 4:return!1;case 7:f.call(D,m)}return l?-1:s||u?u:D}};t.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterOut:s(7)}},db2e:function(t,e,r){},db40:function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{padding:"8px"},attrs:{slot:"filterDropdown"},slot:"filterDropdown"},[r("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+t.column.dataIndex,value:t.selectedKeys[0]},on:{change:function(e){return t.setSelectedKeys(e.target.value?[e.target.value]:[])},pressEnter:function(){t.filters[t.column.dataIndex]=t.selectedKeys[0],t.fetch()}}}),r("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[t.column.dataIndex]=t.selectedKeys[0],t.fetch()}}},[t._v(" Search ")]),r("a-button",{staticStyle:{width:"90px"},attrs:{size:"small"},on:{click:function(){t.clearFilters(),delete t.filters[t.column.dataIndex],t.fetch()}}},[t._v(" Reset ")])],1)},o=[],i={name:"FilterDropdown",props:["setSelectedKeys","selectedKeys","clearFilters","column","filters","fetch"]},c=i,a=r("2877"),f=Object(a["a"])(c,n,o,!1,null,"5e6f101e",null);e["a"]=f.exports},dbb4:function(t,e,r){var n=r("23e7"),o=r("83ab"),i=r("56ef"),c=r("fc6a"),a=r("06cf"),f=r("8418");n({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){var e,r,n=c(t),o=a.f,s=i(n),u={},l=0;while(s.length>l)r=o(n,e=s[l++]),void 0!==r&&f(u,e,r);return u}})},e439:function(t,e,r){var n=r("23e7"),o=r("d039"),i=r("fc6a"),c=r("06cf").f,a=r("83ab"),f=o((function(){c(1)})),s=!a||f;n({target:"Object",stat:!0,forced:s,sham:!a},{getOwnPropertyDescriptor:function(t,e){return c(i(t),e)}})},e5383:function(t,e,r){var n=r("b622");e.f=n},e5bf:function(t,e,r){"use strict";r.d(e,"c",(function(){return o})),r.d(e,"a",(function(){return i})),r.d(e,"d",(function(){return c})),r.d(e,"e",(function(){return a})),r.d(e,"b",(function(){return f}));var n=r("365c");function o(t){return Object(n["a"])({url:"/record/http",params:t,method:"get"})}function i(t){return Object(n["a"])({url:"/record/dns",params:t,method:"get"})}function c(t){return Object(n["a"])({url:"/record/mysql",params:t,method:"get"})}function a(t){return Object(n["a"])({url:"/record/rmi",params:t,method:"get"})}function f(t){return Object(n["a"])({url:"/record/ftp",params:t,method:"get"})}},e8b5:function(t,e,r){var n=r("c6b6");t.exports=Array.isArray||function(t){return"Array"==n(t)}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e039e75a"],{"057f":function(t,e,r){var n=r("fc6a"),o=r("241c").f,i={}.toString,c="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return o(t)}catch(e){return c.slice()}};t.exports.f=function(t){return c&&"[object Window]"==i.call(t)?a(t):o(n(t))}},"159b":function(t,e,r){var n=r("da84"),o=r("fdbc"),i=r("17c2"),c=r("9112");for(var a in o){var f=n[a],s=f&&f.prototype;if(s&&s.forEach!==i)try{c(s,"forEach",i)}catch(u){s.forEach=i}}},"17c2":function(t,e,r){"use strict";var n=r("b727").forEach,o=r("a640"),i=o("forEach");t.exports=i?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},"1dde":function(t,e,r){var n=r("d039"),o=r("b622"),i=r("2d00"),c=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[],r=e.constructor={};return r[c]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"333e":function(t,e,r){"use strict";r("db2e")},"4de4":function(t,e,r){"use strict";var n=r("23e7"),o=r("b727").filter,i=r("1dde"),c=i("filter");n({target:"Array",proto:!0,forced:!c},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},5530:function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));r("b64b"),r("a4d3"),r("4de4"),r("e439"),r("159b"),r("dbb4");function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;ei)o.push(arguments[i++]);if(n=e,(p(e)||void 0!==t)&&!at(t))return d(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!at(e))return e}),o[1]=e,G.apply(null,o)}})}B[q][L]||k(B[q],L,B[q].valueOf),T(B,J),A[M]=!0},a640:function(t,e,r){"use strict";var n=r("d039");t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},b64b:function(t,e,r){var n=r("23e7"),o=r("7b0b"),i=r("df75"),c=r("d039"),a=c((function(){i(1)}));n({target:"Object",stat:!0,forced:a},{keys:function(t){return i(o(t))}})},b727:function(t,e,r){var n=r("0366"),o=r("44ad"),i=r("7b0b"),c=r("50c4"),a=r("65f0"),f=[].push,s=function(t){var e=1==t,r=2==t,s=3==t,u=4==t,l=6==t,d=7==t,p=5==t||l;return function(b,h,y,g){for(var m,v,w=i(b),O=o(w),S=n(h,y,3),j=c(O.length),x=0,I=g||a,D=e?I(b,j):r||d?I(b,0):void 0;j>x;x++)if((p||x in O)&&(m=O[x],v=S(m,x,w),t))if(e)D[x]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return x;case 2:f.call(D,m)}else switch(t){case 4:return!1;case 7:f.call(D,m)}return l?-1:s||u?u:D}};t.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterOut:s(7)}},db2e:function(t,e,r){},db40:function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{padding:"8px"},attrs:{slot:"filterDropdown"},slot:"filterDropdown"},[r("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+t.column.dataIndex,value:t.selectedKeys[0]},on:{change:function(e){return t.setSelectedKeys(e.target.value?[e.target.value]:[])},pressEnter:function(){t.filters[t.column.dataIndex]=t.selectedKeys[0],t.fetch()}}}),r("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[t.column.dataIndex]=t.selectedKeys[0],t.fetch()}}},[t._v(" Search ")]),r("a-button",{staticStyle:{width:"90px"},attrs:{size:"small"},on:{click:function(){t.clearFilters(),delete t.filters[t.column.dataIndex],t.fetch()}}},[t._v(" Reset ")])],1)},o=[],i={name:"FilterDropdown",props:["setSelectedKeys","selectedKeys","clearFilters","column","filters","fetch"]},c=i,a=r("2877"),f=Object(a["a"])(c,n,o,!1,null,"5e6f101e",null);e["a"]=f.exports},dbb4:function(t,e,r){var n=r("23e7"),o=r("83ab"),i=r("56ef"),c=r("fc6a"),a=r("06cf"),f=r("8418");n({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){var e,r,n=c(t),o=a.f,s=i(n),u={},l=0;while(s.length>l)r=o(n,e=s[l++]),void 0!==r&&f(u,e,r);return u}})},e439:function(t,e,r){var n=r("23e7"),o=r("d039"),i=r("fc6a"),c=r("06cf").f,a=r("83ab"),f=o((function(){c(1)})),s=!a||f;n({target:"Object",stat:!0,forced:s,sham:!a},{getOwnPropertyDescriptor:function(t,e){return c(i(t),e)}})},e5383:function(t,e,r){var n=r("b622");e.f=n},e5bf:function(t,e,r){"use strict";r.d(e,"c",(function(){return o})),r.d(e,"a",(function(){return i})),r.d(e,"d",(function(){return c})),r.d(e,"e",(function(){return a})),r.d(e,"b",(function(){return f}));var n=r("365c");function o(t){return Object(n["a"])({url:"/record/http",params:t,method:"get"})}function i(t){return Object(n["a"])({url:"/record/dns",params:t,method:"get"})}function c(t){return Object(n["a"])({url:"/record/mysql",params:t,method:"get"})}function a(t){return Object(n["a"])({url:"/record/rmi",params:t,method:"get"})}function f(t){return Object(n["a"])({url:"/record/ftp",params:t,method:"get"})}},e8b5:function(t,e,r){var n=r("c6b6");t.exports=Array.isArray||function(t){return"Array"==n(t)}}}]); \ No newline at end of file diff --git a/frontend/dist/js/chunk-fef965c2.js b/frontend/dist/js/chunk-fef965c2.js index eb2bec6..c650641 100644 --- a/frontend/dist/js/chunk-fef965c2.js +++ b/frontend/dist/js/chunk-fef965c2.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-fef965c2"],{"057f":function(t,e,r){var n=r("fc6a"),o=r("241c").f,a={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(t){try{return o(t)}catch(e){return i.slice()}};t.exports.f=function(t){return i&&"[object Window]"==a.call(t)?c(t):o(n(t))}},"159b":function(t,e,r){var n=r("da84"),o=r("fdbc"),a=r("17c2"),i=r("9112");for(var c in o){var f=n[c],s=f&&f.prototype;if(s&&s.forEach!==a)try{i(s,"forEach",a)}catch(l){s.forEach=a}}},"17c2":function(t,e,r){"use strict";var n=r("b727").forEach,o=r("a640"),a=o("forEach");t.exports=a?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},"1dde":function(t,e,r){var n=r("d039"),o=r("b622"),a=r("2d00"),i=o("species");t.exports=function(t){return a>=51||!n((function(){var e=[],r=e.constructor={};return r[i]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"2e9f":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("a-table",{attrs:{columns:t.columns,"data-source":t.data,loading:t.loading,pagination:t.pagination,rowClassName:function(t,e){return e%2===0?"":"gray-table-row"}},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"expandedRowRender",fn:function(e){return e.files.length?r("div",{staticStyle:{margin:"0"}},[e.files.length?r("b",{staticStyle:{color:"gray"}},[t._v("FILES:")]):t._e(),r("br"),t._l(e.files,(function(n){return r("a",{key:n.name+e.id,attrs:{href:"/revsuit/api/file/mysql/"+n.id,target:"_blank"}},[t._v(t._s(n.name)+" ")])}))],2):t._e()}},{key:"selectDropdown",fn:function(e){e.setSelectedKeys,e.selectedKeys,e.clearFilters;var n=e.column;return r("div",{staticStyle:{padding:"8px"}},[r("a-checkbox",{attrs:{checked:"true"===t.filters[n.dataIndex]},on:{change:function(e){e.target.checked?t.filters[n.dataIndex]="true":t.filters[n.dataIndex]="",t.fetch()}}},[t._v(" True ")]),r("br"),r("a-checkbox",{attrs:{checked:"false"===t.filters[n.dataIndex]},on:{change:function(e){e.target.checked?t.filters[n.dataIndex]="false":t.filters[n.dataIndex]="",t.fetch()}}},[t._v(" False ")])],1)}},{key:"filterDropdown",fn:function(e){var n=e.setSelectedKeys,o=e.selectedKeys,a=e.clearFilters,i=e.column;return r("filter-dropdown",{attrs:{"set-selected-keys":n,"selected-keys":o,"clear-filters":a,column:i,filters:t.filters,fetch:t.fetch}})}},{key:"filterIcon",fn:function(t){return r("a-icon",{style:{color:t?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"time",fn:function(e){return r("span",{},[t._v(" "+t._s(new Date(e).format("yyyy-MM-dd hh:mm:ss"))+" ")])}},{key:"loadData",fn:function(e){return r("span",{},[e?r("a-tag",{attrs:{color:"#eb2f96"}},[t._v("TRUE")]):r("a-tag",{attrs:{color:"#f5222d"}},[t._v("FALSE")])],1)}},{key:"fileNum",fn:function(e){return r("span",{},[e.length>=3?r("a-tag",{attrs:{color:"#722ed1"}},[t._v(t._s(e.length))]):r("a-tag",{attrs:{color:t.colors[e.length]}},[t._v(" "+t._s(e.length)+" ")])],1)}}],null,!0)})},o=[],a=r("5530"),i=r("e5bf"),c=r("56d7"),f=r("db40"),s=["#13c2c2","#52c41a","#02a7ff"],l=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"REQUEST TIME",dataIndex:"request_time",key:"request_time",scopedSlots:{customRender:"time"}},{title:"RULE",dataIndex:"rule_name",key:"rule_name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG",dataIndex:"flag",key:"flag",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"USER",dataIndex:"username",key:"username",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"LOAD DATA",dataIndex:"load_local_data",key:"load_local_data",scopedSlots:{filterDropdown:"selectDropdown",filterIcon:"filterIcon",customRender:"loadData"}},{title:"FILE NUM",dataIndex:"files",key:"files",scopedSlots:{customRender:"fileNum"}},{title:"CLIENT NAME",dataIndex:"client_name",key:"client_name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"CLIENT OS",dataIndex:"client_os",key:"client_os",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"REMOTE IP",key:"remote_ip",dataIndex:"remote_ip",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"IP AREA",key:"ip_area",dataIndex:"ip_area"}],u={name:"MysqlLogs",data:function(){return{store:c["store"],data:[],pagination:{current:1,showSizeChanger:!0,pageSize:c["store"].pageSize,onShowSizeChange:function(t,e){c["store"].pageSize=e}},filters:{},order:"desc",loading:!1,columns:l,colors:s}},methods:{handleTableChange:function(t,e,r){var n=Object(a["a"])({},this.pagination);n.current=t.current,this.pagination=n,this.order="ascend"===r.order?"asc":"desc",this.fetch()},fetch:function(){var t=this,e=Object(a["a"])(Object(a["a"])({},this.filters),{},{page:this.pagination.current,pageSize:this.pagination.pageSize,order:this.order});this.loading=!0,Object(i["d"])(e).then((function(e){var r=e.data.result;t.data=r.data;var n=Object(a["a"])({},t.pagination);n.total=r.count,t.pagination=n,t.loading=!1})).catch((function(e){t.$notification.error({message:"Unknown error: "+e.response.status,style:{width:"100px",marginLeft:"".concat(-265,"px")},duration:4})}))}},mounted:function(){this.fetch()},components:{FilterDropdown:f["a"]}},d=u,p=(r("6aae"),r("2877")),h=Object(p["a"])(d,n,o,!1,null,null,null);e["default"]=h.exports},"4de4":function(t,e,r){"use strict";var n=r("23e7"),o=r("b727").filter,a=r("1dde"),i=a("filter");n({target:"Array",proto:!0,forced:!i},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},"50ec":function(t,e,r){},5530:function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));r("b64b"),r("a4d3"),r("4de4"),r("e439"),r("159b"),r("dbb4");function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function a(t){for(var e=1;ea)o.push(arguments[a++]);if(n=e,(p(e)||void 0!==t)&&!ct(t))return d(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!ct(e))return e}),o[1]=e,G.apply(null,o)}})}B[U][q]||j(B[U],q,B[U].valueOf),K(B,M),A[C]=!0},a640:function(t,e,r){"use strict";var n=r("d039");t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},b64b:function(t,e,r){var n=r("23e7"),o=r("7b0b"),a=r("df75"),i=r("d039"),c=i((function(){a(1)}));n({target:"Object",stat:!0,forced:c},{keys:function(t){return a(o(t))}})},b727:function(t,e,r){var n=r("0366"),o=r("44ad"),a=r("7b0b"),i=r("50c4"),c=r("65f0"),f=[].push,s=function(t){var e=1==t,r=2==t,s=3==t,l=4==t,u=6==t,d=7==t,p=5==t||u;return function(h,b,y,g){for(var m,v,w=a(h),O=o(w),S=n(b,y,3),I=i(O.length),x=0,_=g||c,k=e?_(h,I):r||d?_(h,0):void 0;I>x;x++)if((p||x in O)&&(m=O[x],v=S(m,x,w),t))if(e)k[x]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return x;case 2:f.call(k,m)}else switch(t){case 4:return!1;case 7:f.call(k,m)}return u?-1:s||l?l:k}};t.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterOut:s(7)}},db40:function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{padding:"8px"},attrs:{slot:"filterDropdown"},slot:"filterDropdown"},[r("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+t.column.dataIndex,value:t.selectedKeys[0]},on:{change:function(e){return t.setSelectedKeys(e.target.value?[e.target.value]:[])},pressEnter:function(){t.filters[t.column.dataIndex]=t.selectedKeys[0],t.fetch()}}}),r("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[t.column.dataIndex]=t.selectedKeys[0],t.fetch()}}},[t._v(" Search ")]),r("a-button",{staticStyle:{width:"90px"},attrs:{size:"small"},on:{click:function(){t.clearFilters(),delete t.filters[t.column.dataIndex],t.fetch()}}},[t._v(" Reset ")])],1)},o=[],a={name:"FilterDropdown",props:["setSelectedKeys","selectedKeys","clearFilters","column","filters","fetch"]},i=a,c=r("2877"),f=Object(c["a"])(i,n,o,!1,null,"5e6f101e",null);e["a"]=f.exports},dbb4:function(t,e,r){var n=r("23e7"),o=r("83ab"),a=r("56ef"),i=r("fc6a"),c=r("06cf"),f=r("8418");n({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){var e,r,n=i(t),o=c.f,s=a(n),l={},u=0;while(s.length>u)r=o(n,e=s[u++]),void 0!==r&&f(l,e,r);return l}})},e439:function(t,e,r){var n=r("23e7"),o=r("d039"),a=r("fc6a"),i=r("06cf").f,c=r("83ab"),f=o((function(){i(1)})),s=!c||f;n({target:"Object",stat:!0,forced:s,sham:!c},{getOwnPropertyDescriptor:function(t,e){return i(a(t),e)}})},e5383:function(t,e,r){var n=r("b622");e.f=n},e5bf:function(t,e,r){"use strict";r.d(e,"c",(function(){return o})),r.d(e,"a",(function(){return a})),r.d(e,"d",(function(){return i})),r.d(e,"e",(function(){return c})),r.d(e,"b",(function(){return f}));var n=r("365c");function o(t){return Object(n["a"])({url:"/record/http",params:t,method:"get"})}function a(t){return Object(n["a"])({url:"/record/dns",params:t,method:"get"})}function i(t){return Object(n["a"])({url:"/record/mysql",params:t,method:"get"})}function c(t){return Object(n["a"])({url:"/record/rmi",params:t,method:"get"})}function f(t){return Object(n["a"])({url:"/record/ftp",params:t,method:"get"})}},e8b5:function(t,e,r){var n=r("c6b6");t.exports=Array.isArray||function(t){return"Array"==n(t)}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-fef965c2"],{"057f":function(t,e,r){var n=r("fc6a"),o=r("241c").f,a={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(t){try{return o(t)}catch(e){return i.slice()}};t.exports.f=function(t){return i&&"[object Window]"==a.call(t)?c(t):o(n(t))}},"159b":function(t,e,r){var n=r("da84"),o=r("fdbc"),a=r("17c2"),i=r("9112");for(var c in o){var s=n[c],f=s&&s.prototype;if(f&&f.forEach!==a)try{i(f,"forEach",a)}catch(l){f.forEach=a}}},"17c2":function(t,e,r){"use strict";var n=r("b727").forEach,o=r("a640"),a=o("forEach");t.exports=a?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},"1dde":function(t,e,r){var n=r("d039"),o=r("b622"),a=r("2d00"),i=o("species");t.exports=function(t){return a>=51||!n((function(){var e=[],r=e.constructor={};return r[i]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"2e9f":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("a-table",{staticStyle:{"overflow-x":"auto"},attrs:{columns:t.columns,"data-source":t.data,loading:t.loading,pagination:t.pagination,rowClassName:function(t,e){return e%2===0?"":"gray-table-row"}},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"expandedRowRender",fn:function(e){return e.files.length?r("div",{staticStyle:{margin:"0"}},[e.files.length?r("b",{staticStyle:{color:"gray"}},[t._v("FILES:")]):t._e(),r("br"),t._l(e.files,(function(n){return r("a",{key:n.name+e.id,attrs:{href:"/revsuit/api/file/mysql/"+n.id,target:"_blank"}},[t._v(t._s(n.name)+" ")])}))],2):t._e()}},{key:"selectDropdown",fn:function(e){e.setSelectedKeys,e.selectedKeys,e.clearFilters;var n=e.column;return r("div",{staticStyle:{padding:"8px"}},[r("a-checkbox",{attrs:{checked:"true"===t.filters[n.dataIndex]},on:{change:function(e){e.target.checked?t.filters[n.dataIndex]="true":t.filters[n.dataIndex]="",t.fetch()}}},[t._v(" True ")]),r("br"),r("a-checkbox",{attrs:{checked:"false"===t.filters[n.dataIndex]},on:{change:function(e){e.target.checked?t.filters[n.dataIndex]="false":t.filters[n.dataIndex]="",t.fetch()}}},[t._v(" False ")])],1)}},{key:"filterDropdown",fn:function(e){var n=e.setSelectedKeys,o=e.selectedKeys,a=e.clearFilters,i=e.column;return r("filter-dropdown",{attrs:{"set-selected-keys":n,"selected-keys":o,"clear-filters":a,column:i,filters:t.filters,fetch:t.fetch}})}},{key:"filterIcon",fn:function(t){return r("a-icon",{style:{color:t?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"time",fn:function(e){return r("span",{},[t._v(" "+t._s(new Date(e).format("yyyy-MM-dd hh:mm:ss"))+" ")])}},{key:"loadData",fn:function(e){return r("span",{},[e?r("a-tag",{attrs:{color:"#eb2f96"}},[t._v("TRUE")]):r("a-tag",{attrs:{color:"#f5222d"}},[t._v("FALSE")])],1)}},{key:"fileNum",fn:function(e){return r("span",{},[e.length>=3?r("a-tag",{attrs:{color:"#722ed1"}},[t._v(t._s(e.length))]):r("a-tag",{attrs:{color:t.colors[e.length]}},[t._v(" "+t._s(e.length)+" ")])],1)}}],null,!0)})},o=[],a=r("5530"),i=r("e5bf"),c=r("56d7"),s=r("db40"),f=["#13c2c2","#52c41a","#02a7ff"],l=[{title:"ID",dataIndex:"id",key:"id",sorter:!0,sortDirections:["descend","ascend"]},{title:"REQUEST TIME",dataIndex:"request_time",key:"request_time",scopedSlots:{customRender:"time"}},{title:"RULE",dataIndex:"rule_name",key:"rule_name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"FLAG",dataIndex:"flag",key:"flag",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"USER",dataIndex:"username",key:"username",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"SCHEMA",dataIndex:"schema",key:"schema",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"LOAD DATA",dataIndex:"load_local_data",key:"load_local_data",scopedSlots:{filterDropdown:"selectDropdown",filterIcon:"filterIcon",customRender:"loadData"}},{title:"FILE NUM",dataIndex:"files",key:"files",scopedSlots:{customRender:"fileNum"}},{title:"CLIENT NAME",dataIndex:"client_name",key:"client_name",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"CLIENT OS",dataIndex:"client_os",key:"client_os",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"REMOTE IP",key:"remote_ip",dataIndex:"remote_ip",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon"}},{title:"IP AREA",key:"ip_area",dataIndex:"ip_area"}],u={name:"MysqlLogs",data:function(){return{store:c["store"],data:[],pagination:{current:1,showSizeChanger:!0,pageSize:c["store"].pageSize,onShowSizeChange:function(t,e){c["store"].pageSize=e}},filters:{},order:"desc",loading:!1,columns:l,colors:f}},methods:{handleTableChange:function(t,e,r){var n=Object(a["a"])({},this.pagination);n.current=t.current,this.pagination=n,this.order="ascend"===r.order?"asc":"desc",this.fetch()},fetch:function(){var t=this,e=Object(a["a"])(Object(a["a"])({},this.filters),{},{page:this.pagination.current,pageSize:this.pagination.pageSize,order:this.order});this.loading=!0,Object(i["d"])(e).then((function(e){var r=e.data.result;t.data=r.data;var n=Object(a["a"])({},t.pagination);n.total=r.count,t.pagination=n,t.loading=!1})).catch((function(e){403!==e.response.status&&t.$message.error("Unknown error with status code: "+e.response.status)}))}},mounted:function(){this.fetch()},components:{FilterDropdown:s["a"]}},d=u,p=(r("6aae"),r("2877")),h=Object(p["a"])(d,n,o,!1,null,null,null);e["default"]=h.exports},"4de4":function(t,e,r){"use strict";var n=r("23e7"),o=r("b727").filter,a=r("1dde"),i=a("filter");n({target:"Array",proto:!0,forced:!i},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},"50ec":function(t,e,r){},5530:function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));r("b64b"),r("a4d3"),r("4de4"),r("e439"),r("159b"),r("dbb4");function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function a(t){for(var e=1;ea)o.push(arguments[a++]);if(n=e,(p(e)||void 0!==t)&&!ct(t))return d(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!ct(e))return e}),o[1]=e,G.apply(null,o)}})}B[U][q]||j(B[U],q,B[U].valueOf),K(B,M),A[L]=!0},a640:function(t,e,r){"use strict";var n=r("d039");t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},b64b:function(t,e,r){var n=r("23e7"),o=r("7b0b"),a=r("df75"),i=r("d039"),c=i((function(){a(1)}));n({target:"Object",stat:!0,forced:c},{keys:function(t){return a(o(t))}})},b727:function(t,e,r){var n=r("0366"),o=r("44ad"),a=r("7b0b"),i=r("50c4"),c=r("65f0"),s=[].push,f=function(t){var e=1==t,r=2==t,f=3==t,l=4==t,u=6==t,d=7==t,p=5==t||u;return function(h,b,y,g){for(var m,v,w=a(h),S=o(w),O=n(b,y,3),I=i(S.length),x=0,k=g||c,_=e?k(h,I):r||d?k(h,0):void 0;I>x;x++)if((p||x in S)&&(m=S[x],v=O(m,x,w),t))if(e)_[x]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return x;case 2:s.call(_,m)}else switch(t){case 4:return!1;case 7:s.call(_,m)}return u?-1:f||l?l:_}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterOut:f(7)}},db40:function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{padding:"8px"},attrs:{slot:"filterDropdown"},slot:"filterDropdown"},[r("a-input",{staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search "+t.column.dataIndex,value:t.selectedKeys[0]},on:{change:function(e){return t.setSelectedKeys(e.target.value?[e.target.value]:[])},pressEnter:function(){t.filters[t.column.dataIndex]=t.selectedKeys[0],t.fetch()}}}),r("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){t.filters[t.column.dataIndex]=t.selectedKeys[0],t.fetch()}}},[t._v(" Search ")]),r("a-button",{staticStyle:{width:"90px"},attrs:{size:"small"},on:{click:function(){t.clearFilters(),delete t.filters[t.column.dataIndex],t.fetch()}}},[t._v(" Reset ")])],1)},o=[],a={name:"FilterDropdown",props:["setSelectedKeys","selectedKeys","clearFilters","column","filters","fetch"]},i=a,c=r("2877"),s=Object(c["a"])(i,n,o,!1,null,"5e6f101e",null);e["a"]=s.exports},dbb4:function(t,e,r){var n=r("23e7"),o=r("83ab"),a=r("56ef"),i=r("fc6a"),c=r("06cf"),s=r("8418");n({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){var e,r,n=i(t),o=c.f,f=a(n),l={},u=0;while(f.length>u)r=o(n,e=f[u++]),void 0!==r&&s(l,e,r);return l}})},e439:function(t,e,r){var n=r("23e7"),o=r("d039"),a=r("fc6a"),i=r("06cf").f,c=r("83ab"),s=o((function(){i(1)})),f=!c||s;n({target:"Object",stat:!0,forced:f,sham:!c},{getOwnPropertyDescriptor:function(t,e){return i(a(t),e)}})},e5383:function(t,e,r){var n=r("b622");e.f=n},e5bf:function(t,e,r){"use strict";r.d(e,"c",(function(){return o})),r.d(e,"a",(function(){return a})),r.d(e,"d",(function(){return i})),r.d(e,"e",(function(){return c})),r.d(e,"b",(function(){return s}));var n=r("365c");function o(t){return Object(n["a"])({url:"/record/http",params:t,method:"get"})}function a(t){return Object(n["a"])({url:"/record/dns",params:t,method:"get"})}function i(t){return Object(n["a"])({url:"/record/mysql",params:t,method:"get"})}function c(t){return Object(n["a"])({url:"/record/rmi",params:t,method:"get"})}function s(t){return Object(n["a"])({url:"/record/ftp",params:t,method:"get"})}},e8b5:function(t,e,r){var n=r("c6b6");t.exports=Array.isArray||function(t){return"Array"==n(t)}}}]); \ No newline at end of file diff --git a/frontend/src/App.vue b/frontend/src/App.vue index dbc86b5..5006090 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -148,6 +148,9 @@ export default { } }, mounted() { + if (localStorage.getItem("autoRefresh") === null) { + this.autoRefresh = true; + } if (this.autoRefresh && this.isLogMode) { this.timing() } @@ -176,8 +179,6 @@ export default { isLogMode(val) { if (!val) { clearInterval(this.timer) - } else { - this.timing() } }, refreshInterval(val) { diff --git a/frontend/src/views/logs/Dns.vue b/frontend/src/views/logs/Dns.vue index 1845db4..71f9af7 100644 --- a/frontend/src/views/logs/Dns.vue +++ b/frontend/src/views/logs/Dns.vue @@ -1,5 +1,6 @@