Compare commits
370 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e31d820e0 | ||
|
|
92353d859a | ||
|
|
bef8d69e59 | ||
|
|
b3ab78e063 | ||
|
|
95d2c6cb65 | ||
|
|
7017c7502b | ||
|
|
c14055ba8c | ||
|
|
04aa6c9680 | ||
|
|
397bbb2657 | ||
|
|
9a68282127 | ||
|
|
dcd02acc61 | ||
|
|
1025688e9b | ||
|
|
26eeb26a75 | ||
|
|
7f76325284 | ||
|
|
de9a921c49 | ||
|
|
a9ac9d0f79 | ||
|
|
a14b28de6a | ||
|
|
ccd7430b8f | ||
|
|
6791ea5770 | ||
|
|
2d5835b150 | ||
|
|
cec11ce8c3 | ||
|
|
972103841c | ||
|
|
89f6d2cd1c | ||
|
|
d13008ce0c | ||
|
|
abf384dd3c | ||
|
|
0abd4a893b | ||
|
|
d0710fb52b | ||
|
|
534fe83ac2 | ||
|
|
d95d958de0 | ||
|
|
4e5730f31f | ||
|
|
81b9bacb96 | ||
|
|
dc42a31711 | ||
|
|
27e3e65ea1 | ||
|
|
a001ab3f16 | ||
|
|
aeb161a482 | ||
|
|
5ecb476be5 | ||
|
|
5389334304 | ||
|
|
56ece9c854 | ||
|
|
a217b95783 | ||
|
|
ffcdd80996 | ||
|
|
f804dc0338 | ||
|
|
25359f0f66 | ||
|
|
932bdb86ad | ||
|
|
0e14e55c5a | ||
|
|
e2a645d1e1 | ||
|
|
51392e09e2 | ||
|
|
8d71d64d49 | ||
|
|
956c34176d | ||
|
|
f65aa89421 | ||
|
|
c481cb0ae4 | ||
|
|
a734ec40ec | ||
|
|
2a5bda3d00 | ||
|
|
72579c7e83 | ||
|
|
41797e41d2 | ||
|
|
35733e80eb | ||
|
|
4119dbad6a | ||
|
|
c0122079c1 | ||
|
|
c793ebf394 | ||
|
|
45b3e0746a | ||
|
|
aaf18d79bf | ||
|
|
4e3f548ac8 | ||
|
|
cbe1eeec74 | ||
|
|
0557c41454 | ||
|
|
c2311f0682 | ||
|
|
3b89e9bf29 | ||
|
|
6b14c2ef9c | ||
|
|
6606d2ca76 | ||
|
|
1846a496c1 | ||
|
|
7996ae5b63 | ||
|
|
cb5657c685 | ||
|
|
95759adf91 | ||
|
|
4d08a18548 | ||
|
|
8f1e976c2f | ||
|
|
5ee18436b8 | ||
|
|
00ea709f9e | ||
|
|
4873d2cc91 | ||
|
|
4c306fb4f8 | ||
|
|
9017ada3aa | ||
|
|
00c4484184 | ||
|
|
5a6b1bfafd | ||
|
|
c25e74c296 | ||
|
|
bbe2980998 | ||
|
|
544a01534d | ||
|
|
41a9bebe06 | ||
|
|
c84452630a | ||
|
|
23bf0e360f | ||
|
|
62eb8f2d9a | ||
|
|
adcc6dddef | ||
|
|
8bbda6691d | ||
|
|
79f14632bb | ||
|
|
d51de4a520 | ||
|
|
f65e17c723 | ||
|
|
c04859294c | ||
|
|
23363efade | ||
|
|
933e9d90d1 | ||
|
|
b2341ce62e | ||
|
|
7fb17a173e | ||
|
|
c95d52e197 | ||
|
|
d651c37e87 | ||
|
|
1d89b392b0 | ||
|
|
04327c19e3 | ||
|
|
786d07907d | ||
|
|
1227ed1770 | ||
|
|
6d74b4379e | ||
|
|
985091f42b | ||
|
|
885446dc58 | ||
|
|
dd973a46fc | ||
|
|
190b78d14a | ||
|
|
824f7317d7 | ||
|
|
247ae2c862 | ||
|
|
f52a81f9d0 | ||
|
|
32e4859ba7 | ||
|
|
0de59dd77d | ||
|
|
d0b25c38a6 | ||
|
|
9fe2531d2f | ||
|
|
28ce2317c0 | ||
|
|
f38ae06fa0 | ||
|
|
e434d85ea5 | ||
|
|
d303406332 | ||
|
|
952d63b282 | ||
|
|
cffb3c9e90 | ||
|
|
d828d4a754 | ||
|
|
30ff601078 | ||
|
|
eb18f4281a | ||
|
|
b850aa1f7f | ||
|
|
100b5e8740 | ||
|
|
148d9f1201 | ||
|
|
88ddc7c4b2 | ||
|
|
4a2c01fba6 | ||
|
|
45c83f6080 | ||
|
|
08a0eeb6b5 | ||
|
|
73b034b27c | ||
|
|
95a31d613d | ||
|
|
8027d39938 | ||
|
|
e3d33295fe | ||
|
|
691c61613f | ||
|
|
a75ce2143d | ||
|
|
cb828e5684 | ||
|
|
168f193416 | ||
|
|
211a50d33d | ||
|
|
713af9d032 | ||
|
|
214b6fe9ac | ||
|
|
343c188749 | ||
|
|
fc6418caf3 | ||
|
|
cf093e1023 | ||
|
|
90eb6003c9 | ||
|
|
652691b32b | ||
|
|
eb77f33574 | ||
|
|
9bfd5888bf | ||
|
|
73c18c79b8 | ||
|
|
562052b868 | ||
|
|
6f42d41344 | ||
|
|
8db677684d | ||
|
|
988528ccca | ||
|
|
029a46c07d | ||
|
|
8ace3ddd1f | ||
|
|
2c705f0b67 | ||
|
|
3ec43bd8a5 | ||
|
|
b33abd3196 | ||
|
|
d82f5b4bfb | ||
|
|
3e41e17367 | ||
|
|
6e3abab232 | ||
|
|
6306baa51a | ||
|
|
7ceb7e162a | ||
|
|
2243d3cf5b | ||
|
|
e6937d67c1 | ||
|
|
6e977dabf6 | ||
|
|
c229029c1d | ||
|
|
76aa64fe75 | ||
|
|
3b1d6ab8a4 | ||
|
|
7015468e04 | ||
|
|
ef57040e1d | ||
|
|
2a6537c604 | ||
|
|
541a9790ad | ||
|
|
011e8ad089 | ||
|
|
3918d36c24 | ||
|
|
37f452c7c3 | ||
|
|
fc885bc0ad | ||
|
|
44c226092d | ||
|
|
14cf8c2492 | ||
|
|
d6f5898e61 | ||
|
|
0ab8e405cc | ||
|
|
4e4231d5a5 | ||
|
|
2df3f2fa1a | ||
|
|
d6048f78f0 | ||
|
|
f73fa14bfd | ||
|
|
fd88c725d3 | ||
|
|
3a16f9d9ab | ||
|
|
de9b89d805 | ||
|
|
a05c387ba1 | ||
|
|
3cb6e5a2d4 | ||
|
|
104a9a0aa3 | ||
|
|
d7b747eac4 | ||
|
|
d2949c11f3 | ||
|
|
cd05f71173 | ||
|
|
e0dca73369 | ||
|
|
b8599a6693 | ||
|
|
a0adb415fa | ||
|
|
6c60756e54 | ||
|
|
ee9f51ce7d | ||
|
|
924b46b41a | ||
|
|
1fca5a1912 | ||
|
|
120eb1ee69 | ||
|
|
252c538571 | ||
|
|
1eec373b7e | ||
|
|
aa9b96a9c1 | ||
|
|
059fb30aa4 | ||
|
|
2afaf7ad34 | ||
|
|
076a0956c5 | ||
|
|
4a91ec47bf | ||
|
|
1066b43b3d | ||
|
|
3f78125c43 | ||
|
|
144a44673b | ||
|
|
777f7b3758 | ||
|
|
947fa0fea3 | ||
|
|
7109e89fb4 | ||
|
|
70e7b1d544 | ||
|
|
613f86155c | ||
|
|
8d0b58e48f | ||
|
|
8cea9dc977 | ||
|
|
471acfdf00 | ||
|
|
8ed42131d0 | ||
|
|
18c605354a | ||
|
|
8c04411458 | ||
|
|
9a8d1d05cd | ||
|
|
1cbaf9c424 | ||
|
|
537c2fc108 | ||
|
|
122b568cf5 | ||
|
|
8b97c02d15 | ||
|
|
dcfb016ce5 | ||
|
|
c842de9e23 | ||
|
|
1b2753a2b7 | ||
|
|
29b44b8b77 | ||
|
|
7290b1364c | ||
|
|
3851ead8bb | ||
|
|
305312cc26 | ||
|
|
b4217555d2 | ||
|
|
87b8e405f5 | ||
|
|
3513196a78 | ||
|
|
0240a12321 | ||
|
|
3a8eac4d4a | ||
|
|
4bd2de4ce2 | ||
|
|
b7608fccb3 | ||
|
|
bb925d354d | ||
|
|
3a476d41d2 | ||
|
|
1927b10bcc | ||
|
|
0664eff151 | ||
|
|
a71456b209 | ||
|
|
48d308b1a8 | ||
|
|
f75d097d8a | ||
|
|
0d46d81c4e | ||
|
|
c20c83245f | ||
|
|
849e010bc3 | ||
|
|
95c299eea4 | ||
|
|
ad3edd4ccd | ||
|
|
81b7b3505e | ||
|
|
1522a6f3ad | ||
|
|
04bae45955 | ||
|
|
873e910eb1 | ||
|
|
a7f86bf62a | ||
|
|
7ba278d210 | ||
|
|
e9ac9b9f13 | ||
|
|
d34843f90c | ||
|
|
374d0bdd9c | ||
|
|
5d3dc83bab | ||
|
|
05d0f75cdc | ||
|
|
711a4a6bab | ||
|
|
08895ba170 | ||
|
|
c2c8b108ac | ||
|
|
318e9f30b8 | ||
|
|
39a1001510 | ||
|
|
5e7b7ebfa7 | ||
|
|
8d85cdf173 | ||
|
|
79d95d1997 | ||
|
|
1eb07d0b24 | ||
|
|
601564b573 | ||
|
|
41384fab17 | ||
|
|
f0a122d862 | ||
|
|
b08d75be62 | ||
|
|
02f5bef6b4 | ||
|
|
ef10c8b8b6 | ||
|
|
6c4e9cd5c6 | ||
|
|
8dec40553d | ||
|
|
9ae5a6c627 | ||
|
|
2ec1678f01 | ||
|
|
f9e436e885 | ||
|
|
2a49e7670d | ||
|
|
95d8988f11 | ||
|
|
e04a972df5 | ||
|
|
1ca9311625 | ||
|
|
630a1fd3cd | ||
|
|
0f6d84dab2 | ||
|
|
f64eb395a8 | ||
|
|
2e69c67de0 | ||
|
|
7747b4e52e | ||
|
|
830622aafb | ||
|
|
2919950c5b | ||
|
|
d56cfbba82 | ||
|
|
cfe1924f11 | ||
|
|
dfd2ec45f4 | ||
|
|
19c7e31f53 | ||
|
|
f618aef988 | ||
|
|
af97f752f5 | ||
|
|
bfb80afee2 | ||
|
|
72695af0f0 | ||
|
|
3a5b84eec4 | ||
|
|
387ed53328 | ||
|
|
c9cbc5fd55 | ||
|
|
ae03460a33 | ||
|
|
4b060a864a | ||
|
|
07e8e63ee6 | ||
|
|
ab1d4ed97f | ||
|
|
2bd7dfd5b8 | ||
|
|
c39049e5f5 | ||
|
|
5113aa63bd | ||
|
|
518fd8c839 | ||
|
|
a046faaa07 | ||
|
|
dcf25392ff | ||
|
|
7f24948efa | ||
|
|
59d9739f36 | ||
|
|
26a6d08d96 | ||
|
|
cd59c51344 | ||
|
|
8dec98406d | ||
|
|
9386bfc5c1 | ||
|
|
370272ca43 | ||
|
|
5c6758c8e7 | ||
|
|
11606e25bb | ||
|
|
285f0532d3 | ||
|
|
7bfa8a73be | ||
|
|
d1c6e0cb1c | ||
|
|
fc34b24029 | ||
|
|
7e2269a040 | ||
|
|
55d4d9f7e5 | ||
|
|
06a45c9cf2 | ||
|
|
16dd34ef58 | ||
|
|
aed2436ec5 | ||
|
|
df0ec5b3f7 | ||
|
|
9c2b37ec29 | ||
|
|
47fdcad370 | ||
|
|
76295ba1e3 | ||
|
|
4c1f0ca2c0 | ||
|
|
48a53bc248 | ||
|
|
6d18b016c1 | ||
|
|
f54acf595b | ||
|
|
8acebd5ad7 | ||
|
|
c28c12ee01 | ||
|
|
532c4afeaa | ||
|
|
c201eb301f | ||
|
|
ca8e629e4c | ||
|
|
35ee4faffc | ||
|
|
aee2795285 | ||
|
|
0656c18e85 | ||
|
|
cce511c4b4 | ||
|
|
4f0f320fcd | ||
|
|
2fed2aaa34 | ||
|
|
4eeedb85de | ||
|
|
4523138864 | ||
|
|
630291df46 | ||
|
|
8ff1ec35df | ||
|
|
5a51d598ac | ||
|
|
a23a2b292c | ||
|
|
a9dd8f2f36 | ||
|
|
c85ab97cc5 | ||
|
|
97d88ddea3 | ||
|
|
d13ec07f4c | ||
|
|
89d9cd4c25 | ||
|
|
9a7437e8db | ||
|
|
77cf635eea | ||
|
|
d3a045ec20 | ||
|
|
f7189e34cb |
15
.env.example
Normal file
@@ -0,0 +1,15 @@
|
||||
SERVICE_PORT=1081
|
||||
VOLUME_BASE=/data/orion-visor-space/docker-volumes
|
||||
|
||||
MYSQL_HOST=mysql
|
||||
MYSQL_PORT=3306
|
||||
MYSQL_DATABASE=orion_visor
|
||||
MYSQL_USER=orion
|
||||
MYSQL_PASSWORD=Data@123456
|
||||
MYSQL_ROOT_PASSWORD=Data@123456
|
||||
|
||||
REDIS_HOST=redis
|
||||
REDIS_PASSWORD=Data@123456
|
||||
|
||||
SECRET_KEY=uQeacXV8b3isvKLK
|
||||
DEMO_MODE=false
|
||||
21
.github/workflows/e2e.yaml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: E2E
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
concurrency:
|
||||
group: ${{github.workflow}} - ${{github.ref}}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
testing:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: E2E Testing
|
||||
run: |
|
||||
sudo curl -L https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
|
||||
sudo chmod u+x /usr/local/bin/docker-compose
|
||||
docker compose -f docker-compose-testing.yml up --build testing --exit-code-from testing --remove-orphans
|
||||
1
.gitignore
vendored
@@ -33,3 +33,4 @@ build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
.env
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## 免责声明
|
||||
|
||||
> 欢迎您选择使用 orion-ops-pro(以下简称「本项目」)。在使用本项目前,请您仔细阅读本免责声明,并确保您已充分理解其中的内容。您的使用行为将视为对本声明全部内容的认可和接受。
|
||||
> 欢迎您选择使用 orion-visor(以下简称「本项目」)。在使用本项目前,请您仔细阅读本免责声明,并确保您已充分理解其中的内容。您的使用行为将视为对本声明全部内容的认可和接受。
|
||||
|
||||
> 本项目为一款开源免费的运维管理工具,采用 Apache 2.0 许可证授权。您可在遵守相关法律法规及许可证条款的前提下,自由修改和使用本项目。
|
||||
|
||||
|
||||
87
LICENSE
@@ -200,90 +200,3 @@
|
||||
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.
|
||||
|
||||
|
||||
Apache Dubbo Submodules:
|
||||
|
||||
Apache Dubbo includes a number of submodules with separate copyright notices
|
||||
and license terms. Your use of these submodules is subject to the terms and
|
||||
conditions of the following licenses.
|
||||
|
||||
For the package org.apache.dubbo.common.threadlocal and org.apache.dubbo.common.timer:
|
||||
|
||||
This product contains a modified portion of 'Netty', an event-driven asynchronous network application framework also
|
||||
under a "Apache License 2.0" license, see https://github.com/netty/netty/blob/4.1/LICENSE.txt:
|
||||
|
||||
* io.netty.util.concurrent.FastThreadLocal
|
||||
* io.netty.util.internal.InternalThreadLocalMap
|
||||
* io.netty.util.Timer
|
||||
* io.netty.util.TimerTask
|
||||
* io.netty.util.Timeout
|
||||
* io.netty.util.HashedWheelTimer
|
||||
|
||||
For the org.apache.dubbo.common.utils.CIDRUtils :
|
||||
|
||||
This product contains a modified portion of 'edazdarevic.commons.net.CIDRUtils' published at
|
||||
https://github.com/edazdarevic/CIDRUtils. The project is licensed under a MIT License:
|
||||
* The MIT License
|
||||
*
|
||||
* Copyright (c) 2013 Edin Dazdarevic (edin.dazdarevic@gmail.com)
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
|
||||
For the file org.apache.dubbo.common.utils.Utf8Utils.java:
|
||||
|
||||
This product contains a portion of the Protocol Buffers project, which is published at
|
||||
https://developers.google.com/protocol-buffers/ and is licensed under the following License:
|
||||
|
||||
Copyright 2008 Google Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Code generated by the Protocol Buffer compiler is owned by the owner
|
||||
of the input file used when generating it. This code is not
|
||||
standalone and requires a support library to be linked with it. This
|
||||
support library is itself covered by the above license.
|
||||
|
||||
For the ca.proto in dubbo-registry-xds:
|
||||
|
||||
This product contains a modified portion of 'Istio', an open platform to connect, manage, and secure microservices also
|
||||
under a "Apache License 2.0" license, see https://github.com/istio/api/blob/master/LICENSE:
|
||||
|
||||
* security/v1alpha1/ca.proto
|
||||
|
||||
9
NOTICE
Normal file
@@ -0,0 +1,9 @@
|
||||
* 在使用本项目前,请您仔细阅读使用须知及免责声明,确保您已充分理解其中的内容
|
||||
|
||||
* 本项目采用 APACHE LICENSE 2.0 开源协议,如您需要源码的开发方式,需要遵循以下几点
|
||||
|
||||
1. 禁止修改或删除 LICENSE 文件。
|
||||
2. 禁止修改或删除源码头部的版权声明。
|
||||
3. 本项目可免费商业使用,商业使用请保留项目源码、出处、描述文件和作者声明等。
|
||||
4. 分发源码时候,请注明软件出处 https://visor.dromara.org/
|
||||
5. 不可二次开发或参与同类竞品的开发。
|
||||
192
README.md
@@ -1,124 +1,150 @@
|
||||
<h1 style="display: flex; align-items: center;">
|
||||
<img style="margin-right: 8px;" src="https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/2/27/8c687ef1-5711-4a93-9db0-79c010af7902.png" width="32px" height="32px"/> orion-ops-pro 是什么
|
||||
</h1>
|
||||
|
||||
`orion-ops-pro`
|
||||
是一款现代化、高颜值的一站式智能运维管理平台,集资产管理、资产授权、批量执行、批量上传、计划任务、WebShell、WebSftp、角色管理、系统管理等功能于一体,致力于简化运维团队的治理工作。
|
||||
|
||||
<p style="text-align: left">
|
||||
<a target="_blank" style="text-decoration: none" href="https://app.codacy.com/gh/lijiahangmax/orion-ops-pro/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade">
|
||||
<img src="https://app.codacy.com/project/badge/Grade/49eaab3a9a474af3b87e1d21ffec71c4" alt="quality"/>
|
||||
<div align="center"><img src="https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/9/11/11e7e78e-2af0-4c68-9811-db8a4c4400f4.png" alt="logo" width="520" /></div>
|
||||
<p style="margin-top: 12px" align="center"><b>【Dromara】 一款高颜值、现代化的自动化运维&轻量堡垒机平台。</b></p>
|
||||
<p align="center">
|
||||
<a target="_blank"
|
||||
style="text-decoration: none !important;"
|
||||
href="https://app.codacy.com/gh/lijiahangmax/orion-visor/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade">
|
||||
<img src="https://app.codacy.com/project/badge/Grade/49eaab3a9a474af3b87e1d21ffec71c4" alt="quality" />
|
||||
</a>
|
||||
<a target="_blank"
|
||||
style="text-decoration: none !important;"
|
||||
href="https://www.apache.org/licenses/LICENSE-2.0">
|
||||
<img src="https://img.shields.io/github/license/dromara/orion-visor" alt="License" />
|
||||
</a>
|
||||
<a target="_blank"
|
||||
style="text-decoration: none !important;"
|
||||
href="https://github.com/dromara/orion-visor/releases">
|
||||
<img src="https://img.shields.io/github/v/release/dromara/orion-visor" alt="release" />
|
||||
</a>
|
||||
<a target="_blank"
|
||||
style="text-decoration: none !important;"
|
||||
href="https://gitee.com/dromara/orion-visor/stargazers">
|
||||
<img src="https://gitee.com/dromara/orion-visor/badge/star.svg?theme=gvp" alt="star" />
|
||||
</a>
|
||||
<a target="_blank"
|
||||
style="text-decoration: none !important;"
|
||||
href="https://gitee.com/dromara/orion-visor/members">
|
||||
<img src="https://gitee.com/dromara/orion-visor/badge/fork.svg?theme=gvp" alt="fork" />
|
||||
</a>
|
||||
<a target="_blank"
|
||||
style="text-decoration: none !important;"
|
||||
href="https://github.com/dromara/orion-visor">
|
||||
<img src="https://img.shields.io/github/stars/dromara/orion-visor" alt="star" />
|
||||
</a>
|
||||
<a target="_blank"
|
||||
style="text-decoration: none !important;"
|
||||
href="https://github.com/dromara/orion-visor">
|
||||
<img src="https://img.shields.io/github/forks/dromara/orion-visor" alt="star" />
|
||||
</a>
|
||||
<a target="_blank"
|
||||
style="text-decoration: none !important;"
|
||||
href="https://gitcode.com/dromara/orion-visor">
|
||||
<img src="https://gitcode.com/dromara/orion-visor/star/badge.svg" alt="star"/>
|
||||
</a>
|
||||
<a target="_blank" style="text-decoration: none" href="https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html">
|
||||
<img src="https://img.shields.io/badge/JDK-8+-green.svg" alt="jdk8"/>
|
||||
</a>
|
||||
<a target="_blank" style="text-decoration: none" href="https://www.apache.org/licenses/LICENSE-2.0">
|
||||
<img src="https://img.shields.io/github/license/lijiahangmax/orion-ops-pro" alt="License"/>
|
||||
</a>
|
||||
<a target="_blank" style="text-decoration: none" href="https://gitee.com/lijiahangmax/orion-ops-pro/stargazers">
|
||||
<img src="https://gitee.com/lijiahangmax/orion-ops-pro/badge/star.svg?theme=dark" alt="star"/>
|
||||
</a>
|
||||
<a target="_blank" style="text-decoration: none" href="https://gitee.com/lijiahangmax/orion-ops-pro/members">
|
||||
<img src="https://gitee.com/lijiahangmax/orion-ops-pro/badge/fork.svg?theme=dark" alt="fork"/>
|
||||
</a>
|
||||
<a target="_blank" style="text-decoration: none" href="https://github.com/lijiahangmax/orion-ops-pro">
|
||||
<img src="https://img.shields.io/github/stars/lijiahangmax/orion-ops-pro.svg?style=social" alt="star"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
当前版本: **1.0.8**
|
||||
------------------------------
|
||||
|
||||
**github:** https://github.com/lijiahangmax/orion-ops-pro
|
||||
**gitee:** https://gitee.com/lijiahangmax/orion-ops-pro
|
||||
**文档:** https://lijiahangmax.github.io/orion-ops-pro/#/
|
||||
**demo:** http://101.43.254.243:1081/
|
||||
**`orion-visor`** 提供一站式自动化运维解决方案。
|
||||
|
||||
演示账号: `admin`
|
||||
演示密码: `admin`
|
||||
⭐ 体验后可以点一下 `star` 这对我很重要!
|
||||
🌈 如果本项目对你有帮助请帮忙推广一下 让更多的人知道此项目!
|
||||
📞 合作/功能定制请联系底部 备注: '合作'
|
||||
* **资产管理**:支持对资产进行分组,实现对主机、密钥和身份的统一管理和授权。
|
||||
* **在线终端**:提供在线终端 SSH 服务,支持快捷命令、自定义快捷键和主题风格。
|
||||
* **文件管理**:支持远程主机 SFTP 大文件的批量上传、下载和在线编辑等操作。
|
||||
* **批量操作**:支持批量执行主机命令、多主机文件分发等功能。
|
||||
* **计划任务**:支持配置 cron 表达式,定时执行主机命令。
|
||||
* **安全可靠**:动态配置权限,记录用户操作日志,提供简单的审计功能。
|
||||
|
||||
## 特性
|
||||
## 演示环境
|
||||
|
||||
* **快速稳定**: 使用全新的系统架构, 提高系统性能以及稳定性。
|
||||
* **交互友好**: 对与用户的交互进行了细致化的打磨, 操作更加方便快捷。
|
||||
* **资产管理**: 支持对资产进行分组, 实现对主机、秘钥和身份的统一管理和授权。
|
||||
* **权限控制**: 全面管理用户角色, 支持动态菜单配置和强制下线等功能。
|
||||
* **在线终端**: 提供便捷的在线 Web 终端服务, 支持快捷命令、自定义快捷键和主题风格。
|
||||
* **文件管理**: 实现远程主机大文件的批量上传、下载和在线编辑等操作。
|
||||
* **批量操作**: 支持远程主机批量执行主机命令、多主机文件分发。
|
||||
* **计划任务**: 支持配置 cron 表达式, 定时执行主机命令。
|
||||
* **操作审计**: 记录用户操作日志,确保操作可追溯, 提高系统安全性。
|
||||
* 🔗 演示地址: [https://dv.orionsec.cn/](https://dv.orionsec.cn/)
|
||||
* 🔏 演示账号: admin/admin
|
||||
* ⭐ 体验后可以点一下 `star`
|
||||
这对我很重要! [github](https://github.com/dromara/orion-visor) [gitee](https://gitee.com/dromara/orion-visor) [gitcode](https://gitcode.com/dromara/orion-visor)
|
||||
* 🌈 如果本项目对你有帮助请帮忙推广一下 让更多的人知道此项目!
|
||||
* 🎭 演示环境部分功能不可用, 完整功能请本地部署!
|
||||
* 📛 演示环境请不要随便删除数据!
|
||||
* 📧 如果演示环境不可用请联系我!
|
||||
|
||||
## 快速开始
|
||||
|
||||
* [docker安装](https://lijiahangmax.github.io/orion-ops-pro/#/quickstart/docker-install)
|
||||
* [普通安装](https://lijiahangmax.github.io/orion-ops-pro/#/quickstart/install)
|
||||
* [更新日志](https://lijiahangmax.github.io/orion-ops-pro/#/about/change-log)
|
||||
* [操作手册](https://lijiahangmax.github.io/orion-ops-pro/#/operator/asset)
|
||||
* [常见问题](https://lijiahangmax.github.io/orion-ops-pro/#/quickstart/faq)
|
||||
```bash
|
||||
# clone
|
||||
git clone --depth=1 https://github.com/dromara/orion-visor
|
||||
cd orion-visor
|
||||
# 启动
|
||||
docker compose up -d
|
||||
# 等待后端服务启动后 (2min±) 访问 http://localhost:1081/
|
||||
```
|
||||
|
||||
## 项目文档
|
||||
|
||||
* [文档地址](https://visor.dromara.org/)
|
||||
* [安装文档](https://visor.dromara.org/quickstart/docker.html)
|
||||
* [更新日志](https://visor.dromara.org/update/change-log.html)
|
||||
* [操作手册](https://visor.dromara.org/operator/asset.html)
|
||||
* [常见问题](https://visor.dromara.org/support/faq.html)
|
||||
|
||||
## 技术栈
|
||||
|
||||
* Docker
|
||||
* SpringBoot
|
||||
* Mysql
|
||||
* Redis
|
||||
* Vue3
|
||||
* Arco Design
|
||||
* SpringBoot 2.7+
|
||||
* Mysql 8+
|
||||
* Redis 6+
|
||||
* Vue3 3+
|
||||
* Arco Design 2+
|
||||
|
||||
## 主要功能预览
|
||||
|
||||
> 主机终端
|
||||
#### 主机终端
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
> 批量执行
|
||||
#### 批量执行
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
> 批量上传
|
||||
#### 批量上传
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
> 计划任务
|
||||
#### 计划任务
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
> 用户管理
|
||||
## Star History
|
||||
|
||||

|
||||

|
||||
[](https://star-history.com/#dromara/orion-visor&Date)
|
||||
|
||||
## 关于我
|
||||
|
||||
本人专注于使用 Java 和 Vue 进行全栈开发, 并在系统自动化运维方面拥有丰富开发的经验。如果您在这些领域有需求或遇到痛点, 请随时联系我, 并备注“合作”。
|
||||
|
||||
## 联系我
|
||||
|
||||
<div style="display: flex;">
|
||||
<img src="https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/2/27/d452cd30-cecd-4236-86f5-5ecbf3eac091.jpg" alt="qq" width="268px" height="398px"/>
|
||||
<img src="https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/2/27/4f1c4e77-8e36-45a3-8be6-9da5387bb96e.jpg" alt="wx" width="298px" height="398px"/>
|
||||
</div>
|
||||
<img src="https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/10/11/cf72c603-3951-4171-95b4-06271dda1c80.jpg" alt="wx" width="628px"/>
|
||||
|
||||
📧 咨询问题微信备注: ops
|
||||
微信: ljh1553488
|
||||
QQ群: 755242157
|
||||
|
||||
📧 问题/加群微信备注: ops
|
||||
📧 合作/功能定制备注: 合作
|
||||
|
||||
## 支持一下
|
||||
|
||||
<img src="https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/2/27/8063cf87-9de9-4df2-8009-d5dea6d69861.jpg" alt="收款码" width="540px"/>
|
||||
<img src="https://bjuimg.obs.cn-north-4.myhuaweicloud.com/images/2024/5/17/a5351e59-294c-4bec-b767-1a44c362fcbc.jpg" alt="收款码" width="540px"/>
|
||||
|
||||
🎁 为了项目能健康持续的发展, 我期望获得相应的资金支持, 你们的支持是我不断更新前进的动力!
|
||||
|
||||
## 免责声明
|
||||
|
||||
在使用本项目之前, 请确保您已经了解并同意相关的使用协议和隐私政策。[免责声明](https://github.com/lijiahangmax/orion-ops-pro/blob/main/DISCLAIMER.md)
|
||||
在使用本项目之前, 请确保您已经了解并同意相关的使用协议和隐私政策。[免责声明](https://github.com/dromara/orion-visor/blob/main/DISCLAIMER.md)
|
||||
|
||||
## License
|
||||
|
||||
本项目遵循 [Apache-2.0](https://github.com/lijiahangmax/orion-ops-pro/blob/main/LICENSE) 开源许可证。
|
||||
本项目遵循 [Apache-2.0](https://github.com/dromara/orion-visor/blob/main/LICENSE) 开源许可证。
|
||||
|
||||
## Gitee 最有价值开源项目 GVP
|
||||
|
||||

|
||||
|
||||
79
docker-compose-testing.yml
Normal file
@@ -0,0 +1,79 @@
|
||||
version: '3.3'
|
||||
services:
|
||||
service:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-service:latest
|
||||
privileged: true
|
||||
ports:
|
||||
- 1081:80
|
||||
environment:
|
||||
- MYSQL_HOST=mysql
|
||||
- MYSQL_PORT=3306
|
||||
- MYSQL_DATABASE=orion_visor
|
||||
- MYSQL_USER=root
|
||||
- MYSQL_PASSWORD=Data@123456
|
||||
- REDIS_HOST=redis
|
||||
- REDIS_PASSWORD=Data@123456
|
||||
- SECRET_KEY=uQeacXV8b3isvKLK
|
||||
- DEMO_MODE=false
|
||||
volumes:
|
||||
- /data/orion-visor-space/docker-volumes/service/root-orion:/root/orion
|
||||
healthcheck:
|
||||
test: [ "CMD", "curl", "http://127.0.0.1:9200/orion-visor/api/server/bootstrap/health" ]
|
||||
interval: 3s
|
||||
timeout: 300s
|
||||
retries: 200
|
||||
start_period: 3s
|
||||
depends_on:
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
links:
|
||||
- mysql
|
||||
- redis
|
||||
mysql:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-mysql:latest
|
||||
privileged: true
|
||||
ports:
|
||||
- 3307:3306
|
||||
environment:
|
||||
- MYSQL_DATABASE=orion_visor
|
||||
- MYSQL_USER=orion
|
||||
- MYSQL_PASSWORD=Data@123456
|
||||
- MYSQL_ROOT_PASSWORD=Data@123456
|
||||
volumes:
|
||||
- /data/orion-visor-space/docker-volumes/mysql/var-lib-mysql:/var/lib/mysql
|
||||
- /data/orion-visor-space/docker-volumes/mysql/var-lib-mysql-files:/var/lib/mysql-files
|
||||
- /data/orion-visor-space/docker-volumes/mysql/etc-mysql:/etc/mysql
|
||||
healthcheck:
|
||||
test: [ "CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/3306" ]
|
||||
interval: 3s
|
||||
timeout: 60s
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
redis:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-redis:latest
|
||||
privileged: true
|
||||
ports:
|
||||
- 6380:6379
|
||||
environment:
|
||||
- REDIS_PASSWORD=Data@123456
|
||||
volumes:
|
||||
- /data/orion-visor-space/docker-volumes/redis/data:/data
|
||||
command: sh -c "redis-server /usr/local/redis.conf --requirepass $${REDIS_PASSWORD}"
|
||||
healthcheck:
|
||||
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
|
||||
interval: 3s
|
||||
timeout: 60s
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
testing:
|
||||
build:
|
||||
context: ./docker/e2e
|
||||
environment:
|
||||
SERVER: http://service:80
|
||||
depends_on:
|
||||
service:
|
||||
condition: service_healthy
|
||||
links:
|
||||
- service
|
||||
@@ -1,46 +1,78 @@
|
||||
version: '3.3'
|
||||
services:
|
||||
orion-ops-pro:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-pro:1.0.8
|
||||
service:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-service:latest
|
||||
privileged: true
|
||||
ports:
|
||||
- 1081:80
|
||||
- ${SERVICE_PORT:-1081}:80
|
||||
environment:
|
||||
- MYSQL_HOST=orion-ops-pro-db
|
||||
- MYSQL_PORT=3306
|
||||
- MYSQL_USER=orion
|
||||
- MYSQL_PASSWORD=Data@123456
|
||||
- REDIS_HOST=orion-ops-pro-redis
|
||||
- REDIS_PASSWORD=Data@123456
|
||||
- SECRET_KEY=uQeacXV8b3isvKLK
|
||||
- MYSQL_HOST=${MYSQL_HOST:-mysql}
|
||||
- MYSQL_PORT=${MYSQL_PORT:-3306}
|
||||
- MYSQL_DATABASE=${MYSQL_DATABASE:-orion_visor}
|
||||
- MYSQL_USER=${MYSQL_USER:-root}
|
||||
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-Data@123456}
|
||||
- REDIS_HOST=${REDIS_HOST:-redis}
|
||||
- REDIS_PASSWORD=${REDIS_PASSWORD:-Data@123456}
|
||||
- SECRET_KEY=${SECRET_KEY:-uQeacXV8b3isvKLK}
|
||||
- DEMO_MODE=${DEMO_MODE:-false}
|
||||
volumes:
|
||||
- /data/orion-ops-pro-space/docker-volumes/orion-ops-pro/logs:/root/orion/logs/orion-ops-pro
|
||||
- /data/orion-ops-pro-space/docker-volumes/orion-ops-pro/app:/root/orion/orion-ops-pro
|
||||
- ${VOLUME_BASE:-/data/orion-visor-space/docker-volumes}/service/root-orion:/root/orion
|
||||
healthcheck:
|
||||
test: [ "CMD", "curl", "http://127.0.0.1:9200/orion-visor/api/server/bootstrap/health" ]
|
||||
interval: 15s
|
||||
timeout: 300s
|
||||
retries: 15
|
||||
start_period: 3s
|
||||
depends_on:
|
||||
- orion-ops-pro-db
|
||||
- orion-ops-pro-redis
|
||||
orion-ops-pro-db:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-pro-mysql:1.0.8
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
links:
|
||||
- mysql
|
||||
- redis
|
||||
mysql:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-mysql:latest
|
||||
privileged: true
|
||||
ports:
|
||||
- 3307:3306
|
||||
environment:
|
||||
- MYSQL_DATABASE=orion-ops-pro
|
||||
- MYSQL_USER=orion
|
||||
- MYSQL_PASSWORD=Data@123456
|
||||
- MYSQL_ROOT_PASSWORD=Data@123456
|
||||
- MYSQL_DATABASE=${MYSQL_DATABASE:-orion_visor}
|
||||
- MYSQL_USER=${MYSQL_USER:-orion}
|
||||
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-Data@123456}
|
||||
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-Data@123456}
|
||||
volumes:
|
||||
- /data/orion-ops-pro-space/docker-volumes/mysql/var-lib-mysql:/var/lib/mysql
|
||||
- /data/orion-ops-pro-space/docker-volumes/mysql/var-lib-mysql-files:/var/lib/mysql-files
|
||||
- /data/orion-ops-pro-space/docker-volumes/mysql/etc-mysql:/etc/mysql
|
||||
orion-ops-pro-redis:
|
||||
image: redis:6.0.16-alpine
|
||||
command: redis-server --appendonly yes --requirepass Data@123456
|
||||
- ${VOLUME_BASE:-/data/orion-visor-space/docker-volumes}/mysql/var-lib-mysql:/var/lib/mysql
|
||||
- ${VOLUME_BASE:-/data/orion-visor-space/docker-volumes}/mysql/var-lib-mysql-files:/var/lib/mysql-files
|
||||
- ${VOLUME_BASE:-/data/orion-visor-space/docker-volumes}/mysql/etc-mysql:/etc/mysql
|
||||
healthcheck:
|
||||
test: [ "CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/3306" ]
|
||||
interval: 15s
|
||||
timeout: 60s
|
||||
retries: 15
|
||||
start_period: 3s
|
||||
redis:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-redis:latest
|
||||
privileged: true
|
||||
ports:
|
||||
- 6380:6379
|
||||
environment:
|
||||
- REDIS_PASSWORD=${REDIS_PASSWORD:-Data@123456}
|
||||
volumes:
|
||||
- /data/orion-ops-pro-space/docker-volumes/redis/data:/data
|
||||
- /data/orion-ops-pro-space/docker-volumes/redis/redis.conf:/usr/local/etc/redis/redis.conf
|
||||
orion-ops-pro-adminer:
|
||||
image: adminer
|
||||
- ${VOLUME_BASE:-/data/orion-visor-space/docker-volumes}/redis/data:/data
|
||||
command: sh -c "redis-server /usr/local/redis.conf --requirepass $${REDIS_PASSWORD}"
|
||||
healthcheck:
|
||||
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
|
||||
interval: 15s
|
||||
timeout: 60s
|
||||
retries: 15
|
||||
start_period: 3s
|
||||
adminer:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-adminer:latest
|
||||
ports:
|
||||
- 8081:8080
|
||||
depends_on:
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
links:
|
||||
- mysql
|
||||
|
||||
7
docker-upgrade.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#/bin/bash
|
||||
docker compose down
|
||||
# demo 启动
|
||||
if [ "$1" == "demo" ]; then
|
||||
sed -i 's/\${DEMO_MODE:-false}/true/g' docker-compose.yml
|
||||
fi
|
||||
docker compose up -d --remove-orphans
|
||||
1
docker/adminer/Dockerfile
Normal file
@@ -0,0 +1 @@
|
||||
FROM adminer:latest
|
||||
5
docker/adminer/build.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#/bin/bash
|
||||
version=2.3.4
|
||||
docker build -t orion-visor-adminer:${version} .
|
||||
docker tag orion-visor-adminer:${version} registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-adminer:${version}
|
||||
docker tag orion-visor-adminer:${version} registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-adminer:latest
|
||||
7
docker/e2e/Dockerfile
Normal file
@@ -0,0 +1,7 @@
|
||||
FROM ghcr.io/linuxsuren/api-testing:v0.0.17
|
||||
|
||||
WORKDIR /workspace
|
||||
COPY . .
|
||||
RUN chmod 777 *
|
||||
|
||||
CMD [ "/workspace/entrypoint.sh" ]
|
||||
3
docker/e2e/entrypoint.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
atest run -p testsuite.yaml --report md
|
||||
49
docker/e2e/testsuite.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
#!api-testing
|
||||
# yaml-language-server: $schema=https://linuxsuren.github.io/api-testing/api-testing-schema.json
|
||||
name: orion-visor
|
||||
api: |
|
||||
{{default "http://orion-visor-service:80" (env "SERVER")}}
|
||||
items:
|
||||
- name: login
|
||||
request:
|
||||
api: /orion-visor/api/infra/auth/login
|
||||
method: POST
|
||||
header:
|
||||
Content-type: application/json
|
||||
body: |
|
||||
{"username":"admin","password":"21232f297a57a5a743894a0e4a801fc3"}
|
||||
expect:
|
||||
bodyFieldsExpect:
|
||||
code: 200
|
||||
- name: user
|
||||
request:
|
||||
api: /orion-visor/api/infra/user-aggregate/user
|
||||
header:
|
||||
Authorization: Bearer {{.login.data.token}}
|
||||
expect:
|
||||
bodyFieldsExpect:
|
||||
code: 200
|
||||
msg: "success"
|
||||
- name: menu
|
||||
request:
|
||||
api: /orion-visor/api/infra/user-aggregate/menu
|
||||
header:
|
||||
Authorization: Bearer {{.login.data.token}}
|
||||
expect:
|
||||
bodyFieldsExpect:
|
||||
code: 200
|
||||
msg: "success"
|
||||
- name: haveUnRead
|
||||
request:
|
||||
api: /orion-visor/api/infra/system-message/has-unread
|
||||
- name: queryOperatorLog
|
||||
request:
|
||||
api: /orion-visor/api/infra/mine/query-operator-log
|
||||
method: POST
|
||||
- name: hostList
|
||||
request:
|
||||
api: /orion-visor/api/infra/tag/list?type=HOST
|
||||
- name: queryHost
|
||||
request:
|
||||
api: /orion-visor/api/asset/host/query
|
||||
method: POST
|
||||
@@ -1,9 +1,17 @@
|
||||
FROM mysql:8.0.28
|
||||
# 系统时区
|
||||
ARG TZ=Asia/Shanghai
|
||||
# 设置时区
|
||||
RUN ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime && \
|
||||
echo '${TZ}' > /etc/timezone
|
||||
# 复制配置
|
||||
COPY ./my.cnf /etc/mysql/conf.d/my.cnf
|
||||
# 复制初始化脚本
|
||||
COPY ./sql/init-1-schema-databases.sql /tmp
|
||||
COPY ./sql/init-2-schema-tables.sql /tmp
|
||||
COPY ./sql/init-3-schema-quartz.sql /tmp
|
||||
COPY ./sql/init-4-data.sql /tmp
|
||||
COPY ./my.cnf /etc/mysql/conf.d/my.cnf
|
||||
# 设置初始化脚本
|
||||
RUN cat /tmp/init-1-schema-databases.sql >> /tmp/init.sql && \
|
||||
cat /tmp/init-2-schema-tables.sql >> /tmp/init.sql && \
|
||||
cat /tmp/init-3-schema-quartz.sql >> /tmp/init.sql && \
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#/bin/bash
|
||||
version=1.0.8
|
||||
version=2.3.4
|
||||
cp -r ../../sql ./sql
|
||||
docker build -t orion-ops-pro-mysql:${version} .
|
||||
docker build -t orion-visor-mysql:${version} .
|
||||
rm -rf ./sql
|
||||
docker tag orion-ops-pro-mysql:${version} registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-pro-mysql:${version}
|
||||
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-pro-mysql:${version}
|
||||
docker tag orion-visor-mysql:${version} registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-mysql:${version}
|
||||
docker tag orion-visor-mysql:${version} registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-mysql:latest
|
||||
|
||||
@@ -18,7 +18,7 @@ default-time_zone='+8:00'
|
||||
# 服务端字符集
|
||||
character_set_server=utf8mb4
|
||||
# 字符排序规则
|
||||
collation_server=utf8mb4_general_ci
|
||||
collation_server=utf8mb4_unicode_ci
|
||||
# 默认存储引擎
|
||||
default-storage-engine=InnoDB
|
||||
# 禁止 DNS 解析
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
FROM nginx:alpine
|
||||
USER root
|
||||
RUN \
|
||||
echo "" > /etc/apk/repositories && \
|
||||
echo "http://mirrors.aliyun.com/alpine/v3.8/main" >> /etc/apk/repositories &&\
|
||||
echo "http://mirrors.aliyun.com/alpine/v3.8/community" >> /etc/apk/repositories && \
|
||||
apk update
|
||||
RUN apk add openjdk8
|
||||
RUN rm -rf /etc/nginx/conf.d/*
|
||||
WORKDIR /app
|
||||
COPY ./orion-ops-launch.jar /app/app.jar
|
||||
COPY ./dist /usr/share/nginx/html
|
||||
COPY ./entrypoint.sh /app/entrypoint.sh
|
||||
COPY ./nginx.conf /etc/nginx/conf.d
|
||||
ENTRYPOINT [ "sh", "/app/entrypoint.sh" ]
|
||||
@@ -1,9 +0,0 @@
|
||||
#/bin/bash
|
||||
version=1.0.8
|
||||
mv ../../orion-ops-launch/target/orion-ops-launch.jar ./orion-ops-launch.jar
|
||||
mv ../../orion-ops-ui/dist ./dist
|
||||
docker build -t orion-ops-pro:${version} .
|
||||
rm -f ./orion-ops-launch.jar
|
||||
rm -rf ./dist
|
||||
docker tag orion-ops-pro:${version} registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-pro:${version}
|
||||
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-pro:${version}
|
||||
10
docker/push.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#/bin/bash
|
||||
version=2.3.4
|
||||
docker push registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-adminer:${version}
|
||||
docker push registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-mysql:${version}
|
||||
docker push registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-redis:${version}
|
||||
docker push registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-service:${version}
|
||||
docker push registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-adminer:latest
|
||||
docker push registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-mysql:latest
|
||||
docker push registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-redis:latest
|
||||
docker push registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-service:latest
|
||||
15
docker/redis/Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
FROM redis:6.0.16-alpine
|
||||
WORKDIR /data
|
||||
# 系统时区
|
||||
ARG TZ=Asia/Shanghai
|
||||
# 添加包
|
||||
RUN \
|
||||
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
|
||||
apk update && \
|
||||
apk add tzdata
|
||||
# 设置时区
|
||||
RUN ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime && \
|
||||
echo '${TZ}' > /etc/timezone
|
||||
# redis 配置
|
||||
COPY ./redis.conf /tmp
|
||||
RUN cat /tmp/redis.conf > /usr/local/redis.conf
|
||||
5
docker/redis/build.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#/bin/bash
|
||||
version=2.3.4
|
||||
docker build -t orion-visor-redis:${version} .
|
||||
docker tag orion-visor-redis:${version} registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-redis:${version}
|
||||
docker tag orion-visor-redis:${version} registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-redis:latest
|
||||
1877
docker/redis/redis.conf
Normal file
24
docker/service/Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM nginx:alpine
|
||||
USER root
|
||||
WORKDIR /app
|
||||
# 系统时区
|
||||
ARG TZ=Asia/Shanghai
|
||||
# 添加包
|
||||
RUN \
|
||||
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
|
||||
apk update && \
|
||||
apk add tzdata && \
|
||||
apk add dmidecode && \
|
||||
apk add openjdk8
|
||||
# 设置时区
|
||||
RUN ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime && \
|
||||
echo '${TZ}' > /etc/timezone
|
||||
# 删除原 nginx 配置
|
||||
RUN rm -rf /etc/nginx/conf.d/*
|
||||
# 复制包
|
||||
COPY ./orion-visor-launch.jar /app/app.jar
|
||||
COPY ./dist /usr/share/nginx/html
|
||||
COPY ./entrypoint.sh /app/entrypoint.sh
|
||||
COPY ./nginx.conf /etc/nginx/conf.d
|
||||
# 启动
|
||||
ENTRYPOINT [ "sh", "/app/entrypoint.sh" ]
|
||||
9
docker/service/build.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#/bin/bash
|
||||
version=2.3.4
|
||||
mv ../../orion-visor-launch/target/orion-visor-launch.jar ./orion-visor-launch.jar
|
||||
mv ../../orion-visor-ui/dist ./dist
|
||||
docker build -t orion-visor-service:${version} .
|
||||
rm -rf ./orion-visor-launch.jar
|
||||
rm -rf ./dist
|
||||
docker tag orion-visor-service:${version} registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-service:${version}
|
||||
docker tag orion-visor-service:${version} registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-service:latest
|
||||
@@ -26,16 +26,16 @@ server {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location /orion/api {
|
||||
proxy_pass http://localhost:9200/orion/api;
|
||||
location /orion-visor/api {
|
||||
proxy_pass http://localhost:9200/orion-visor/api;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location /orion/keep-alive {
|
||||
proxy_pass http://localhost:9200/orion/keep-alive;
|
||||
location /orion-visor/keep-alive {
|
||||
proxy_pass http://localhost:9200/orion-visor/keep-alive;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
@@ -1,6 +1,6 @@
|
||||
## 免责声明
|
||||
|
||||
> 欢迎您选择使用 orion-ops-pro(以下简称「本项目」)。在使用本项目前,请您仔细阅读本免责声明,并确保您已充分理解其中的内容。您的使用行为将视为对本声明全部内容的认可和接受。
|
||||
> 欢迎您选择使用 orion-visor(以下简称「本项目」)。在使用本项目前,请您仔细阅读本免责声明,并确保您已充分理解其中的内容。您的使用行为将视为对本声明全部内容的认可和接受。
|
||||
|
||||
> 本项目为一款开源免费的运维管理工具,采用 Apache 2.0 许可证授权。您可在遵守相关法律法规及许可证条款的前提下,自由修改和使用本项目。
|
||||
|
||||
|
||||
158
docs/README.md
@@ -1,112 +1,130 @@
|
||||
<h1 style="display: flex; align-items: center;">
|
||||
<img style="margin-right: 8px;" src="./assert/logo.svg" width="32px" height="32px"/> orion-ops-pro 是什么
|
||||
</h1>
|
||||
|
||||
`orion-ops-pro`
|
||||
是一款现代化、高颜值的一站式智能运维管理平台,集资产管理、资产授权、批量执行、批量上传、计划任务、WebShell、WebSftp、角色管理、系统管理等功能于一体,致力于简化运维团队的治理工作。
|
||||
|
||||
<p style="text-align: left">
|
||||
<a target="_blank" style="text-decoration: none" href="https://app.codacy.com/gh/lijiahangmax/orion-ops-pro/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade">
|
||||
<img src="https://app.codacy.com/project/badge/Grade/49eaab3a9a474af3b87e1d21ffec71c4" alt="quality"/>
|
||||
<div align="center"><img src="./assert/logo.svg" alt="logo" width="32" /></div>
|
||||
<p style="margin-top: 12px" align="center"><b>一款高颜值、现代化的智能运维&轻量堡垒机平台。</b></p>
|
||||
<p align="center">
|
||||
<a target="_blank"
|
||||
style="text-decoration: none !important;"
|
||||
href="https://app.codacy.com/gh/lijiahangmax/orion-visor/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade">
|
||||
<img src="https://app.codacy.com/project/badge/Grade/49eaab3a9a474af3b87e1d21ffec71c4" alt="quality" />
|
||||
</a>
|
||||
<a target="_blank"
|
||||
style="text-decoration: none !important;"
|
||||
href="https://www.apache.org/licenses/LICENSE-2.0">
|
||||
<img src="https://img.shields.io/github/license/lijiahangmax/orion-visor" alt="License" />
|
||||
</a>
|
||||
<a target="_blank"
|
||||
style="text-decoration: none !important;"
|
||||
href="https://github.com/lijiahangmax/orion-visor/releases">
|
||||
<img src="https://img.shields.io/github/v/release/lijiahangmax/orion-visor" alt="release" />
|
||||
</a>
|
||||
<a target="_blank"
|
||||
style="text-decoration: none !important;"
|
||||
href="https://gitee.com/lijiahangmax/orion-visor/stargazers">
|
||||
<img src="https://gitee.com/lijiahangmax/orion-visor/badge/star.svg?theme=gvp" alt="star" />
|
||||
</a>
|
||||
<a target="_blank"
|
||||
style="text-decoration: none !important;"
|
||||
href="https://gitee.com/lijiahangmax/orion-visor/members">
|
||||
<img src="https://gitee.com/lijiahangmax/orion-visor/badge/fork.svg?theme=gvp" alt="fork" />
|
||||
</a>
|
||||
<a target="_blank"
|
||||
style="text-decoration: none !important;"
|
||||
href="https://github.com/lijiahangmax/orion-visor">
|
||||
<img src="https://img.shields.io/github/stars/lijiahangmax/orion-visor" alt="star" />
|
||||
</a>
|
||||
<a target="_blank"
|
||||
style="text-decoration: none !important;"
|
||||
href="https://github.com/lijiahangmax/orion-visor">
|
||||
<img src="https://img.shields.io/github/forks/lijiahangmax/orion-visor" alt="star" />
|
||||
</a>
|
||||
<a target="_blank" style="text-decoration: none" href="https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html">
|
||||
<img src="https://img.shields.io/badge/JDK-8+-green.svg" alt="jdk8"/>
|
||||
</a>
|
||||
<a target="_blank" style="text-decoration: none" href="https://www.apache.org/licenses/LICENSE-2.0">
|
||||
<img src="https://img.shields.io/github/license/lijiahangmax/orion-ops-pro" alt="License"/>
|
||||
</a>
|
||||
<a target="_blank" style="text-decoration: none" href="https://gitee.com/lijiahangmax/orion-ops-pro/stargazers">
|
||||
<img src="https://gitee.com/lijiahangmax/orion-ops-pro/badge/star.svg?theme=dark" alt="star"/>
|
||||
</a>
|
||||
<a target="_blank" style="text-decoration: none" href="https://gitee.com/lijiahangmax/orion-ops-pro/members">
|
||||
<img src="https://gitee.com/lijiahangmax/orion-ops-pro/badge/fork.svg?theme=dark" alt="fork"/>
|
||||
</a>
|
||||
<a target="_blank" style="text-decoration: none" href="https://github.com/lijiahangmax/orion-ops-pro">
|
||||
<img src="https://img.shields.io/github/stars/lijiahangmax/orion-ops-pro.svg?style=social" alt="star"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
当前版本: **1.0.8**
|
||||
------------------------------
|
||||
|
||||
**github:** https://github.com/lijiahangmax/orion-ops-pro
|
||||
**gitee:** https://gitee.com/lijiahangmax/orion-ops-pro
|
||||
**文档:** https://lijiahangmax.github.io/orion-ops-pro/#/
|
||||
**demo:** http://101.43.254.243:1081/
|
||||
<p><b>⛔⛔此页面已不再维护, 请跳转至
|
||||
<a target="_blank" href="https://lijiahangmax.github.io/open-orion/orion-visor">这里</a>
|
||||
查看最新文档 ❗</b></p>
|
||||
|
||||
------------------------------
|
||||
|
||||
**`orion-visor`** 提供一站式服务器运维解决方案。
|
||||
|
||||
* **资产管理**:支持对资产进行分组,实现对主机、密钥和身份的统一管理和授权。
|
||||
* **在线终端**:提供在线终端 SSH 服务,支持快捷命令、自定义快捷键和主题风格。
|
||||
* **文件管理**:支持远程主机 SFTP 大文件的批量上传、下载和在线编辑等操作。
|
||||
* **批量操作**:支持批量执行主机命令、多主机文件分发等功能。
|
||||
* **计划任务**:支持配置 cron 表达式,定时执行主机命令。
|
||||
* **安全可靠**:动态配置权限,记录用户操作日志,提供简单的审计功能。
|
||||
|
||||
## 演示环境
|
||||
|
||||
演示地址: http://101.43.254.243:1081/
|
||||
演示账号: admin/admin
|
||||
|
||||
演示账号: `admin`
|
||||
演示密码: `admin`
|
||||
⭐ 体验后可以点一下 `star` 这对我很重要!
|
||||
🌈 如果本项目对你有帮助请帮忙推广一下 让更多的人知道此项目!
|
||||
📞 合作/功能定制请联系底部 备注: '合作'
|
||||
|
||||
## 特性
|
||||
|
||||
* **快速稳定**: 使用全新的系统架构, 提高系统性能以及稳定性。
|
||||
* **交互友好**: 对与用户的交互进行了细致化的打磨, 操作更加方便快捷。
|
||||
* **资产管理**: 支持对资产进行分组, 实现对主机、秘钥和身份的统一管理和授权。
|
||||
* **权限控制**: 全面管理用户角色, 支持动态菜单配置和强制下线等功能。
|
||||
* **在线终端**: 提供便捷的在线 Web 终端服务, 支持快捷命令、自定义快捷键和主题风格。
|
||||
* **文件管理**: 实现远程主机大文件的批量上传、下载和在线编辑等操作。
|
||||
* **批量操作**: 支持远程主机批量执行主机命令、多主机文件分发。
|
||||
* **计划任务**: 支持配置 cron 表达式, 定时执行主机命令。
|
||||
* **操作审计**: 记录用户操作日志,确保操作可追溯, 提高系统安全性。
|
||||
🌈 如果本项目对你有帮助请帮忙推广一下 让更多的人知道此项目!
|
||||
[github](https://github.com/lijiahangmax/orion-visor) [gitee](https://gitee.com/lijiahangmax/orion-visor)
|
||||
|
||||
## 快速开始
|
||||
|
||||
* [docker安装](/quickstart/docker-install)
|
||||
* [普通安装](/quickstart/install)
|
||||
```bash
|
||||
# clone
|
||||
git clone https://github.com/lijiahangmax/orion-visor
|
||||
cd orion-visor
|
||||
# 启动
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
## 项目文档
|
||||
|
||||
* [文档地址](/)
|
||||
* [安装文档](/quickstart/docker-install)
|
||||
* [更新日志](/about/change-log)
|
||||
* [操作手册](/operator/asset)
|
||||
* [常见问题](/quickstart/faq)
|
||||
|
||||
## 技术栈
|
||||
|
||||
* Docker
|
||||
* SpringBoot
|
||||
* Mysql
|
||||
* Redis
|
||||
* Vue3
|
||||
* Arco Design
|
||||
* SpringBoot 2.7.17
|
||||
* Mysql 8.0.+
|
||||
* Redis 6.0.+
|
||||
* Vue3 3.2.+
|
||||
* Arco Design 2.55.+
|
||||
|
||||
## 主要功能预览
|
||||
|
||||
> 主机终端
|
||||
#### 主机终端
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
> 批量执行
|
||||
#### 批量执行
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
> 批量上传
|
||||
#### 批量上传
|
||||
|
||||

|
||||

|
||||
|
||||
> 计划任务
|
||||
#### 计划任务
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
> 用户管理
|
||||
## Star History
|
||||
|
||||

|
||||

|
||||
[](https://star-history.com/#lijiahangmax/orion-visor&Date)
|
||||
|
||||
## 联系我
|
||||
|
||||
<div style="display: flex;">
|
||||
<img src="./assert/img/qq_group1.jpg" alt="qq" width="268px" height="398px"/>
|
||||
<img src="./assert/img/wx.jpg" alt="wx" width="298px" height="398px"/>
|
||||
</div>
|
||||
|
||||
📧 咨询问题微信备注: ops
|
||||

|
||||

|
||||
|
||||
📧 咨询问题微信备注: vis
|
||||
📧 合作/功能定制备注: 合作
|
||||
|
||||
## 支持一下
|
||||
@@ -121,4 +139,4 @@
|
||||
|
||||
## License
|
||||
|
||||
本项目遵循 [Apache-2.0](https://github.com/lijiahangmax/orion-ops-pro/blob/main/LICENSE) 开源许可证。
|
||||
本项目遵循 [Apache-2.0](https://github.com/lijiahangmax/orion-visor/blob/main/LICENSE) 开源许可证。
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# orion-ops-pro <small>1.0.8</small>
|
||||
# orion-visor
|
||||
|
||||
> 一款开箱即用的运维平台。
|
||||
> 一款高颜值、现代化的智能运维&轻量堡垒机平台。
|
||||
|
||||
- 友好 易用
|
||||
- 安全 稳定
|
||||
- 智能 高效
|
||||
|
||||
[GitHub](https://github.com/lijiahangmax/orion-ops-pro)
|
||||
[Gitee](https://gitee.com/lijiahangmax/orion-ops-pro)
|
||||
[GitHub](https://github.com/lijiahangmax/orion-visor)
|
||||
[Gitee](https://gitee.com/lijiahangmax/orion-visor)
|
||||
[Get Started](README.md)
|
||||
|
||||
@@ -2,11 +2,53 @@
|
||||
|
||||
### 升级须知
|
||||
|
||||
* 应用 **不支持** 跨版本升级, 可以进行 **多次升级**。
|
||||
* docker 安装的 sql 脚本可以在 `adminer` 中执行。
|
||||
* 应用 **不支持** 跨版本升级, 可以进行 **多次升级**
|
||||
* docker 安装的 sql 脚本可以在 `adminer` 中执行
|
||||
* 执行完成菜单 sql 后请刷新缓存 `系统设置` > `系统菜单` > `刷新缓存`
|
||||
* 执行完成字典 sql 后请刷新缓存 `系统设置` > `数据字典项` > `刷新缓存`
|
||||
|
||||
### docker 升级流程
|
||||
|
||||
* 备份 `volumes` (必要时可以回滚)
|
||||
* 进入 `adminer` 执行升级的 `sql` 脚本
|
||||
* 执行 升级的 `bash` 脚本
|
||||
* 进入 代码目录执行 `sh docker-upgrade.sh` 进行容器升级 `down` > `pull` > `up -d`
|
||||
|
||||
### v2.0.3
|
||||
|
||||
`2024-05-29` `release`
|
||||
|
||||
* 🐞 修复 部分 ui 显示错误
|
||||
* 🐞 修复 计划任务编辑时报错
|
||||
* 🐞 修复 计划任务手动触发时报错
|
||||
* 🩰 修改 logo
|
||||
* 🔨 修改 docker 时区
|
||||
|
||||
### v2.0.2
|
||||
|
||||
`2024-05-24` `release`
|
||||
|
||||
* 🐞 修复 资产授权密钥时间显示错误
|
||||
* 🌈 添加 演示模式
|
||||
* ⭐ 支持 Chrome PWA
|
||||
|
||||
### v2.0.1
|
||||
|
||||
`2024-05-21` `release`
|
||||
|
||||
* ⭐ 添加 cron 组件
|
||||
* 🐞 修复 批量执行后日志偶尔不展示的问题
|
||||
* 🐞 修复 批量上传进度条显示异常的问题
|
||||
|
||||
### v2.0.0
|
||||
|
||||
`2024-05-17` `release`
|
||||
|
||||
* ⭐ 修改 项目名称为 `orion-visor`
|
||||
* 🩰 修改 终端默认字体
|
||||
|
||||
[如何升级](/update/v2.0.0.md)
|
||||
|
||||
### v1.0.8
|
||||
|
||||
`2024-05-15` `release`
|
||||
@@ -159,7 +201,7 @@
|
||||
`2024-02-28` `preview`
|
||||
|
||||
* 🌈 主机管理
|
||||
* 🌈 主机秘钥
|
||||
* 🌈 主机密钥
|
||||
* 🌈 主机身份
|
||||
* 🌈 资产授权
|
||||
* 🌈 主机终端
|
||||
|
||||
@@ -2,12 +2,10 @@
|
||||
|
||||
* 终端背景图片
|
||||
* 资产授权 UI 改版
|
||||
* RDP 远程桌面
|
||||
* 接入 config 后端动态配置
|
||||
* 文档中巡检模板
|
||||
* 导入快捷命令
|
||||
* 导入命令模板
|
||||
* 使用 vite press 开发文档
|
||||
|
||||
## 已知问题
|
||||
|
||||
|
||||
BIN
docs/assert/favicon.ico
Normal file
|
After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 125 KiB |
|
Before Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 108 KiB |
BIN
docs/assert/img/exec_job_detail.png
Normal file
|
After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 601 KiB |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 116 KiB |
|
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 145 KiB |
|
Before Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 151 KiB |
@@ -1,17 +1,22 @@
|
||||
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<defs>
|
||||
<style>.cls-1{fill:url(#未命名的渐变_4);}.cls-2{fill:url(#未命名的渐变_6);}</style>
|
||||
<linearGradient id="未命名的渐变_4" x1="0.32" y1="15.03" x2="20.16" y2="15.03" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#23b6b6"/>
|
||||
<stop offset="1" stop-color="#189c98"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="未命名的渐变_6" x1="11.84" y1="16.97" x2="31.68" y2="16.97" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#08589b"/>
|
||||
<stop offset="1" stop-color="#2167b2"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path class="cls-1"
|
||||
d="M20,17.37a1.56,1.56,0,0,0-2.13-.65l-7.56,4.07A4.65,4.65,0,0,1,4,18.91H4a4.65,4.65,0,0,1,1.88-6.3L13.6,8.44a1.56,1.56,0,0,0,.64-2.1h0a1.56,1.56,0,0,0-2.13-.65l-8,4.3a7.24,7.24,0,0,0-2.94,9.82l.51.94a7.24,7.24,0,0,0,9.82,2.94l7.81-4.22a1.56,1.56,0,0,0,.65-2.1Z"/>
|
||||
<path class="cls-2"
|
||||
d="M12,14.63a1.56,1.56,0,0,0,2.13.65l7.56-4.07A4.65,4.65,0,0,1,28,13.09h0a4.65,4.65,0,0,1-1.88,6.3L18.4,23.56a1.56,1.56,0,0,0-.64,2.1h0a1.56,1.56,0,0,0,2.13.65l8-4.3a7.24,7.24,0,0,0,2.94-9.82l-.51-.94a7.24,7.24,0,0,0-9.82-2.94l-7.81,4.22a1.56,1.56,0,0,0-.65,2.1Z"/>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:url(#SVGID_1_);}
|
||||
.st1{fill:#3B28CC;}
|
||||
</style>
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="27.1802" y1="7.7935" x2="15.2269" y2="25.137">
|
||||
<stop offset="0" style="stop-color:#ADD7F6"/>
|
||||
<stop offset="0.2512" style="stop-color:#AAD5F6"/>
|
||||
<stop offset="0.4195" style="stop-color:#A1CDF7"/>
|
||||
<stop offset="0.5636" style="stop-color:#92C1F8"/>
|
||||
<stop offset="0.694" style="stop-color:#7DAFF9"/>
|
||||
<stop offset="0.8152" style="stop-color:#6198FB"/>
|
||||
<stop offset="0.9279" style="stop-color:#407CFD"/>
|
||||
<stop offset="1" style="stop-color:#2667FF"/>
|
||||
</linearGradient>
|
||||
<path class="st0" d="M31.41,4.01h-8.04c-0.27,0-0.51,0.18-0.57,0.44c-0.64,2.56-4.19,15.45-11.86,20.81c0,0,9.5,13.77,21.03-20.47
|
||||
C32.1,4.4,31.81,4.01,31.41,4.01z"/>
|
||||
<path class="st1" d="M0.62,3.98h8.02c0.28,0,0.52,0.18,0.59,0.45c0.69,2.58,4.47,15.52,12.14,20.88c0,0-10.88,13.73-21.34-20.54
|
||||
C-0.09,4.37,0.2,3.98,0.62,3.98z"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -2,10 +2,10 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>关于 orion-ops-pro</title>
|
||||
<title>orion-visor</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<meta name="description" content="Description">
|
||||
<link rel="icon" href="./assert/logo.svg">
|
||||
<link rel="icon" href="./assert/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
|
||||
<!-- Theme: Defaults -->
|
||||
<link rel="stylesheet" href="./assert/font.css">
|
||||
@@ -18,9 +18,9 @@
|
||||
<script>
|
||||
window.$docsify = {
|
||||
// 左侧文档名称
|
||||
name: 'orion-ops-pro',
|
||||
name: 'orion-visor',
|
||||
// 右上角仓库
|
||||
repo: 'https://github.com/lijiahangmax/orion-ops-pro',
|
||||
repo: 'https://github.com/dromara/orion-visor',
|
||||
coverpage: true,
|
||||
// 加载侧边栏
|
||||
loadSidebar: true,
|
||||
|
||||
@@ -10,20 +10,20 @@
|
||||
* 配置: 修改主机配置信息
|
||||
* 删除: 删除这台主机以及主机关联的数据
|
||||
|
||||
### 主机秘钥
|
||||
### 主机密钥
|
||||
|
||||
统一管理和维护用于连接主机的秘钥。
|
||||
统一管理和维护用于连接主机的密钥。
|
||||
|
||||
* 角色授权: 跳转页面到主机秘钥授权页面(角色)
|
||||
* 用户授权: 跳转页面到主机秘钥授权页面(用户)
|
||||
* 新增: 添加一个主机秘钥
|
||||
* 修改: 修改主机秘钥信息
|
||||
* 详情: 查看主机秘钥信息
|
||||
* 删除: 删除当前主机秘钥
|
||||
* 角色授权: 跳转页面到主机密钥授权页面(角色)
|
||||
* 用户授权: 跳转页面到主机密钥授权页面(用户)
|
||||
* 新增: 添加一个主机密钥
|
||||
* 修改: 修改主机密钥信息
|
||||
* 详情: 查看主机密钥信息
|
||||
* 删除: 删除当前主机密钥
|
||||
|
||||
### 主机身份
|
||||
|
||||
统一管理和维护用于连接主机的身份。这里同时维护了用户名,密码/秘钥。
|
||||
统一管理和维护用于连接主机的身份。这里同时维护了用户名、密码和密钥。
|
||||
|
||||
* 角色授权: 跳转页面到主机身份授权页面(角色)
|
||||
* 用户授权: 跳转页面到主机身份授权页面(用户)
|
||||
@@ -34,7 +34,3 @@
|
||||
### 资产授权
|
||||
|
||||
给用户/角色授权资产数据, 若无授权则无法访问资产。
|
||||
|
||||
给用户授权时: 若当前选择的用户有管理员角色(admin)则无需配置, 管理员拥有全部权限。
|
||||
给角色授权时: 无需给管理员(admin)配置, 管理员拥有全部权限。
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* 命令: 查看执行时的命令
|
||||
* 参数: 查看执行时的参数
|
||||
* 中断: 中断命令执行
|
||||
* 日志: 查看执行日志, ctrl + 左键点击会用新页面打开
|
||||
* 日志: 查看执行日志 `ctrl + 左键` 点击会用新页面打开
|
||||
* 下载: 下载执行日志
|
||||
|
||||
### 批量上传
|
||||
@@ -65,42 +65,42 @@
|
||||
### 日志面板快捷键
|
||||
|
||||
* 回车: `Enter`
|
||||
* 向上滚动一行: `↑`
|
||||
* 向上滚动一页: `Home`
|
||||
* 向下滚动一行: `↓`
|
||||
* 向下滚动一页: `End`
|
||||
* 全选: `ctrl` `A`
|
||||
* 复制: `ctrl` `C`
|
||||
* 搜索: `ctrl` `F`
|
||||
* 清空: `ctrl` `L`
|
||||
* 向上滚动一行: `↑`
|
||||
* 向上滚动一页: `Home`
|
||||
* 向下滚动一行: `↓`
|
||||
* 向下滚动一页: `End`
|
||||
|
||||
### 命令内置参数
|
||||
|
||||
⚡ 使用 `@{{ xxx }}` 来替换命令参数
|
||||
|
||||
| 参数 | 描述 | 参数示例 |
|
||||
|:----------------|:---------------------------|-------------------------------------------------|
|
||||
| source | 执行来源 (BATCH/JOB) | JOB |
|
||||
| sourceId | 执行来源id (JOB特有) | 6 |
|
||||
| seq | 执行序列 (JOB特有) | 920 |
|
||||
| userId | 执行用户id (JOB为0) | 1 |
|
||||
| username | 执行用户名 (JOB为system) | admin |
|
||||
| execId | 执行记录id | 2000 |
|
||||
| hostId | 执行主机id | 1 |
|
||||
| hostName | 执行主机名称 | server-127.0.0.1 |
|
||||
| hostCode | 执行主机编码 | server |
|
||||
| hostAddress | 执行主机地址 | 127.0.0.1 |
|
||||
| hostUsername | 执行主机用户名 | root |
|
||||
| osType | 执行主机系统版本 | LINUX |
|
||||
| port | SSH 端口 | 22 |
|
||||
| charset | SSH 编码集 | UTF-8 |
|
||||
| scriptExec | 是否使用脚本执行 (0否1是) | 1 |
|
||||
| scriptPath | 脚本文件路径 | /root/orion/orion-ops-pro/script/exec_2000_1.sh |
|
||||
| uuid | 生成任务维度 uuid | 82b20e52-cea9-455b-a0b4-e4e25654e22b |
|
||||
| uuidShort | 生成任务维度 uuid 无 '-' | 82b20e52cea9455ba0b4e4e25654e22b |
|
||||
| hostUuid | 生成机器维度 uuid | 2687b09e-1046-4e8d-9cc2-a7e697836b88 |
|
||||
| hostUuidShort | 生成机器维度 uuid 无 '-' | 2687b09e10464e8d9cc2a7e697836b88 |
|
||||
| timestampMillis | 时间戳毫秒 | 1715173200848 |
|
||||
| timestamp | 时间戳 | 1715173200 |
|
||||
| date | 执行时间 `yyyy-MM-dd` | `2024-01-01` |
|
||||
| datetime | 执行时间 `yyyy-MM-dd HH:mm:ss` | `2024-01-01 21:00:00` |
|
||||
| 参数 | 描述 | 参数示例 |
|
||||
|:----------------|:---------------------------|-----------------------------------------------|
|
||||
| source | 执行来源 (BATCH/JOB) | JOB |
|
||||
| sourceId | 执行来源id (JOB特有) | 6 |
|
||||
| seq | 执行序列 (JOB特有) | 920 |
|
||||
| userId | 执行用户id (JOB为0) | 1 |
|
||||
| username | 执行用户名 (JOB为system) | admin |
|
||||
| execId | 执行记录id | 2000 |
|
||||
| hostId | 执行主机id | 1 |
|
||||
| hostName | 执行主机名称 | server-127.0.0.1 |
|
||||
| hostCode | 执行主机编码 | server |
|
||||
| hostAddress | 执行主机地址 | 127.0.0.1 |
|
||||
| hostUsername | 执行主机用户名 | root |
|
||||
| osType | 执行主机系统版本 | LINUX |
|
||||
| port | SSH 端口 | 22 |
|
||||
| charset | SSH 编码集 | UTF-8 |
|
||||
| scriptExec | 是否使用脚本执行 (0否1是) | 1 |
|
||||
| scriptPath | 脚本文件路径 | /root/orion/orion-visor/script/exec_2000_1.sh |
|
||||
| uuid | 生成任务维度 uuid | 82b20e52-cea9-455b-a0b4-e4e25654e22b |
|
||||
| uuidShort | 生成任务维度 uuid 无 '-' | 82b20e52cea9455ba0b4e4e25654e22b |
|
||||
| hostUuid | 生成机器维度 uuid | 2687b09e-1046-4e8d-9cc2-a7e697836b88 |
|
||||
| hostUuidShort | 生成机器维度 uuid 无 '-' | 2687b09e10464e8d9cc2a7e697836b88 |
|
||||
| timestampMillis | 时间戳毫秒 | 1715173200848 |
|
||||
| timestamp | 时间戳 | 1715173200 |
|
||||
| date | 执行时间 `yyyy-MM-dd` | `2024-01-01` |
|
||||
| datetime | 执行时间 `yyyy-MM-dd HH:mm:ss` | `2024-01-01 21:00:00` |
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
> 主机设置
|
||||
|
||||
* SSH 配置: 可以自定义配置连接主机的 密码/秘钥/身份, 仅对自己生效, 不会修改全局配置, `秘钥` `身份` 数据是用户授权的资产数据
|
||||
* SSH 配置: 可以自定义配置连接主机的密码、密钥、身份, 仅对自己生效, 不会修改全局配置。`密钥` `身份` 数据是用户授权的资产数据
|
||||
* 标签颜色: 自定义配置标签的颜色, 可以用来区分环境等
|
||||
|
||||
> 顶部状态栏
|
||||
@@ -24,6 +24,7 @@
|
||||
> 右侧状态栏
|
||||
|
||||
* 命令片段: 自定义快速执行的命令片段, 双击直接执行
|
||||
* 路径书签: 自定义快速进入的目录
|
||||
* 传输列表: 打开文件传输列表, 当前会话下, 所有的文件上传下载传输都会显示在这里
|
||||
* 截图: 截屏终端并且自动下载
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
### 任务列表
|
||||
|
||||
⚡ 内置参数同 `批量执行 > 命令执行` [查看](/operator/exec.md?id=命令内置参数)
|
||||
⚡ 内置参数同 `批量执行` > `命令执行` [查看](/operator/exec.md?id=命令内置参数)
|
||||
|
||||
维护计划任务, 定时执行命令。
|
||||
|
||||
@@ -22,5 +22,5 @@
|
||||
* 命令: 查看执行时的命令
|
||||
* 参数: 查看执行时的参数
|
||||
* 中断: 中断命令执行
|
||||
* 日志: 查看执行日志, ctrl + 左键点击会用新页面打开
|
||||
* 日志: 查看执行日志 `ctrl + 左键` 点击会用新页面打开
|
||||
* 下载: 下载执行日志
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
* 新增: 添加一个字典项
|
||||
* 刷新缓存: 强制刷新服务器缓存, 一般是手动修改了数据库后需要点击此按钮
|
||||
* 查看: 查看字典值的json
|
||||
* 查看: 查看字典值的 json
|
||||
* 修改: 修改字典项
|
||||
* 删除: 删除字典项以及字典值
|
||||
|
||||
|
||||
@@ -1,54 +1,54 @@
|
||||
### 所需环境
|
||||
|
||||
* JDK 1.8
|
||||
* Mysql 8.0(+)
|
||||
* Redis 5.0.5(+)
|
||||
* Node 16.16.0(+)
|
||||
* Maven 3.5.4(+)
|
||||
* jdk 1.8
|
||||
* mysql 8.0.+
|
||||
* redis 6.0.+
|
||||
* maven 3.5.+
|
||||
* node 18.12.+
|
||||
* pnpm 9.1.+
|
||||
|
||||
⚡ maven 推荐使用阿里云 mirror
|
||||
⚡ npm 建议使用淘宝镜像 `npm config set registry https://registry.npmmirror.com/`
|
||||
⚡ pnpm 建议使用淘宝镜像 `pnpm config set registry https://registry.npmmirror.com/`
|
||||
|
||||
### 配置
|
||||
|
||||
1. 拉取代码
|
||||
### 拉取代码
|
||||
|
||||
```
|
||||
# github
|
||||
git clone https://github.com/lijiahangmax/orion-ops-pro
|
||||
git clone https://github.com/lijiahangmax/orion-visor
|
||||
# gitee
|
||||
git clone https://gitee.com/lijiahangmax/orion-ops-pro
|
||||
git clone https://gitee.com/lijiahangmax/orion-visor
|
||||
```
|
||||
|
||||
2. 初始化数据库
|
||||
### 初始化数据库
|
||||
|
||||
```
|
||||
# 执行脚本
|
||||
orion-ops-pro/sql/init-1-schema-databases.sql
|
||||
orion-ops-pro/sql/init-2-schema-tables.sql
|
||||
orion-ops-pro/sql/init-3-schema-quartz.sql
|
||||
orion-ops-pro/sql/init-4-data.sql
|
||||
orion-visor/sql/init-1-schema-databases.sql
|
||||
orion-visor/sql/init-2-schema-tables.sql
|
||||
orion-visor/sql/init-3-schema-quartz.sql
|
||||
orion-visor/sql/init-4-data.sql
|
||||
```
|
||||
|
||||
3. 修改后端配置
|
||||
### 修改后端配置
|
||||
|
||||
```
|
||||
# 修改配置文件 (mysql, redis, secret-key)
|
||||
orion-ops-pro/orion-ops-launch/src/main/resources/application-prod.yaml
|
||||
orion-visor/orion-visor-launch/src/main/resources/application-prod.yaml
|
||||
|
||||
# 进入代码目录
|
||||
cd orion-ops-pro
|
||||
cd orion-visor
|
||||
# 编译
|
||||
mvn -U clean install -DskipTests
|
||||
# 启动
|
||||
com.orion.ops.launch.LaunchApplication
|
||||
com.orion.visor.launch.LaunchApplication
|
||||
```
|
||||
|
||||
4. 修改前端配置
|
||||
### 修改前端配置
|
||||
|
||||
```
|
||||
```shell
|
||||
# 进入代码目录
|
||||
cd orion-ops-pro/orion-ops-ui
|
||||
cd orion-visor/orion-visor-ui
|
||||
# 下载 pnpm
|
||||
npm i -g pnpm
|
||||
# 下载依赖
|
||||
|
||||
@@ -19,42 +19,53 @@ Dashboard 修改)
|
||||
|
||||
### 拉取代码
|
||||
|
||||
```
|
||||
```shell
|
||||
# github
|
||||
git clone https://github.com/lijiahangmax/orion-ops-pro
|
||||
git clone --depth=1 https://github.com/lijiahangmax/orion-visor
|
||||
# gitee
|
||||
git clone https://gitee.com/lijiahangmax/orion-ops-pro
|
||||
git clone --depth=1 https://gitee.com/lijiahangmax/orion-visor
|
||||
```
|
||||
|
||||
### 构建镜像
|
||||
### 拉取镜像
|
||||
|
||||
```
|
||||
# 进入仓库目录
|
||||
cd orion-ops-pro
|
||||
# 修改 docker-compose.yml (建议修改)
|
||||
# MYSQL_USER mysql 用户名
|
||||
# MYSQL_PASSWORD mysql 用户密码
|
||||
# MYSQL_ROOT_PASSWORD mysql root 密码
|
||||
# REDIS_PASSWORD redis 密码
|
||||
# SECRET_KEY 加密秘钥
|
||||
# 构建
|
||||
docker compose build
|
||||
cd orion-visor
|
||||
# 创建名为 .env 的 .env.example 副本
|
||||
cp .env.example .env
|
||||
# 将其中的值删除以保持默认或将其修改为你喜欢的值
|
||||
# SERVICE_PORT 你希望服务监听的端口
|
||||
# VOLUME_BASE 你希望数据持久化保存的目录, 如果不提前创建将以 docker 进程宿主身份创建(通常是 root)
|
||||
|
||||
# MYSQL_HOST mysql 服务所在的主机, 如果你没有现有的 MySQL 请保持值为 mysql, 如果你有自部署的请在 docker-compose.yml 中移除 services.mysql 以节约性能
|
||||
# MYSQL_PORT mysql 监听的端口
|
||||
# MYSQL_DATABASE mysql 数据库
|
||||
# MYSQL_USER mysql 用户名
|
||||
# MYSQL_PASSWORD mysql 用户密码
|
||||
# MYSQL_ROOT_PASSWORD mysql root 密码
|
||||
|
||||
# REDIS_HOST redis 服务所在的主机, 如果你没有现有的 Redis 请保持值为 redis, 如果你有自部署的请在 docker-compose.yml 中移除 services.redis 以节约性能
|
||||
# REDIS_PASSWORD redis 密码
|
||||
|
||||
# SECRET_KEY 加密密钥
|
||||
# 拉取远程镜像
|
||||
docker compose pull
|
||||
```
|
||||
|
||||
### 启动
|
||||
|
||||
```
|
||||
```shell
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
### 连接 mysql (如果需要在 navicat 中连接)
|
||||
### 修改 MySQL 账户的加密方式
|
||||
|
||||
```
|
||||
访问 adminer: http://localhost:8081
|
||||
服务器: orion-ops-pro-db
|
||||
服务器: orion-visor-mysql
|
||||
用户名: root
|
||||
密码: Data@123456
|
||||
数据库: orion-ops-pro
|
||||
密 码: Data@123456
|
||||
数据库: orion_visor
|
||||
|
||||
点击左侧 SQL命令 输入:
|
||||
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'Data@123456';
|
||||
@@ -64,5 +75,5 @@ ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'Data@123456';
|
||||
### 测试访问
|
||||
|
||||
在浏览器中输入 http://localhost:1081/ 访问
|
||||
账号: admin
|
||||
密码: admin
|
||||
账号: `admin`
|
||||
密码: `admin`
|
||||
|
||||
@@ -1,34 +1,49 @@
|
||||
> ##### 1. 数据误删除怎么办?
|
||||
### 日志文件在哪?
|
||||
|
||||
```shell
|
||||
# 宿主机
|
||||
tail -f -n 200 /data/orion-visor-space/docker-volumes/orion-visor-service/root-orion/logs/orion-visor/app.log
|
||||
# 容器内
|
||||
tail -f -n 200 /root/orion/logs/orion-visor/app.log
|
||||
# 滚动日志 .../logs/orion-visor/rolling/*
|
||||
```
|
||||
|
||||
### 数据误删除怎么办?
|
||||
|
||||
数据库的数据都采用了逻辑删除, 可以将已删除的数据中的 `deleted` 字段改为 `0`
|
||||
如果不知道数据是哪一条, 可以查询用户操作日志, 点击 `参数` 寻找操作的id
|
||||
|
||||
> ##### 2. 执行命令时为什么会找不到环境变量?
|
||||
### 执行命令时为什么会找不到环境变量?
|
||||
|
||||
可以在执行命令的第一行设置 `source /etc/profile` 来加载环境变量
|
||||
|
||||
> ##### 3. 命令中途执行失败如何设置中断执行?
|
||||
### 命令中途执行失败如何设置中断执行?
|
||||
|
||||
可以在执行命令的第一行设置 `set -e`
|
||||
作用是: 当执行出现意料之外的情况时, 立即退出
|
||||
|
||||
> ##### 4. 在调度任务、批量执行 命令执行成功的依据是什么?
|
||||
### 在调度任务、批量执行 命令执行成功的依据是什么?
|
||||
|
||||
是获取命令的 `exitcode` 判断是否为 `0` 如果非0则代表命令执行失败
|
||||
同理, 在命令的最后一行设置 `exit 1` 结果将会是失败, 可以用此来中断后续流程
|
||||
|
||||
> ##### 5. 调度任务、批量执行 的日志文件中如何只保存原始输出?
|
||||
### 调度任务、批量执行 的日志文件中如何只保存原始输出?
|
||||
|
||||
修改 `application.yaml` `app.exec-log.append-ansi` 为 `false`
|
||||
|
||||
> ##### 6. 为什么使用秘钥认证还是无法连接机器?
|
||||
### SFTP 为什么有些文件无法编辑?
|
||||
|
||||
只有普通文件可以在线编辑, 也就是 attr 为 `-` 开头的文件, 且文件大小不超过 `2MB` (默认)
|
||||
修改 `.env.production` `VITE_SFTP_PREVIEW_MB` 改为一个合适的大小(MB) 重新构建
|
||||
|
||||
### 为什么使用密钥认证还是无法连接机器?
|
||||
|
||||
```
|
||||
# 升级 openssh
|
||||
yum update openssh
|
||||
sshd -v (我的版本: OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017)
|
||||
|
||||
# 生成秘钥时添加参数 -m PEM
|
||||
# 生成密钥时添加参数 -m PEM
|
||||
ssh-keygen -t rsa -m PEM
|
||||
chmod 700 ~/.ssh
|
||||
chmod 700 ~/.ssh/authorized_keys
|
||||
@@ -41,9 +56,3 @@ AuthorizedKeysFile .ssh/authorized_keys
|
||||
# 重启 sshd 服务
|
||||
service sshd restart
|
||||
```
|
||||
|
||||
<br/>
|
||||
|
||||
⚡ 详细使用请参考操作手册~
|
||||
|
||||
<br/>
|
||||
|
||||
@@ -1,53 +1,53 @@
|
||||
### 所需环境
|
||||
|
||||
* JDK 1.8
|
||||
* Mysql 8.0(+)
|
||||
* Redis 5.0.5(+)
|
||||
* Node 16.16.0(+)
|
||||
* Maven 3.5.4(+)
|
||||
* Nginx
|
||||
* jdk 1.8
|
||||
* mysql 8.0.+
|
||||
* redis 6.0.+
|
||||
* maven 3.5.+
|
||||
* node 18.12.+
|
||||
* pnpm 9.1.+
|
||||
* nginx
|
||||
|
||||
⚡ maven 推荐使用阿里云 mirror
|
||||
⚡ npm 建议使用淘宝镜像 `npm config set registry https://registry.npmmirror.com/`
|
||||
⚡ npm 建议使用淘宝镜像 `npm config set registry https://registry.npmmirror.com/`
|
||||
⚡ pnpm 建议使用淘宝镜像 `pnpm config set registry https://registry.npmmirror.com/`
|
||||
|
||||
### 构建
|
||||
|
||||
1. 拉取代码
|
||||
### 拉取代码
|
||||
|
||||
```
|
||||
# github
|
||||
git clone https://github.com/lijiahangmax/orion-ops-pro
|
||||
git clone https://github.com/lijiahangmax/orion-visor
|
||||
# gitee
|
||||
git clone https://gitee.com/lijiahangmax/orion-ops-pro
|
||||
git clone https://gitee.com/lijiahangmax/orion-visor
|
||||
```
|
||||
|
||||
2. 初始化数据库
|
||||
### 初始化数据库
|
||||
|
||||
```
|
||||
# 执行脚本
|
||||
orion-ops-pro/sql/init-1-schema-databases.sql
|
||||
orion-ops-pro/sql/init-2-schema-tables.sql
|
||||
orion-ops-pro/sql/init-3-schema-quartz.sql
|
||||
orion-ops-pro/sql/init-4-data.sql
|
||||
orion-visor/sql/init-1-schema-databases.sql
|
||||
orion-visor/sql/init-2-schema-tables.sql
|
||||
orion-visor/sql/init-3-schema-quartz.sql
|
||||
orion-visor/sql/init-4-data.sql
|
||||
```
|
||||
|
||||
3. 构建后端代码
|
||||
### 构建后端代码
|
||||
|
||||
```
|
||||
# 修改配置文件 (mysql, redis, secret-key)
|
||||
orion-ops-pro/orion-ops-launch/src/main/resources/application-prod.yaml
|
||||
orion-visor/orion-visor-launch/src/main/resources/application-prod.yaml
|
||||
|
||||
# 进入代码目录
|
||||
cd orion-ops-pro
|
||||
cd orion-visor
|
||||
# 编译
|
||||
mvn -U clean install -DskipTests
|
||||
```
|
||||
|
||||
4. 构建前端代码
|
||||
### 构建前端代码
|
||||
|
||||
```
|
||||
# 进入代码目录
|
||||
cd orion-ops-pro/orion-ops-ui
|
||||
cd orion-visor/orion-visor-ui
|
||||
# 下载 pnpm
|
||||
npm i -g pnpm
|
||||
# 下载依赖
|
||||
@@ -87,16 +87,16 @@ server {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location /orion/api {
|
||||
proxy_pass http://localhost:9200/orion/api;
|
||||
location /orion-visor/api {
|
||||
proxy_pass http://localhost:9200/orion-visor/api;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location /orion/keep-alive {
|
||||
proxy_pass http://localhost:9200/orion/keep-alive;
|
||||
location /orion-visor/keep-alive {
|
||||
proxy_pass http://localhost:9200/orion-visor/keep-alive;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
@@ -119,10 +119,10 @@ server {
|
||||
### 部署
|
||||
|
||||
```
|
||||
复制 orion-ops-pro/orion-ops-ui/dist 到 /usr/share/nginx/html
|
||||
复制 orion-ops-pro/orion-ops-launch/target/orion-ops-launch.jar 到 /data/orion
|
||||
复制 orion-visor/orion-visor-ui/dist 到 /usr/share/nginx/html
|
||||
复制 orion-visor/orion-visor-launch/target/orion-visor-launch.jar 到 /data/orion-visor-space
|
||||
# 启动后台服务
|
||||
nohup java -jar orion-ops-launch.jar --spring.profiles.active=prod 2>&1 &
|
||||
nohup java -jar orion-visor-launch.jar --spring.profiles.active=prod 2>&1 &
|
||||
# 启动 nginx
|
||||
service nginx start
|
||||
```
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## v1.0.0
|
||||
### v1.0.0
|
||||
|
||||
> sql 脚本 - DML
|
||||
### sql 脚本 - DML
|
||||
|
||||
```sql
|
||||
-- 字典配置项
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
## v1.0.1
|
||||
### v1.0.1
|
||||
|
||||
> sql 脚本 - DDL
|
||||
### sql 脚本 - DDL
|
||||
|
||||
```sql
|
||||
DROP TABLE IF EXISTS `command_template`;
|
||||
ALTER TABLE `operator_log` ADD INDEX `idx_type`(`type`);
|
||||
```
|
||||
|
||||
> sql 脚本 - DML
|
||||
### sql 脚本 - DML
|
||||
|
||||
```sql
|
||||
-- 菜单配置
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## v1.0.2
|
||||
### v1.0.2
|
||||
|
||||
> sql 脚本 - DDL
|
||||
### sql 脚本 - DDL
|
||||
|
||||
```sql
|
||||
ALTER TABLE `host_connect_log`
|
||||
@@ -83,16 +83,16 @@ CREATE TABLE `exec_template`
|
||||
ROW_FORMAT = Dynamic;
|
||||
```
|
||||
|
||||
> sql 脚本 - DML
|
||||
### sql 脚本 - DML
|
||||
|
||||
```sql
|
||||
-- 菜单配置
|
||||
TRUNCATE `system_menu`;
|
||||
INSERT INTO `system_menu` VALUES (1, 0, '工作台', NULL, 1, 10, 1, 1, 1, 0, 'IconComputer', NULL, 'workplace', '2023-07-28 10:51:50', '2023-09-11 15:27:52', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (5, 0, '用户设置', NULL, 1, 700, 1, 1, 1, 0, 'icon-user', NULL, '', '2023-07-28 10:55:38', '2024-03-07 19:03:52', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (8, 0, '项目地址 github', NULL, 1, 1000, 1, 1, 1, 0, 'icon-github', 'https://github.com/lijiahangmax/orion-ops-pro', '', '2023-07-28 11:04:59', '2023-10-12 15:21:22', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (8, 0, '项目地址 github', NULL, 1, 1000, 1, 1, 1, 0, 'icon-github', 'https://github.com/lijiahangmax/orion-visor', '', '2023-07-28 11:04:59', '2023-10-12 15:21:22', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (10, 5, '角色管理', NULL, 2, 10, 1, 1, 1, 0, 'IconUserGroup', '', 'role', '2023-07-28 10:55:52', '2024-03-07 19:10:13', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (11, 0, '项目地址 gitee', NULL, 1, 1010, 1, 1, 1, 0, 'icon-gitlab', 'https://gitee.com/lijiahangmax/orion-ops-pro', '', '2023-08-02 18:08:07', '2023-08-11 18:11:34', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (11, 0, '项目地址 gitee', NULL, 1, 1010, 1, 1, 1, 0, 'icon-gitlab', 'https://gitee.com/lijiahangmax/orion-visor', '', '2023-08-02 18:08:07', '2023-08-11 18:11:34', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (12, 0, '系统设置', NULL, 1, 800, 1, 1, 1, 0, 'icon-tool', NULL, '', '2023-08-02 18:24:24', '2024-03-07 19:03:57', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (13, 12, '系统菜单', '', 2, 10, 1, 1, 1, 0, 'icon-menu', NULL, 'systemMenu', '2023-08-02 18:29:01', '2024-03-07 22:25:00', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (20, 10, '创建角色', 'infra:system-role:create', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-15 16:36:54', '2023-10-27 01:20:46', '1', '1', 0);
|
||||
@@ -127,12 +127,12 @@ INSERT INTO `system_menu` VALUES (73, 72, '查询主机身份', 'asset:host-iden
|
||||
INSERT INTO `system_menu` VALUES (74, 72, '创建主机身份', 'asset:host-identity:create', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (75, 72, '修改主机身份', 'asset:host-identity:update', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (76, 72, '删除主机身份', 'asset:host-identity:delete', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (79, 63, '主机秘钥', NULL, 2, 50, 1, 1, 1, 0, 'IconLock', NULL, 'hostKey', '2023-09-20 11:47:18', '2024-03-07 19:09:26', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (80, 79, '查询主机秘钥', 'asset:host-key:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (81, 79, '创建主机秘钥', 'asset:host-key:create', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (82, 79, '修改主机秘钥', 'asset:host-key:update', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (83, 79, '删除主机秘钥', 'asset:host-key:delete', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (84, 79, '查询主机秘钥详情', 'asset:host-key:query-detail', 3, 50, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-11-09 15:52:57', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (79, 63, '主机密钥', NULL, 2, 50, 1, 1, 1, 0, 'IconLock', NULL, 'hostKey', '2023-09-20 11:47:18', '2024-03-07 19:09:26', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (80, 79, '查询主机密钥', 'asset:host-key:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (81, 79, '创建主机密钥', 'asset:host-key:create', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (82, 79, '修改主机密钥', 'asset:host-key:update', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (83, 79, '删除主机密钥', 'asset:host-key:delete', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (84, 79, '查询主机密钥详情', 'asset:host-key:query-detail', 3, 50, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-11-09 15:52:57', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (94, 5, '个人中心', NULL, 2, 20, 0, 1, 0, 0, 'IconUser', NULL, 'userInfo', '2023-10-08 18:53:01', '2023-11-02 11:47:34', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (97, 12, '数据字典项', NULL, 2, 20, 1, 1, 1, 0, 'IconBook', NULL, 'dictKey', '2023-10-17 11:38:13', '2024-03-07 19:10:45', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (99, 97, '创建字典配置项', 'infra:dict-key:create', 3, 110, 1, 1, 1, 0, NULL, NULL, NULL, '2023-10-17 11:38:13', '2023-10-27 01:16:10', '1', '1', 0);
|
||||
@@ -152,7 +152,7 @@ INSERT INTO `system_menu` VALUES (125, 48, '下线用户会话', 'infra:system-u
|
||||
INSERT INTO `system_menu` VALUES (126, 48, '查询用户登录日志', 'infra:system-user:login-history', 3, 70, 1, 1, 1, 0, NULL, NULL, NULL, '2023-12-27 15:05:37', '2023-12-27 15:07:19', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (129, 64, '编辑主机分组', 'asset:host-group:update', 3, 100, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-13 18:16:32', '2023-12-01 01:47:58', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (133, 144, '主机分组授权', 'asset:host-group:grant', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-23 18:08:57', '2023-11-30 22:39:53', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (142, 144, '主机秘钥授权', 'asset:host-key:grant', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-30 21:06:13', '2023-11-30 22:39:47', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (142, 144, '主机密钥授权', 'asset:host-key:grant', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-30 21:06:13', '2023-11-30 22:39:47', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (143, 144, '主机身份授权', 'asset:host-identity:grant', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-30 21:06:26', '2023-11-30 22:40:11', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (144, 63, '资产授权', NULL, 2, 70, 1, 1, 1, 0, 'icon-safe', NULL, 'assetGrant', '2023-11-30 22:38:57', '2023-11-30 22:39:06', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (145, 0, '主机运维', NULL, 1, 400, 1, 1, 1, 1, 'IconDesktop', NULL, '', '2023-12-04 23:33:25', '2024-03-07 19:03:46', '1', '1', 0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## v1.0.3
|
||||
### v1.0.3
|
||||
|
||||
> sql 脚本 - DML
|
||||
### sql 脚本 - DML
|
||||
|
||||
```sql
|
||||
DELETE FROM preference WHERE type = 'TERMINAL';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## v1.0.4
|
||||
### v1.0.4
|
||||
|
||||
> sql 脚本 - DDL
|
||||
### sql 脚本 - DDL
|
||||
|
||||
```sql
|
||||
-- 修改字段
|
||||
@@ -260,7 +260,7 @@ CREATE TABLE `QRTZ_SCHEDULER_STATE`
|
||||
ROW_FORMAT = Dynamic;
|
||||
```
|
||||
|
||||
> sql 脚本 - DML
|
||||
### sql 脚本 - DML
|
||||
|
||||
```sql
|
||||
-- 操作日志修改
|
||||
@@ -276,9 +276,9 @@ UPDATE operator_log SET module = 'asset:exec-command-log', type = 'exec-command-
|
||||
TRUNCATE `system_menu`;
|
||||
INSERT INTO `system_menu` VALUES (1, 0, '工作台', NULL, 1, 10, 1, 1, 1, 0, 'IconComputer', NULL, 'workplace', '2023-07-28 10:51:50', '2023-09-11 15:27:52', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (5, 0, '用户设置', NULL, 1, 700, 1, 1, 1, 0, 'icon-user', NULL, 'userModule', '2023-07-28 10:55:38', '2024-04-03 00:56:30', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (8, 0, '项目地址 github', NULL, 1, 1000, 1, 1, 1, 0, 'icon-github', 'https://github.com/lijiahangmax/orion-ops-pro', '', '2023-07-28 11:04:59', '2023-10-12 15:21:22', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (8, 0, '项目地址 github', NULL, 1, 1000, 1, 1, 1, 0, 'icon-github', 'https://github.com/lijiahangmax/orion-visor', '', '2023-07-28 11:04:59', '2023-10-12 15:21:22', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (10, 5, '角色管理', NULL, 2, 10, 1, 1, 1, 0, 'IconUserGroup', '', 'role', '2023-07-28 10:55:52', '2024-03-07 19:10:13', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (11, 0, '项目地址 gitee', NULL, 1, 1010, 1, 1, 1, 0, 'icon-gitlab', 'https://gitee.com/lijiahangmax/orion-ops-pro', '', '2023-08-02 18:08:07', '2023-08-11 18:11:34', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (11, 0, '项目地址 gitee', NULL, 1, 1010, 1, 1, 1, 0, 'icon-gitlab', 'https://gitee.com/lijiahangmax/orion-visor', '', '2023-08-02 18:08:07', '2023-08-11 18:11:34', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (12, 0, '系统设置', NULL, 1, 800, 1, 1, 1, 0, 'icon-tool', NULL, 'systemModule', '2023-08-02 18:24:24', '2024-04-03 00:56:17', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (13, 12, '系统菜单', '', 2, 10, 1, 1, 1, 0, 'icon-menu', NULL, 'systemMenu', '2023-08-02 18:29:01', '2024-03-07 22:25:00', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (20, 10, '创建角色', 'infra:system-role:create', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-15 16:36:54', '2023-10-27 01:20:46', '1', '1', 0);
|
||||
@@ -313,12 +313,12 @@ INSERT INTO `system_menu` VALUES (73, 72, '查询主机身份', 'asset:host-iden
|
||||
INSERT INTO `system_menu` VALUES (74, 72, '创建主机身份', 'asset:host-identity:create', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (75, 72, '修改主机身份', 'asset:host-identity:update', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (76, 72, '删除主机身份', 'asset:host-identity:delete', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (79, 63, '主机秘钥', NULL, 2, 50, 1, 1, 1, 0, 'IconLock', NULL, 'hostKey', '2023-09-20 11:47:18', '2024-03-07 19:09:26', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (80, 79, '查询主机秘钥', 'asset:host-key:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (81, 79, '创建主机秘钥', 'asset:host-key:create', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (82, 79, '修改主机秘钥', 'asset:host-key:update', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (83, 79, '删除主机秘钥', 'asset:host-key:delete', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (84, 79, '查询主机秘钥详情', 'asset:host-key:query-detail', 3, 50, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-11-09 15:52:57', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (79, 63, '主机密钥', NULL, 2, 50, 1, 1, 1, 0, 'IconLock', NULL, 'hostKey', '2023-09-20 11:47:18', '2024-03-07 19:09:26', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (80, 79, '查询主机密钥', 'asset:host-key:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (81, 79, '创建主机密钥', 'asset:host-key:create', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (82, 79, '修改主机密钥', 'asset:host-key:update', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (83, 79, '删除主机密钥', 'asset:host-key:delete', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (84, 79, '查询主机密钥详情', 'asset:host-key:query-detail', 3, 50, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-11-09 15:52:57', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (94, 5, '个人中心', NULL, 2, 20, 0, 1, 0, 0, 'IconUser', NULL, 'userInfo', '2023-10-08 18:53:01', '2023-11-02 11:47:34', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (97, 12, '数据字典项', NULL, 2, 20, 1, 1, 1, 0, 'IconBook', NULL, 'dictKey', '2023-10-17 11:38:13', '2024-03-07 19:10:45', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (99, 97, '创建字典配置项', 'infra:dict-key:create', 3, 110, 1, 1, 1, 0, NULL, NULL, NULL, '2023-10-17 11:38:13', '2023-10-27 01:16:10', '1', '1', 0);
|
||||
@@ -338,7 +338,7 @@ INSERT INTO `system_menu` VALUES (125, 48, '下线用户会话', 'infra:system-u
|
||||
INSERT INTO `system_menu` VALUES (126, 48, '查询用户登录日志', 'infra:system-user:login-history', 3, 70, 1, 1, 1, 0, NULL, NULL, NULL, '2023-12-27 15:05:37', '2023-12-27 15:07:19', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (129, 64, '编辑主机分组', 'asset:host-group:update', 3, 100, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-13 18:16:32', '2023-12-01 01:47:58', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (133, 144, '主机分组授权', 'asset:host-group:grant', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-23 18:08:57', '2023-11-30 22:39:53', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (142, 144, '主机秘钥授权', 'asset:host-key:grant', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-30 21:06:13', '2023-11-30 22:39:47', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (142, 144, '主机密钥授权', 'asset:host-key:grant', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-30 21:06:13', '2023-11-30 22:39:47', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (143, 144, '主机身份授权', 'asset:host-identity:grant', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-30 21:06:26', '2023-11-30 22:40:11', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (144, 63, '资产授权', NULL, 2, 70, 1, 1, 1, 0, 'icon-safe', NULL, 'assetGrant', '2023-11-30 22:38:57', '2023-11-30 22:39:06', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (145, 0, '主机运维', NULL, 1, 400, 1, 1, 1, 1, 'IconDesktop', NULL, 'hostModule', '2023-12-04 23:33:25', '2024-04-03 00:57:16', '1', '1', 0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## v1.0.5
|
||||
### v1.0.5
|
||||
|
||||
> sql 脚本 - DDL
|
||||
### sql 脚本 - DDL
|
||||
|
||||
```sql
|
||||
ALTER TABLE `system_user`
|
||||
@@ -22,7 +22,7 @@ ALTER TABLE `exec_host_log`
|
||||
ADD COLUMN `script_path` varchar(512) NULL COMMENT '脚本路径' AFTER `log_path`;
|
||||
```
|
||||
|
||||
> sql 脚本 - DML
|
||||
### sql 脚本 - DML
|
||||
|
||||
```sql
|
||||
-- 初始化主机身份类型
|
||||
@@ -51,7 +51,7 @@ INSERT INTO `dict_key` VALUES (38, 'hostSshOsType', 'STRING', '[]', '主机系
|
||||
-- 初始化字典值
|
||||
DELETE FROM dict_value WHERE id >= 270;
|
||||
INSERT INTO `dict_value` VALUES (270, 37, 'hostIdentityType', 'PASSWORD', '密码', '{\"color\": \"purple\"}', 10, '2024-04-16 17:17:49', '2024-04-16 17:17:49', '2', '2', 0);
|
||||
INSERT INTO `dict_value` VALUES (271, 37, 'hostIdentityType', 'KEY', '秘钥', '{\"color\": \"arcoblue\"}', 20, '2024-04-16 17:18:12', '2024-04-16 17:18:12', '2', '2', 0);
|
||||
INSERT INTO `dict_value` VALUES (271, 37, 'hostIdentityType', 'KEY', '密钥', '{\"color\": \"arcoblue\"}', 20, '2024-04-16 17:18:12', '2024-04-16 17:18:12', '2', '2', 0);
|
||||
INSERT INTO `dict_value` VALUES (272, 38, 'hostSshOsType', 'LINUX', 'linux', '{}', 10, '2024-04-16 22:19:25', '2024-04-16 22:30:59', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (273, 38, 'hostSshOsType', 'WINDOWS', 'windows', '{}', 20, '2024-04-16 22:19:39', '2024-04-16 22:30:59', '1', '1', 0);
|
||||
```
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## v1.0.6
|
||||
### v1.0.6
|
||||
|
||||
> sql 脚本 - DDL
|
||||
### sql 脚本 - DDL
|
||||
|
||||
```sql
|
||||
-- 数据分组添加 userId
|
||||
@@ -58,10 +58,9 @@ CREATE TABLE `path_bookmark`
|
||||
CHARACTER SET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '路径书签'
|
||||
ROW_FORMAT = Dynamic;
|
||||
|
||||
```
|
||||
|
||||
> sql 脚本 - DML
|
||||
### sql 脚本 - DML
|
||||
|
||||
```sql
|
||||
-- 设置数据分组 user_id
|
||||
@@ -70,8 +69,8 @@ UPDATE data_group_rel SET user_id = 0;
|
||||
-- 菜单
|
||||
DELETE FROM `system_menu` WHERE id >= 190;
|
||||
INSERT INTO `system_menu` VALUES (190, 184, '中断计划任务', 'asset:exec-job-log:interrupt', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-13 15:08:23', '2024-04-12 00:00:33', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (191, 0, '提交bug', NULL, 1, 1020, 1, 1, 0, 1, 'IconBug', 'https://github.com/lijiahangmax/orion-ops-pro/issues', NULL, '2024-04-26 11:30:18', '2024-04-26 11:30:30', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (192, 0, '点个赞~', NULL, 1, 1030, 1, 1, 0, 1, 'IconThumbUp', 'https://gitee.com/lijiahangmax/orion-ops-pro', NULL, '2024-04-26 11:32:30', '2024-04-26 11:32:30', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (191, 0, '提交bug', NULL, 1, 1020, 1, 1, 0, 1, 'IconBug', 'https://github.com/lijiahangmax/orion-visor/issues', NULL, '2024-04-26 11:30:18', '2024-04-26 11:30:30', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (192, 0, '点个赞~', NULL, 1, 1030, 1, 1, 0, 1, 'IconThumbUp', 'https://gitee.com/lijiahangmax/orion-visor', NULL, '2024-04-26 11:32:30', '2024-04-26 11:32:30', '1', '1', 0);
|
||||
-- 字典项
|
||||
DELETE FROM `dict_key` WHERE id = 27 OR id >= 39;
|
||||
INSERT INTO `dict_key` VALUES (27, 'hostConnectType', 'STRING', '[{\"name\": \"color\", \"type\": \"COLOR\"}]', '主机连接类型', '2023-12-26 23:23:08', '2024-04-24 16:37:48', '1', '1', 0);
|
||||
@@ -88,7 +87,7 @@ INSERT INTO `dict_value` VALUES (274, 39, 'pathBookmarkType', 'FILE', '文件',
|
||||
INSERT INTO `dict_value` VALUES (275, 39, 'pathBookmarkType', 'DIR', '文件夹', '{}', 20, '2024-04-24 13:43:39', '2024-04-24 13:43:39', '1', '1', 0);
|
||||
```
|
||||
|
||||
> sql 脚本 - 命令分组初始化
|
||||
### sql 脚本 - 命令分组初始化
|
||||
|
||||
```sql
|
||||
-- 插入命令片段分组
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## v1.0.7
|
||||
### v1.0.7
|
||||
|
||||
> sql 脚本 - DDL
|
||||
### sql 脚本 - DDL
|
||||
|
||||
```sql
|
||||
ALTER TABLE `data_permission` COMMENT = '数据权限表';
|
||||
@@ -57,7 +57,7 @@ CREATE TABLE `upload_task_file`
|
||||
ROW_FORMAT = Dynamic;
|
||||
```
|
||||
|
||||
> sql 脚本 - DML
|
||||
### sql 脚本 - DML
|
||||
|
||||
```sql
|
||||
-- 字典项
|
||||
@@ -97,7 +97,7 @@ INSERT INTO `system_menu` VALUES (176, 0, '批量执行', NULL, 1, 420, 1, 1, 1,
|
||||
INSERT INTO `system_menu` VALUES (177, 193, '任务列表', NULL, 2, 10, 1, 1, 1, 0, 'IconUnorderedList', NULL, 'execJob', '2024-04-10 16:13:27', '2024-04-28 15:36:10', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (184, 193, '任务日志', NULL, 2, 20, 1, 1, 1, 0, 'icon-history', '', 'execJobLog', '2024-04-11 13:40:47', '2024-04-28 15:34:27', '2', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (185, 193, '计划任务日志新页面', NULL, 2, 30, 0, 1, 0, 1, NULL, NULL, 'execJobLogView', '2024-04-11 13:41:47', '2024-04-28 15:33:33', '2', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (192, 0, '点个赞~', NULL, 1, 1030, 1, 1, 0, 1, 'IconThumbUp', 'https://github.com/lijiahangmax/orion-ops-pro', NULL, '2024-04-26 11:32:30', '2024-05-06 17:33:16', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (192, 0, '点个赞~', NULL, 1, 1030, 1, 1, 0, 1, 'IconThumbUp', 'https://github.com/lijiahangmax/orion-visor', NULL, '2024-04-26 11:32:30', '2024-05-06 17:33:16', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (193, 0, '计划任务', NULL, 1, 430, 1, 1, 1, 0, 'IconCalendarClock', NULL, 'jobModule', '2024-04-28 15:31:24', '2024-04-28 15:32:56', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (194, 152, '在线会话', NULL, 2, 20, 1, 1, 1, 0, 'IconUserGroup', NULL, 'connectSession', '2024-05-07 11:12:17', '2024-05-07 11:12:35', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (195, 194, '查询在线会话', 'asset:host-connect-session:management:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2024-05-07 11:13:16', '2024-05-07 11:13:16', '1', '1', 0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## v1.0.8
|
||||
### v1.0.8
|
||||
|
||||
> sql 脚本 - DDL
|
||||
### sql 脚本 - DDL
|
||||
|
||||
```sql
|
||||
-- 修改字段名称
|
||||
@@ -32,7 +32,7 @@ CREATE TABLE `system_message`
|
||||
ROW_FORMAT = Dynamic;
|
||||
```
|
||||
|
||||
> sql 脚本 - DML
|
||||
### sql 脚本 - DML
|
||||
|
||||
```sql
|
||||
-- 菜单
|
||||
|
||||
@@ -1,11 +1,135 @@
|
||||
## v2.0.0
|
||||
### v2.0.0
|
||||
|
||||
> sql 脚本 - DDL
|
||||
### ⚡ **本次升级提示 本次更新较大 请仔细查阅** ⚡
|
||||
|
||||
```sql
|
||||
* 先执行以下 **`7`** 个脚本
|
||||
* 容器下线 `docker compose down`
|
||||
* 删除原代码目录 `rm -rf orion-ops-pro`
|
||||
* 克隆改名后的项目 `git clone https://github.com/lijiahangmax/orion-visor.git` or `gitee`
|
||||
* 启动容器 `docker compose up -d`
|
||||
|
||||
```text
|
||||
sql 在 adminer/navicat 中执行, bash 脚本直接修改后粘贴执行 不要保存为文件执行否则会出错
|
||||
本次升级包含数据库重命名操作。#3 创建新数据库, #4 进行数据迁移, #5 删除旧数据库。
|
||||
[不推荐] 如果不想重命名可以修改 docker-compose.yml, 将 MYSQL_DATABASE 改为 orion-ops-pro 并且跳过步骤 #3 #4 #5
|
||||
```
|
||||
|
||||
> sql 脚本 - DML
|
||||
### 1. sql 脚本 - DDL
|
||||
|
||||
```sql
|
||||
-- 修改默认值
|
||||
ALTER TABLE `exec_job`
|
||||
MODIFY COLUMN `status` tinyint(0) NULL DEFAULT 0 COMMENT '任务状态' AFTER `parameter_schema`;
|
||||
-- 修改备注
|
||||
ALTER TABLE `host_identity`
|
||||
MODIFY COLUMN `key_id` bigint(0) NULL DEFAULT NULL COMMENT '密钥id' AFTER `password`;
|
||||
-- 修改备注
|
||||
ALTER TABLE `host_key` COMMENT = '主机密钥';
|
||||
```
|
||||
|
||||
### 2. sql 脚本 - DML
|
||||
|
||||
```sql
|
||||
-- 删除 quartz 配置
|
||||
DELETE FROM QRTZ_CRON_TRIGGERS;
|
||||
DELETE FROM QRTZ_TRIGGERS;
|
||||
DELETE FROM QRTZ_JOB_DETAILS;
|
||||
DELETE FROM QRTZ_LOCKS;
|
||||
-- 修改计划任务为停用
|
||||
UPDATE exec_job SET status = 0;
|
||||
-- 菜单
|
||||
DELETE FROM `system_menu` WHERE id IN(8, 11, 79, 80, 81, 82, 83, 84, 142, 191, 192);
|
||||
INSERT INTO `system_menu` VALUES (8, 0, '项目地址 github', NULL, 1, 1000, 1, 1, 1, 0, 'icon-github', 'https://github.com/lijiahangmax/orion-visor', '', '2023-07-28 11:04:59', '2024-05-17 12:57:19', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (11, 0, '项目地址 gitee', NULL, 1, 1010, 1, 1, 1, 0, 'icon-gitlab', 'https://gitee.com/lijiahangmax/orion-visor', '', '2023-08-02 18:08:07', '2024-05-17 12:57:26', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (79, 63, '主机密钥', NULL, 2, 50, 1, 1, 1, 0, 'IconLock', NULL, 'hostKey', '2023-09-20 11:47:18', '2024-05-17 12:49:51', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (80, 79, '查询主机密钥', 'asset:host-key:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2024-05-17 12:49:54', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (81, 79, '创建主机密钥', 'asset:host-key:create', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2024-05-17 12:49:56', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (82, 79, '修改主机密钥', 'asset:host-key:update', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2024-05-17 12:49:59', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (83, 79, '删除主机密钥', 'asset:host-key:delete', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2024-05-17 12:50:01', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (84, 79, '查询主机密钥详情', 'asset:host-key:query-detail', 3, 50, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2024-05-17 12:50:05', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (142, 144, '主机密钥授权', 'asset:host-key:grant', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-30 21:06:13', '2024-05-17 12:50:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (191, 0, '提交bug', NULL, 1, 1020, 1, 1, 0, 1, 'IconBug', 'https://github.com/lijiahangmax/orion-visor/issues', NULL, '2024-04-26 11:30:18', '2024-05-17 12:57:29', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (192, 0, '点个赞~', NULL, 1, 1030, 1, 1, 0, 1, 'IconThumbUp', 'https://github.com/lijiahangmax/orion-visor', NULL, '2024-04-26 11:32:30', '2024-05-17 12:57:32', '1', '1', 0);
|
||||
-- 字典值
|
||||
DELETE FROM `dict_value` WHERE id IN(23, 62, 93, 94, 95, 122, 131, 132, 135, 137, 139, 140, 174, 271);
|
||||
INSERT INTO `dict_value` VALUES (23, 11, 'hostSshAuthType', 'KEY', '密钥验证', '{}', 20, '2023-10-27 14:29:35', '2024-05-17 12:48:53', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (62, 1, 'operatorLogModule', 'asset:host-key', '主机密钥', '{}', 2020, '2023-10-31 10:48:17', '2024-05-17 12:48:58', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (93, 2, 'operatorLogType', 'host-key:create', '创建主机密钥', '{}', 10, '2023-10-31 10:55:43', '2024-05-17 12:49:00', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (94, 2, 'operatorLogType', 'host-key:update', '修改主机密钥', '{}', 20, '2023-10-31 10:55:43', '2024-05-17 12:49:03', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (95, 2, 'operatorLogType', 'host-key:delete', '删除主机密钥', '{}', 30, '2023-10-31 10:55:43', '2024-05-17 12:49:06', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (122, 2, 'operatorLogType', 'host-key:grant', '主机密钥授权', '{}', 40, '2023-11-30 21:03:55', '2024-05-17 12:49:10', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (131, 21, 'terminalFontFamily', 'Fira Code', 'Fira Code', '{}', 60, '2023-12-11 16:47:04', '2024-05-15 15:27:12', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (132, 21, 'terminalFontFamily', 'JetBrains Mono', 'JetBrains Mono', '{}', 70, '2023-12-11 16:47:09', '2024-05-15 15:27:16', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (135, 21, 'terminalFontFamily', 'Consolas', 'Consolas', '{}', 50, '2023-12-11 16:47:28', '2024-05-15 15:26:51', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (137, 21, 'terminalFontFamily', 'Source Code Pro', 'Source Code Pro', '{}', 80, '2023-12-11 16:47:43', '2024-05-15 15:27:21', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (139, 21, 'terminalFontFamily', 'Lucida Console', 'Lucida Console', '{}', 30, '2023-12-11 16:47:58', '2024-05-15 15:26:28', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (140, 21, 'terminalFontFamily', 'Courier', 'Courier', '{}', 40, '2023-12-11 16:48:03', '2024-05-15 15:26:42', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (174, 26, 'hostExtraSshAuthType', 'CUSTOM_KEY', '自定义', '{}', 20, '2023-12-25 15:48:42', '2024-05-17 12:49:13', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (271, 37, 'hostIdentityType', 'KEY', '密钥', '{\"color\": \"arcoblue\"}', 20, '2024-04-16 17:18:12', '2024-05-17 12:49:16', '2', '2', 0);
|
||||
```
|
||||
|
||||
### 3. sql 脚本 - 创建数据库 orion_visor
|
||||
|
||||
```sql
|
||||
-- 创建数据库
|
||||
CREATE DATABASE IF NOT EXISTS `orion_visor` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
||||
```
|
||||
|
||||
### 4. bash 脚本 - 数据迁移
|
||||
|
||||
```bash
|
||||
# 可以使用 navicat 的数据迁移功能, 下面描述的是 bash 中执行, 注意下面的变量替换
|
||||
mysql_container_id=ea98e84527f6
|
||||
# 进入容器
|
||||
docker exec -it $mysql_container_id /bin/sh
|
||||
mysql_username=root
|
||||
mysql_password=Data@123456
|
||||
# 导出数据
|
||||
mysqldump -u $mysql_username -p$mysql_password orion-ops-pro > /tmp/orion-ops-pro_dump.sql
|
||||
mysql -u $mysql_username -p$mysql_password orion_visor < /tmp/orion-ops-pro_dump.sql
|
||||
# 等待数据导入完毕 建议在 5min 以上
|
||||
sleep 300
|
||||
# 删除 dump 文件
|
||||
rm -f /tmp/orion-ops-pro_dump.sql
|
||||
# 退出
|
||||
exit
|
||||
```
|
||||
|
||||
### 5. sql 脚本 - 删除数据库
|
||||
|
||||
```sql
|
||||
-- 删除数据库
|
||||
DROP DATABASE `orion-ops-pro`;
|
||||
```
|
||||
|
||||
### 6. bash 脚本 - 修改 nginx 配置
|
||||
|
||||
```bash
|
||||
pro_container_id=41dfd6aff736;
|
||||
# 进入容器
|
||||
docker exec -it $pro_container_id /bin/sh
|
||||
# 修改 nginx 配置
|
||||
sed -i 's/\/orion\//\/orion-visor\//g' /etc/nginx/conf.d/nginx.conf
|
||||
# 重新加载
|
||||
nginx -s reload
|
||||
# 退出
|
||||
exit
|
||||
```
|
||||
|
||||
### 7. bash 脚本 - 工作空间迁移
|
||||
|
||||
```bash
|
||||
# 迁移工作空间
|
||||
mv /data/orion-ops-pro-space /data/orion-visor-space
|
||||
# 迁移 volumes
|
||||
mv /data/orion-visor-space/docker-volumes/orion-ops-pro /data/orion-visor-space/docker-volumes/orion-visor-service
|
||||
mv /data/orion-visor-space/docker-volumes/mysql /data/orion-visor-space/docker-volumes/orion-visor-mysql
|
||||
# redis 的 volumes 直接删除
|
||||
rm -rf /data/orion-visor-space/docker-volumes/redis
|
||||
# 合并 service 文件夹
|
||||
mkdir -p /data/orion-visor-space/docker-volumes/orion-visor-service/root-orion/logs/orion-visor
|
||||
mv /data/orion-visor-space/docker-volumes/orion-visor-service/logs/* /data/orion-visor-space/docker-volumes/orion-visor-service/root-orion/logs/orion-visor
|
||||
rm -rf /data/orion-visor-space/docker-volumes/orion-visor-service/logs
|
||||
mv /data/orion-visor-space/docker-volumes/orion-visor-service/app /data/orion-visor-space/docker-volumes/orion-visor-service/orion-ops-pro
|
||||
mv /data/orion-visor-space/docker-volumes/orion-visor-service/orion-ops-pro /data/orion-visor-space/docker-volumes/orion-visor-service/root-orion
|
||||
```
|
||||
|
||||
11
docs/update/v2.0.x.md
Normal file
@@ -0,0 +1,11 @@
|
||||
### v2.0.x
|
||||
|
||||
### sql 脚本 - DDL
|
||||
|
||||
```sql
|
||||
```
|
||||
|
||||
### sql 脚本 - DML
|
||||
|
||||
```sql
|
||||
```
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"local": {
|
||||
"baseUrl": "http://127.0.0.1:9200/orion/api",
|
||||
"baseUrl": "http://127.0.0.1:9200/orion-visor/api",
|
||||
"token": "Bearer YQJ3IpwJJv5HujIWY6ZTNDgUxXRY6aDt"
|
||||
},
|
||||
"gateway": {
|
||||
"baseUrl": "http://127.0.0.1:9200/orion/api",
|
||||
"baseUrl": "http://127.0.0.1:9200/orion-visor/api",
|
||||
"token": "Bearer YQJ3IpwJJv5HujIWY6ZTNDgUxXRY6aDt"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,339 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.orion.ops</groupId>
|
||||
<artifactId>orion-ops-dependencies</artifactId>
|
||||
<version>${revision}</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>${project.artifactId}</name>
|
||||
|
||||
<description>项目所有依赖</description>
|
||||
<url>https://github.com/lijiahangmax/orion-ops-pro</url>
|
||||
|
||||
<properties>
|
||||
<revision>1.0.8</revision>
|
||||
<spring.boot.version>2.7.17</spring.boot.version>
|
||||
<spring.boot.admin.version>2.7.15</spring.boot.admin.version>
|
||||
<flatten.maven.plugin.version>1.5.0</flatten.maven.plugin.version>
|
||||
<orion.kit.revision>1.0.7</orion.kit.revision>
|
||||
<aspectj.version>1.9.7</aspectj.version>
|
||||
<lombok.version>1.18.26</lombok.version>
|
||||
<springdoc.version>1.6.15</springdoc.version>
|
||||
<knife4j.version>4.1.0</knife4j.version>
|
||||
<mapstruct.version>1.5.5.Final</mapstruct.version>
|
||||
<mybatis.plus.version>3.5.3.1</mybatis.plus.version>
|
||||
<mybatis.plus.generator.version>3.5.3.1</mybatis.plus.generator.version>
|
||||
<mybatis.plus.join.version>1.4.6</mybatis.plus.join.version>
|
||||
<velocity.version>2.3</velocity.version>
|
||||
<druid.version>1.2.16</druid.version>
|
||||
<redisson.version>3.18.0</redisson.version>
|
||||
<transmittable.thread.local.version>2.14.2</transmittable.thread.local.version>
|
||||
<mockito.inline.version>4.11.0</mockito.inline.version>
|
||||
<jedis.mock.version>1.0.7</jedis.mock.version>
|
||||
<podam.version>7.2.11.RELEASE</podam.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- orion-kit -->
|
||||
<dependency>
|
||||
<groupId>io.github.lijiahangmax</groupId>
|
||||
<artifactId>orion-all</artifactId>
|
||||
<version>${orion.kit.revision}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>orion-log</artifactId>
|
||||
<groupId>io.github.lijiahangmax</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- orion-ops-starter -->
|
||||
<dependency>
|
||||
<groupId>com.orion.ops</groupId>
|
||||
<artifactId>orion-ops-framework-common</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orion.ops</groupId>
|
||||
<artifactId>orion-ops-spring-boot-starter-banner</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orion.ops</groupId>
|
||||
<artifactId>orion-ops-spring-boot-starter-web</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orion.ops</groupId>
|
||||
<artifactId>orion-ops-spring-boot-starter-swagger</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orion.ops</groupId>
|
||||
<artifactId>orion-ops-spring-boot-starter-datasource</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orion.ops</groupId>
|
||||
<artifactId>orion-ops-spring-boot-starter-mybatis</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orion.ops</groupId>
|
||||
<artifactId>orion-ops-spring-boot-starter-job</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orion.ops</groupId>
|
||||
<artifactId>orion-ops-spring-boot-starter-websocket</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orion.ops</groupId>
|
||||
<artifactId>orion-ops-spring-boot-starter-redis</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orion.ops</groupId>
|
||||
<artifactId>orion-ops-spring-boot-starter-desensitize</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orion.ops</groupId>
|
||||
<artifactId>orion-ops-spring-boot-starter-log</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orion.ops</groupId>
|
||||
<artifactId>orion-ops-spring-boot-starter-storage</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orion.ops</groupId>
|
||||
<artifactId>orion-ops-spring-boot-starter-security</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orion.ops</groupId>
|
||||
<artifactId>orion-ops-spring-boot-starter-monitor</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orion.ops</groupId>
|
||||
<artifactId>orion-ops-spring-boot-starter-test</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orion.ops</groupId>
|
||||
<artifactId>orion-ops-spring-boot-starter-biz-operator-log</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- websocket -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-websocket</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- aspect -->
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjweaver</artifactId>
|
||||
<version>${aspectj.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- lombok -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${lombok.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- mapstruct -->
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct</artifactId>
|
||||
<version>${mapstruct.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-jdk8</artifactId>
|
||||
<version>${mapstruct.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-processor</artifactId>
|
||||
<version>${mapstruct.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- doc -->
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-ui</artifactId>
|
||||
<version>${springdoc.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- knife4j -->
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
|
||||
<version>${knife4j.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- druid -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<version>${druid.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- mybatis -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>${mybatis.plus.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-generator</artifactId>
|
||||
<version>${mybatis.plus.generator.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity-engine-core</artifactId>
|
||||
<version>${velocity.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.yulichang</groupId>
|
||||
<artifactId>mybatis-plus-join-boot-starter</artifactId>
|
||||
<version>${mybatis.plus.join.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- redis -->
|
||||
<dependency>
|
||||
<groupId>org.redisson</groupId>
|
||||
<artifactId>redisson-spring-boot-starter</artifactId>
|
||||
<version>${redisson.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- actuator -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- admin -->
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-server</artifactId>
|
||||
<version>${spring.boot.admin.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-client</artifactId>
|
||||
<version>${spring.boot.admin.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- transmittable -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>transmittable-thread-local</artifactId>
|
||||
<version>${transmittable.thread.local.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- test -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>asm</artifactId>
|
||||
<groupId>org.ow2.asm</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.vaadin.external.google</groupId>
|
||||
<artifactId>android-json</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- test mockito -->
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-inline</artifactId>
|
||||
<version>${mockito.inline.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- test redis -->
|
||||
<dependency>
|
||||
<groupId>com.github.fppt</groupId>
|
||||
<artifactId>jedis-mock</artifactId>
|
||||
<version>${jedis.mock.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- test entity 随机生成器 -->
|
||||
<dependency>
|
||||
<groupId>uk.co.jemos.podam</groupId>
|
||||
<artifactId>podam</artifactId>
|
||||
<version>${podam.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- 统一 revision 版本 -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>flatten-maven-plugin</artifactId>
|
||||
<version>${flatten.maven.plugin.version}</version>
|
||||
<configuration>
|
||||
<flattenMode>resolveCiFriendliesOnly</flattenMode>
|
||||
<updatePomFile>true</updatePomFile>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>flatten</goal>
|
||||
</goals>
|
||||
<id>flatten</id>
|
||||
<phase>process-resources</phase>
|
||||
</execution>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>clean</goal>
|
||||
</goals>
|
||||
<id>flatten.clean</id>
|
||||
<phase>clean</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -1,90 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.orion.ops</groupId>
|
||||
<artifactId>orion-ops-framework</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>orion-ops-framework-common</artifactId>
|
||||
<name>${project.artifactId}</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<description>项目公共基准包</description>
|
||||
<url>https://github.com/lijiahangmax/orion-ops-pro</url>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.github.lijiahangmax</groupId>
|
||||
<artifactId>orion-all</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- lombok -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- aspectj -->
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjweaver</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- mapstruct -->
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-jdk8</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-processor</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- transmittable -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>transmittable-thread-local</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- validation -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- configuration -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- web -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- security -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- doc -->
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-ui</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -1,65 +0,0 @@
|
||||
package com.orion.ops.framework.common.configuration;
|
||||
|
||||
import com.orion.ops.framework.common.configuration.config.AsyncExecutorConfig;
|
||||
import com.orion.ops.framework.common.constant.AutoConfigureOrderConst;
|
||||
import com.orion.ops.framework.common.thread.ThreadPoolMdcTaskExecutor;
|
||||
import com.orion.spring.SpringHolder;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.core.task.TaskExecutor;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
/**
|
||||
* 应用配置类
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/6/20 10:34
|
||||
*/
|
||||
@EnableAsync
|
||||
@AutoConfiguration
|
||||
@AutoConfigureOrder(AutoConfigureOrderConst.FRAMEWORK_COMMON)
|
||||
@EnableConfigurationProperties(AsyncExecutorConfig.class)
|
||||
public class OrionCommonAutoConfiguration {
|
||||
|
||||
/**
|
||||
* @return spring 容器工具类
|
||||
*/
|
||||
@Bean
|
||||
public SpringHolder.ApplicationContextAwareStore springHolderAware() {
|
||||
return new SpringHolder.ApplicationContextAwareStore();
|
||||
}
|
||||
|
||||
/**
|
||||
* 支持 MDC 的异步线程池
|
||||
* <p>
|
||||
* {@code @Async("asyncExecutor")}
|
||||
*
|
||||
* @return 异步线程池
|
||||
*/
|
||||
@Primary
|
||||
@Bean(name = "asyncExecutor")
|
||||
public TaskExecutor asyncExecutor(AsyncExecutorConfig config) {
|
||||
ThreadPoolMdcTaskExecutor executor = new ThreadPoolMdcTaskExecutor();
|
||||
executor.setCorePoolSize(config.getCorePoolSize());
|
||||
executor.setMaxPoolSize(config.getMaxPoolSize());
|
||||
executor.setQueueCapacity(config.getQueueCapacity());
|
||||
executor.setKeepAliveSeconds(config.getKeepAliveSeconds());
|
||||
executor.setAllowCoreThreadTimeOut(true);
|
||||
executor.setThreadNamePrefix("async-task-");
|
||||
// 设置等待所有任务执行结束再关闭线程池
|
||||
executor.setWaitForTasksToCompleteOnShutdown(true);
|
||||
// 以确保应用最后能够被关闭
|
||||
executor.setAwaitTerminationSeconds(60);
|
||||
// 调用者调用拒绝策略
|
||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
executor.initialize();
|
||||
return executor;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package com.orion.ops.framework.common.configuration.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
/**
|
||||
* 线程池配置类
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/7/10 15:49
|
||||
*/
|
||||
@Data
|
||||
@ConfigurationProperties(prefix = "orion.async.executor")
|
||||
public class AsyncExecutorConfig {
|
||||
|
||||
/**
|
||||
* 核心线程数量
|
||||
*/
|
||||
private int corePoolSize;
|
||||
|
||||
/**
|
||||
* 最大线程数量
|
||||
*/
|
||||
private int maxPoolSize;
|
||||
|
||||
/**
|
||||
* 队列容量
|
||||
*/
|
||||
private int queueCapacity;
|
||||
|
||||
/**
|
||||
* 活跃时间
|
||||
*/
|
||||
private int keepAliveSeconds;
|
||||
|
||||
public AsyncExecutorConfig() {
|
||||
this.corePoolSize = 8;
|
||||
this.maxPoolSize = 16;
|
||||
this.queueCapacity = 200;
|
||||
this.keepAliveSeconds = 300;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.orion.ops.framework.common.constant;
|
||||
|
||||
import com.orion.lang.constant.OrionConst;
|
||||
|
||||
/**
|
||||
* 项目常量
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/6/19 18:56
|
||||
*/
|
||||
public interface AppConst extends OrionConst {
|
||||
|
||||
/**
|
||||
* 同 ${orion.version} 迭代时候需要手动更改
|
||||
*/
|
||||
String VERSION = "1.0.8";
|
||||
|
||||
String ORION_OPS_PRO = "orion-ops-pro";
|
||||
|
||||
String GITHUB = "https://github.com/lijiahangmax/orion-ops-pro";
|
||||
|
||||
String GITEE = "https://gitee.com/lijiahangmax/orion-ops-pro";
|
||||
|
||||
String ISSUES = "https://github.com/lijiahangmax/orion-ops-pro/issues";
|
||||
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
package com.orion.ops.framework.common.constant;
|
||||
|
||||
/**
|
||||
* 自动装配排序常量
|
||||
* <p>
|
||||
* 实际遵循 DependsOn
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/7/11 17:55
|
||||
*/
|
||||
public interface AutoConfigureOrderConst {
|
||||
|
||||
int FRAMEWORK_COMMON = Integer.MIN_VALUE + 1000;
|
||||
|
||||
int FRAMEWORK_WEB = Integer.MIN_VALUE + 1100;
|
||||
|
||||
int FRAMEWORK_SECURITY = Integer.MIN_VALUE + 1200;
|
||||
|
||||
int FRAMEWORK_SECURITY_CRYPTO = Integer.MIN_VALUE + 1250;
|
||||
|
||||
int FRAMEWORK_WEBSOCKET = Integer.MIN_VALUE + 1300;
|
||||
|
||||
int FRAMEWORK_DESENSITIZE = Integer.MIN_VALUE + 1400;
|
||||
|
||||
int FRAMEWORK_LOG = Integer.MIN_VALUE + 1500;
|
||||
|
||||
int FRAMEWORK_SWAGGER = Integer.MIN_VALUE + 1600;
|
||||
|
||||
int FRAMEWORK_DATASOURCE = Integer.MIN_VALUE + 1700;
|
||||
|
||||
int FRAMEWORK_MYBATIS = Integer.MIN_VALUE + 1800;
|
||||
|
||||
int FRAMEWORK_REDIS = Integer.MIN_VALUE + 1900;
|
||||
|
||||
int FRAMEWORK_REDIS_CACHE = Integer.MIN_VALUE + 1950;
|
||||
|
||||
int FRAMEWORK_STORAGE = Integer.MIN_VALUE + 2000;
|
||||
|
||||
int FRAMEWORK_JOB = Integer.MIN_VALUE + 2100;
|
||||
|
||||
int FRAMEWORK_JOB_QUARTZ = Integer.MIN_VALUE + 2150;
|
||||
|
||||
int FRAMEWORK_MONITOR = Integer.MIN_VALUE + 2200;
|
||||
|
||||
int FRAMEWORK_BIZ_OPERATOR_LOG = Integer.MIN_VALUE + 3000;
|
||||
|
||||
int FRAMEWORK_BANNER = Integer.MIN_VALUE + 10000;
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.orion.ops.framework.common.constant;
|
||||
|
||||
/**
|
||||
* 常量 - 中文
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/11/30 21:00
|
||||
*/
|
||||
public interface CnConst {
|
||||
|
||||
String CN_USER = "用户";
|
||||
|
||||
String CN_ROLE = "角色";
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.orion.ops.framework.common.constant;
|
||||
|
||||
/**
|
||||
* 常量
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/6/23 18:49
|
||||
*/
|
||||
public interface Const extends com.orion.lang.constant.Const, FieldConst, CnConst {
|
||||
|
||||
Integer NOT_DELETE = 0;
|
||||
|
||||
Integer IS_DELETED = 1;
|
||||
|
||||
int BEARER_PREFIX_LEN = 7;
|
||||
|
||||
int MD5_LEN = 32;
|
||||
|
||||
String UNKNOWN = "未知";
|
||||
|
||||
String INTRANET_IP = "内网IP";
|
||||
|
||||
Long ROOT_PARENT_ID = 0L;
|
||||
|
||||
Integer DEFAULT_SORT = 10;
|
||||
|
||||
int LOGIN_HISTORY_COUNT = 30;
|
||||
|
||||
Long NONE_ID = -1L;
|
||||
|
||||
Integer DEFAULT_VERSION = 1;
|
||||
|
||||
Long SYSTEM_USER_ID = 0L;
|
||||
|
||||
String SYSTEM_USERNAME = "system";
|
||||
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
package com.orion.ops.framework.common.constant;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/7/7 18:51
|
||||
*/
|
||||
public interface ErrorMessage {
|
||||
|
||||
String MISSING = "{} 不能为空";
|
||||
|
||||
String PARAM_MISSING = "参数不能为空";
|
||||
|
||||
String PARAM_ERROR = "参数错误";
|
||||
|
||||
String ID_MISSING = "id 不能为空";
|
||||
|
||||
String INVALID_PARAM = "参数验证失败";
|
||||
|
||||
String DATA_MODIFIED = "数据发生变更, 请刷新后重试";
|
||||
|
||||
String DATA_ABSENT = "数据不存在";
|
||||
|
||||
String KEY_ABSENT = "主机秘钥不存在";
|
||||
|
||||
String IDENTITY_ABSENT = "主机身份不存在";
|
||||
|
||||
String CONFIG_ABSENT = "配置不存在";
|
||||
|
||||
String CONFIG_PRESENT = "配置已存在";
|
||||
|
||||
String DATA_PRESENT = "数据已存在";
|
||||
|
||||
String NAME_PRESENT = "名称已存在";
|
||||
|
||||
String CODE_PRESENT = "编码已存在";
|
||||
|
||||
String NICKNAME_PRESENT = "花名已存在";
|
||||
|
||||
String USERNAME_PRESENT = "用户名已存在";
|
||||
|
||||
String ROLE_ABSENT = "角色不存在";
|
||||
|
||||
String ROLE_CODE_ABSENT = "角色 [{}] 不存在";
|
||||
|
||||
String INVALID_PARENT_MENU = "所选父菜单不合法";
|
||||
|
||||
String PARENT_MENU_ABSENT = "父菜单不存在";
|
||||
|
||||
String USERNAME_PASSWORD_ERROR = "用户名或密码错误";
|
||||
|
||||
String MAX_LOGIN_FAILED = "登录失败次数已上限";
|
||||
|
||||
String HISTORY_ABSENT = "历史值不存在";
|
||||
|
||||
String USER_ABSENT = "用户不存在";
|
||||
|
||||
String HOST_ABSENT = "主机不存在";
|
||||
|
||||
String GROUP_ABSENT = "分组不存在";
|
||||
|
||||
String UNABLE_OPERATE_ADMIN_ROLE = "无法操作管理员账号";
|
||||
|
||||
String UNSUPPORTED_CHARSET = "不支持的编码 [{}]";
|
||||
|
||||
String PASSWORD_MISSING = "请输入密码";
|
||||
|
||||
String BEFORE_PASSWORD_ERROR = "原密码错误";
|
||||
|
||||
String DATA_NO_PERMISSION = "数据无权限";
|
||||
|
||||
String ANY_NO_PERMISSION = "{}无权限";
|
||||
|
||||
String SESSION_PRESENT = "会话已存在";
|
||||
|
||||
String SESSION_ABSENT = "会话不存在";
|
||||
|
||||
String PATH_NOT_NORMALIZE = "路径不合法";
|
||||
|
||||
String OPERATE_ERROR = "操作失败";
|
||||
|
||||
String UNKNOWN_TYPE = "未知类型";
|
||||
|
||||
String FILE_ABSENT = "文件不存在";
|
||||
|
||||
String LOG_ABSENT = "日志不存在";
|
||||
|
||||
String TASK_ABSENT = "任务不存在";
|
||||
|
||||
String ILLEGAL_STATUS = "当前状态不支持此操作";
|
||||
|
||||
String CHECK_AUTHORIZED_HOST = "请选择已授权的主机";
|
||||
|
||||
String FILE_READ_ERROR = "文件读取失败";
|
||||
|
||||
String PLEASE_CHECK_HOST_SSH = "请检查主机 {} 是否存在/权限/SSH配置";
|
||||
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.orion.ops.framework.common.constant;
|
||||
|
||||
/**
|
||||
* 额外字段常量
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/12/28 18:34
|
||||
*/
|
||||
public interface ExtraFieldConst extends FieldConst {
|
||||
|
||||
String USER_ID = "userId";
|
||||
|
||||
String TRACE_ID = "traceId";
|
||||
|
||||
String IDENTITY = "identity";
|
||||
|
||||
String GROUP_NAME = "groupName";
|
||||
|
||||
String ID_LIST = "idList";
|
||||
|
||||
String USERNAME = "username";
|
||||
|
||||
String STATUS_NAME = "statusName";
|
||||
|
||||
String KEY_NAME = "keyName";
|
||||
|
||||
String POSITION_NAME = "positionName";
|
||||
|
||||
String GRANT_TYPE = "grantType";
|
||||
|
||||
String GRANT_NAME = "grantName";
|
||||
|
||||
String CHANNEL_ID = "channelId";
|
||||
|
||||
String SESSION_ID = "sessionId";
|
||||
|
||||
String CONNECT_TYPE = "connectType";
|
||||
|
||||
String HOST_ID = "hostId";
|
||||
|
||||
String HOST_NAME = "hostName";
|
||||
|
||||
String LOG_ID = "logId";
|
||||
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
package com.orion.ops.framework.common.constant;
|
||||
|
||||
/**
|
||||
* 字段常量
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/10/17 12:44
|
||||
*/
|
||||
public interface FieldConst {
|
||||
|
||||
String ID = "id";
|
||||
|
||||
String KEY = "key";
|
||||
|
||||
String CODE = "code";
|
||||
|
||||
String NAME = "name";
|
||||
|
||||
String TITLE = "title";
|
||||
|
||||
String VALUE = "value";
|
||||
|
||||
String LABEL = "label";
|
||||
|
||||
String TYPE = "type";
|
||||
|
||||
String COLOR = "color";
|
||||
|
||||
String STATUS = "status";
|
||||
|
||||
String INFO = "info";
|
||||
|
||||
String REL_ID = "relId";
|
||||
|
||||
String BEFORE = "before";
|
||||
|
||||
String AFTER = "after";
|
||||
|
||||
String SOURCE = "source";
|
||||
|
||||
String TARGET = "target";
|
||||
|
||||
String CHARSET = "charset";
|
||||
|
||||
String TOKEN = "token";
|
||||
|
||||
String SEQ = "seq";
|
||||
|
||||
String PATH = "path";
|
||||
|
||||
String ADDRESS = "address";
|
||||
|
||||
String MOD = "mod";
|
||||
|
||||
String COUNT = "count";
|
||||
|
||||
String DATE = "date";
|
||||
|
||||
String TIME = "time";
|
||||
|
||||
String LOCATION = "location";
|
||||
|
||||
String USER_AGENT = "userAgent";
|
||||
|
||||
String ERROR_MESSAGE = "errorMessage";
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.orion.ops.framework.common.constant;
|
||||
|
||||
/**
|
||||
* 过滤器排序常量
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/6/16 17:04
|
||||
*/
|
||||
public interface FilterOrderConst {
|
||||
|
||||
int TRICE_ID_FILTER = Integer.MIN_VALUE + 1000;
|
||||
|
||||
int CORS_FILTER = Integer.MIN_VALUE + 2000;
|
||||
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package com.orion.ops.framework.common.constant;
|
||||
|
||||
/**
|
||||
* 拦截器排序常量
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/6/16 18:15
|
||||
*/
|
||||
public interface InterceptorOrderConst {
|
||||
|
||||
int LOG_FILTER = Integer.MIN_VALUE;
|
||||
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.orion.ops.framework.common.constant;
|
||||
|
||||
/**
|
||||
* 路径常量
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2024/4/17 10:35
|
||||
*/
|
||||
public interface PathConst {
|
||||
|
||||
String ERROR_LOG = "error.log";
|
||||
|
||||
String EXEC = "exec";
|
||||
|
||||
String SCRIPT = "script";
|
||||
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package com.orion.ops.framework.common.constant;
|
||||
|
||||
/**
|
||||
* 结果增强器 排序常量
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/6/29 16:09
|
||||
*/
|
||||
public interface ResponseAdviceOrderConst {
|
||||
|
||||
int WRAPPER = Integer.MIN_VALUE + 1000;
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.orion.ops.framework.common.constant;
|
||||
|
||||
/**
|
||||
* 验证常量
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/10/20 11:45
|
||||
*/
|
||||
public interface ValidConst {
|
||||
|
||||
String USERNAME_4_32_PATTERN = "^[a-zA-Z0-9_]{4,32}$";
|
||||
|
||||
String USERNAME_4_32_MESSAGE = "只能为 4-32 位的数字,字母或下滑线";
|
||||
|
||||
String DICT_1_32_PATTERN = "^[a-zA-Z0-9_]{1,32}$";
|
||||
|
||||
String DICT_1_32_MESSAGE = "只能为 1-32 位的数字,字母或下滑线";
|
||||
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package com.orion.ops.framework.common.crypto;
|
||||
|
||||
import com.orion.lang.utils.codec.Base62s;
|
||||
import com.orion.lang.utils.crypto.symmetric.SymmetricCrypto;
|
||||
|
||||
/**
|
||||
* 数据加密器
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/7/8 0:20
|
||||
*/
|
||||
public interface ValueCrypto extends SymmetricCrypto {
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
void init();
|
||||
|
||||
/**
|
||||
* 加密后 base62 编码
|
||||
*
|
||||
* @param plain 明文
|
||||
* @return 密文
|
||||
*/
|
||||
default String encryptBase62(String plain) {
|
||||
return new String(Base62s.encode(this.encrypt(plain)));
|
||||
}
|
||||
|
||||
/**
|
||||
* base62 解码后解密
|
||||
*
|
||||
* @param text 密文
|
||||
* @return 明文
|
||||
*/
|
||||
default String decryptBase62(String text) {
|
||||
return new String(this.decrypt(Base62s.decode(text)));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.orion.ops.framework.common.entity;
|
||||
|
||||
import com.orion.lang.define.wrapper.IPageRequest;
|
||||
import com.orion.ops.framework.common.validator.group.Page;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
/**
|
||||
* 公共页码请求
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/7/12 23:14
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "公共页码请求")
|
||||
public class PageRequest implements IPageRequest {
|
||||
|
||||
@Range(min = 1, max = 10000, groups = Page.class)
|
||||
@Schema(description = "页码")
|
||||
private int page;
|
||||
|
||||
@Range(min = 1, max = 100, groups = Page.class)
|
||||
@Schema(description = "大小")
|
||||
private int limit;
|
||||
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
package com.orion.ops.framework.common.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 请求留痕信息
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/11/2 16:23
|
||||
*/
|
||||
public interface RequestIdentity extends Serializable {
|
||||
|
||||
/**
|
||||
* 获取请求地址
|
||||
*
|
||||
* @return address
|
||||
*/
|
||||
String getAddress();
|
||||
|
||||
/**
|
||||
* 获取请求位置
|
||||
*
|
||||
* @return location
|
||||
*/
|
||||
String getLocation();
|
||||
|
||||
/**
|
||||
* 获取请求 userAgent
|
||||
*
|
||||
* @return userAgent
|
||||
*/
|
||||
String getUserAgent();
|
||||
|
||||
/**
|
||||
* 设置请求地址
|
||||
*
|
||||
* @param address address
|
||||
*/
|
||||
void setAddress(String address);
|
||||
|
||||
/**
|
||||
* 设置请求位置
|
||||
*
|
||||
* @param location location
|
||||
*/
|
||||
void setLocation(String location);
|
||||
|
||||
/**
|
||||
* 设置请求 userAgent
|
||||
*
|
||||
* @param userAgent userAgent
|
||||
*/
|
||||
void setUserAgent(String userAgent);
|
||||
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package com.orion.ops.framework.common.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 请求留痕模型
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/12/29 11:57
|
||||
*/
|
||||
@Data
|
||||
public class RequestIdentityModel implements RequestIdentity {
|
||||
|
||||
/**
|
||||
* 请求地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 请求位置
|
||||
*/
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* userAgent
|
||||
*/
|
||||
private String userAgent;
|
||||
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
package com.orion.ops.framework.common.entity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 树节点
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/11/23 16:52
|
||||
*/
|
||||
public interface TreeNode<T extends TreeNode<T>> {
|
||||
|
||||
/**
|
||||
* id
|
||||
*
|
||||
* @return id
|
||||
*/
|
||||
Long getId();
|
||||
|
||||
/**
|
||||
* parentId
|
||||
*
|
||||
* @return parentId
|
||||
*/
|
||||
Long getParentId();
|
||||
|
||||
/**
|
||||
* sort
|
||||
*
|
||||
* @return sort
|
||||
*/
|
||||
Integer getSort();
|
||||
|
||||
/**
|
||||
* children
|
||||
*
|
||||
* @return children
|
||||
*/
|
||||
List<T> getChildren();
|
||||
|
||||
/**
|
||||
* 设置 children
|
||||
*
|
||||
* @param children children
|
||||
*/
|
||||
void setChildren(List<T> children);
|
||||
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
package com.orion.ops.framework.common.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* boolean 枚举
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/9/19 10:32
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BooleanBit {
|
||||
|
||||
/**
|
||||
* 假
|
||||
*/
|
||||
FALSE(0),
|
||||
|
||||
/**
|
||||
* 真
|
||||
*/
|
||||
TRUE(1),
|
||||
|
||||
;
|
||||
|
||||
private final Integer value;
|
||||
|
||||
/**
|
||||
* 是否为布尔值
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean booleanValue() {
|
||||
return this == TRUE;
|
||||
}
|
||||
|
||||
public static BooleanBit of(boolean value) {
|
||||
return value ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
public static BooleanBit of(Integer value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
for (BooleanBit e : values()) {
|
||||
if (e.value.equals(value)) {
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转为布尔值
|
||||
*
|
||||
* @param value value
|
||||
* @return boolean
|
||||
*/
|
||||
public static boolean toBoolean(Integer value) {
|
||||
return TRUE.value.equals(value);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
package com.orion.ops.framework.common.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 启用状态
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/10/12 16:02
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum EnableStatus {
|
||||
|
||||
/**
|
||||
* 停用
|
||||
*/
|
||||
DISABLED(0),
|
||||
|
||||
/**
|
||||
* 启用
|
||||
*/
|
||||
ENABLED(1),
|
||||
|
||||
;
|
||||
|
||||
private final Integer value;
|
||||
|
||||
public static EnableStatus of(Integer value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
for (EnableStatus e : values()) {
|
||||
if (e.value.equals(value)) {
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.orion.ops.framework.common.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 移动位置
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/11/13 17:26
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum MovePosition {
|
||||
|
||||
// 拖拽到目标元素上
|
||||
TOP(-1),
|
||||
|
||||
// 拖拽到目标元素中
|
||||
IN(0),
|
||||
|
||||
// 拖拽到目标元素下
|
||||
BOTTOM(1),
|
||||
|
||||
;
|
||||
|
||||
private final Integer position;
|
||||
|
||||
public static MovePosition of(Integer position) {
|
||||
if (position == null) {
|
||||
return null;
|
||||
}
|
||||
for (MovePosition value : values()) {
|
||||
if (value.position.equals(position)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,139 +0,0 @@
|
||||
package com.orion.ops.framework.common.file;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
/**
|
||||
* 文件客户端
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/6/30 16:51
|
||||
*/
|
||||
public interface FileClient {
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
*
|
||||
* @param path 文件路径
|
||||
* @param content 文件内容
|
||||
* @return 路径
|
||||
* @throws Exception Exception
|
||||
*/
|
||||
String upload(String path, byte[] content) throws Exception;
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
*
|
||||
* @param path 文件路径
|
||||
* @param content 文件内容
|
||||
* @param overrideIfExist 文件存在是否覆盖
|
||||
* @return 路径
|
||||
* @throws Exception Exception
|
||||
*/
|
||||
String upload(String path, byte[] content, boolean overrideIfExist) throws Exception;
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
*
|
||||
* @param path 文件路径
|
||||
* @param in in
|
||||
* @return 路径
|
||||
* @throws Exception Exception
|
||||
*/
|
||||
String upload(String path, InputStream in) throws Exception;
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
*
|
||||
* @param path 文件路径
|
||||
* @param in in
|
||||
* @param autoClose autoClose
|
||||
* @return 路径
|
||||
* @throws Exception Exception
|
||||
*/
|
||||
String upload(String path, InputStream in, boolean autoClose) throws Exception;
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
*
|
||||
* @param path 文件路径
|
||||
* @param in in
|
||||
* @param autoClose autoClose
|
||||
* @param overrideIfExist 文件存在是否覆盖
|
||||
* @return 路径
|
||||
* @throws Exception Exception
|
||||
*/
|
||||
String upload(String path, InputStream in, boolean autoClose, boolean overrideIfExist) throws Exception;
|
||||
|
||||
/**
|
||||
* 检查文件是否存在
|
||||
*
|
||||
* @param path path
|
||||
* @return 是否存在
|
||||
*/
|
||||
boolean isExists(String path);
|
||||
|
||||
/**
|
||||
* 删除文件
|
||||
*
|
||||
* @param path 路径
|
||||
* @return 是否删除
|
||||
* @throws Exception Exception
|
||||
*/
|
||||
boolean delete(String path) throws Exception;
|
||||
|
||||
/**
|
||||
* 获取文件内容
|
||||
*
|
||||
* @param path path
|
||||
* @return bytes
|
||||
* @throws Exception Exception
|
||||
*/
|
||||
byte[] getContent(String path) throws Exception;
|
||||
|
||||
/**
|
||||
* 获取文件输入流
|
||||
*
|
||||
* @param path path
|
||||
* @return stream
|
||||
* @throws Exception Exception
|
||||
*/
|
||||
InputStream getContentInputStream(String path) throws Exception;
|
||||
|
||||
/**
|
||||
* 获取文件输出流
|
||||
*
|
||||
* @param path path
|
||||
* @return stream
|
||||
* @throws Exception Exception
|
||||
*/
|
||||
OutputStream getContentOutputStream(String path) throws Exception;
|
||||
|
||||
/**
|
||||
* 获取文件输出流
|
||||
*
|
||||
* @param path path
|
||||
* @param append append
|
||||
* @return stream
|
||||
* @throws Exception Exception
|
||||
*/
|
||||
OutputStream getContentOutputStream(String path, boolean append) throws Exception;
|
||||
|
||||
/**
|
||||
* 获取返回路径 用于客户端返回
|
||||
*
|
||||
* @param path path
|
||||
* @return returnPath
|
||||
*/
|
||||
String getReturnPath(String path);
|
||||
|
||||
/**
|
||||
* 获取实际存储路径 用于服务端的存储
|
||||
*
|
||||
* @param returnPath returnPath
|
||||
* @return absolutePath
|
||||
*/
|
||||
String getAbsolutePath(String returnPath);
|
||||
|
||||
}
|
||||