Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c77981e587 | ||
|
|
745ec999b4 | ||
|
|
1054da9b4e | ||
|
|
6226809e8d | ||
|
|
86f994cbe6 | ||
|
|
6ff8e49cf6 | ||
|
|
858eec188a | ||
|
|
73911f3192 | ||
|
|
8f50df5bd1 | ||
|
|
f9a2a84144 | ||
|
|
ec756261be | ||
|
|
f8e17fbcd6 | ||
|
|
255f531fb7 | ||
|
|
75405e0482 | ||
|
|
e176154f73 | ||
|
|
c893d8d051 | ||
|
|
234a403bca | ||
|
|
ac9d369235 | ||
|
|
cde04d7608 | ||
|
|
b6dc85e51e | ||
|
|
8000d6c263 | ||
|
|
8447da9d46 | ||
|
|
8def038993 | ||
|
|
271aaa1f69 | ||
|
|
3a1cac9f0e | ||
|
|
5b47a8d366 | ||
|
|
b18224c95d | ||
|
|
14623348b8 | ||
|
|
e5ca189b05 | ||
|
|
f84d4e48a8 | ||
|
|
521936fbcc | ||
|
|
1bb763df6e | ||
|
|
e8d51f0821 | ||
|
|
72d299a87a | ||
|
|
fc8d8bd9d9 | ||
|
|
764ef45098 | ||
|
|
dd9ded3ad1 | ||
|
|
32a0fc7d46 | ||
|
|
4bc25c840a | ||
|
|
cc7a42edb2 | ||
|
|
b5a4d8f084 | ||
|
|
22cad473ab | ||
|
|
8426a91eec | ||
|
|
45bed62998 | ||
|
|
e5fd1fe7a2 | ||
|
|
5820c66f8b | ||
|
|
f1250f6409 | ||
|
|
9e4427b3e8 | ||
|
|
4566d4ff4c | ||
|
|
eba31a09a2 | ||
|
|
60e4034ca8 | ||
|
|
0676d237ec | ||
|
|
f2de67e311 | ||
|
|
106d499eae | ||
|
|
16ce7958f0 | ||
|
|
f1d7c0b1b7 | ||
|
|
a2278d066c | ||
|
|
d96a2400ce | ||
|
|
39204e55c0 | ||
|
|
6a60d55180 | ||
|
|
8fb18ef6bb | ||
|
|
e389f98b46 | ||
|
|
fa9870f690 | ||
|
|
09250dfaf8 | ||
|
|
0946603828 | ||
|
|
23591dfda0 | ||
|
|
1a97be11df | ||
|
|
2454fbf1d6 | ||
|
|
f3ee5c189b | ||
|
|
2be4cfdd03 | ||
|
|
9acb7caaa1 | ||
|
|
a547fda132 | ||
|
|
821af0148e | ||
|
|
0a43eea194 | ||
|
|
e11f0235f1 | ||
|
|
904a13fd56 | ||
|
|
c4539e30bb | ||
|
|
103140f08d | ||
|
|
48e6bfd67d | ||
|
|
ec00a5fdec | ||
|
|
f57e479e54 | ||
|
|
ceb385bbc6 | ||
|
|
fb6526e0a0 | ||
|
|
6ed5e0c425 | ||
|
|
109c8ad68a | ||
|
|
6a48f1182f | ||
|
|
8b4492153c | ||
|
|
c659fa38d2 | ||
|
|
21ce1d667e | ||
|
|
136f00ab62 | ||
|
|
05940359d8 | ||
|
|
b8e0dc30ac | ||
|
|
9ddc4ea6cb | ||
|
|
e4deb815b9 | ||
|
|
3649afe328 | ||
|
|
5cdb82297a | ||
|
|
615000ee68 | ||
|
|
625b49a6b4 | ||
|
|
2fe1725288 | ||
|
|
c01c84e2e4 | ||
|
|
25bf25c459 | ||
|
|
6205a6c178 | ||
|
|
00aad81aab | ||
|
|
7ecd7e1602 | ||
|
|
9dd9a2f391 | ||
|
|
b2333b119d | ||
|
|
3074d4a16a | ||
|
|
11e1604683 | ||
|
|
a78fd76e3b | ||
|
|
22119320d1 | ||
|
|
c4142d894b | ||
|
|
12fb46302a | ||
|
|
c17ba60b56 | ||
|
|
b83e486c36 | ||
|
|
815a754485 | ||
|
|
1bbaf9b4d7 | ||
|
|
debef0a5f1 | ||
|
|
fea9a201c8 | ||
|
|
912fc763a8 | ||
|
|
ac6ef015eb | ||
|
|
69a54c9243 | ||
|
|
eea255ff95 | ||
|
|
586b4c2f5a | ||
|
|
1c565bdd61 | ||
|
|
ac25c16e74 | ||
|
|
c726cdc65b | ||
|
|
472538f649 | ||
|
|
20e5f2bcf5 | ||
|
|
67bbf47c87 | ||
|
|
050edce089 | ||
|
|
06302a33e6 | ||
|
|
432a526dc2 | ||
|
|
acaefa8dae | ||
|
|
0012615659 | ||
|
|
0114e59ed0 | ||
|
|
b6e06a39e0 | ||
|
|
b30f9d45fe | ||
|
|
123e621b05 | ||
|
|
00d992dd4d | ||
|
|
9b9b9e9267 | ||
|
|
31a072d4e2 | ||
|
|
842417b63c | ||
|
|
d8b25cd071 | ||
|
|
8a63fb0173 | ||
|
|
8d3dccbeef | ||
|
|
915807dc53 | ||
|
|
e7ea8dbf4a | ||
|
|
2cfc10c86a | ||
|
|
ba9fec53f9 | ||
|
|
e5dd8363ca | ||
|
|
860b53b06a | ||
|
|
480363ae04 | ||
|
|
7831377857 | ||
|
|
dfb1b87772 | ||
|
|
eca52ccbc9 | ||
|
|
71311cb6a8 | ||
|
|
84bb2f5ec9 | ||
|
|
dc8ec525f2 | ||
|
|
bca9f94b01 | ||
|
|
5b31d4739b | ||
|
|
2bdd14a761 | ||
|
|
b542ee6073 | ||
|
|
2717409d47 | ||
|
|
9ab3d2d53f | ||
|
|
8a4bd1216a | ||
|
|
80f3b33813 | ||
|
|
f66806e127 | ||
|
|
8c2e7957d9 | ||
|
|
5902ba2f51 | ||
|
|
5a822828e6 | ||
|
|
10752171a1 | ||
|
|
a4ff093c81 | ||
|
|
41ea7703f8 | ||
|
|
ed650b18db | ||
|
|
ca9b21ffe3 | ||
|
|
14c0ecbf8e | ||
|
|
ccd8a4fd82 | ||
|
|
52f038e4e1 | ||
|
|
761e4ed44a | ||
|
|
43d61681aa | ||
|
|
78576a2a40 | ||
|
|
2097f177e0 | ||
|
|
07868f83dc | ||
|
|
3ed69ebd5f | ||
|
|
9c95b66d2a | ||
|
|
8b4c5145e0 | ||
|
|
b5de6f7bb4 | ||
|
|
eaf514673b | ||
|
|
5488290851 | ||
|
|
0220ae6112 | ||
|
|
e6893d76f4 | ||
|
|
e53b949025 | ||
|
|
df3b722680 | ||
|
|
0a7268c568 | ||
|
|
5339846f88 | ||
|
|
6b14855085 | ||
|
|
2ae019ed88 | ||
|
|
3837d1d491 | ||
|
|
5d390fcefc | ||
|
|
d17ae34d37 | ||
|
|
272ff190c0 | ||
|
|
251f798f2e | ||
|
|
66366c39fc | ||
|
|
302011cc19 | ||
|
|
c86f8e0356 | ||
|
|
152813bbd4 | ||
|
|
d2c5db5e8e | ||
|
|
d99efba39e | ||
|
|
a7e9e6acb7 | ||
|
|
848cd8633c | ||
|
|
baae06d301 | ||
|
|
bf6a756b28 | ||
|
|
ef60460b64 | ||
|
|
912151844e | ||
|
|
690e7191bb | ||
|
|
27af9d7c37 | ||
|
|
32ae6f747d | ||
|
|
93e3e633d3 | ||
|
|
2ddfdf4334 | ||
|
|
b147b5fda1 | ||
|
|
cdc6c3c3aa | ||
|
|
d3a69d2705 | ||
|
|
0da66f0a59 | ||
|
|
ca347f27a2 | ||
|
|
aba6f10651 | ||
|
|
20ccc7a7b6 | ||
|
|
c0a5a207d6 | ||
|
|
3e5f285061 | ||
|
|
8872048642 | ||
|
|
2c7be31ca3 | ||
|
|
347614b127 | ||
|
|
ee3e8b8032 | ||
|
|
dd315bf439 | ||
|
|
f985f40eca | ||
|
|
2a2a131574 | ||
|
|
a434d276f6 | ||
|
|
439a960fd0 | ||
|
|
5a1a60c569 | ||
|
|
7cbfd4757e | ||
|
|
e603a06880 | ||
|
|
f2f08f4c00 | ||
|
|
55b3bc7152 | ||
|
|
94ce3910e0 | ||
|
|
3ae1829b2e | ||
|
|
bcd6960653 | ||
|
|
88c88d67cb | ||
|
|
e4c75b87f1 | ||
|
|
11f2165968 | ||
|
|
c132f6c554 | ||
|
|
f30d587baa | ||
|
|
70ad2bcde0 | ||
|
|
5a43c9fa0a | ||
|
|
e7ed1ee23c | ||
|
|
1a87403514 | ||
|
|
a4771e3335 | ||
|
|
85f8ceef64 | ||
|
|
decc009db0 | ||
|
|
2915caff5f | ||
|
|
1b6db2a8fc | ||
|
|
4e7bd18921 | ||
|
|
057b66f1d6 | ||
|
|
f1c9cdb20d | ||
|
|
e4eb83585e | ||
|
|
9cb3a32976 | ||
|
|
cab0925653 | ||
|
|
ca061181e6 | ||
|
|
87002d8201 | ||
|
|
433e4c6340 | ||
|
|
8406d68283 | ||
|
|
eff9f8d565 | ||
|
|
0b68a7b3da | ||
|
|
02b88827eb | ||
|
|
fa31ac4f0d | ||
|
|
6b8e8d04d7 | ||
|
|
fd4ad885c0 | ||
|
|
3b273be5d0 | ||
|
|
f058e3ee3b | ||
|
|
bd7b8293ed | ||
|
|
ed401f4f89 | ||
|
|
28a1da570b | ||
|
|
2f8a98d7cd | ||
|
|
99adcc22b7 | ||
|
|
6715efec4d | ||
|
|
b7994b0e85 | ||
|
|
edd12fb06d | ||
|
|
a9e22e1d92 | ||
|
|
7afb2bf3af | ||
|
|
7e97c56514 | ||
|
|
fc2cbd1e35 | ||
|
|
05ce228239 | ||
|
|
287c26201d | ||
|
|
8ab8944bdb | ||
|
|
f52461329d | ||
|
|
c029e32ab1 | ||
|
|
8c58dc1191 | ||
|
|
1bbdd3fab9 | ||
|
|
6c72779483 | ||
|
|
81e254ab76 | ||
|
|
53c5ef5457 | ||
|
|
3fd8d21e2c | ||
|
|
bd1bc5ef00 | ||
|
|
4ae62691b1 | ||
|
|
458de65e45 | ||
|
|
de47bac51b | ||
|
|
e20ecc11d6 | ||
|
|
b9de77d612 | ||
|
|
4e9f5125c4 | ||
|
|
7400561d23 | ||
|
|
23f0a25e0a | ||
|
|
0027e57392 | ||
|
|
66c6d7fcc9 | ||
|
|
e8a151d07d | ||
|
|
68b9f881f6 | ||
|
|
e38efdae72 | ||
|
|
d82dad8d3d | ||
|
|
db7ed45622 | ||
|
|
5c779aff60 | ||
|
|
a35dd637c5 | ||
|
|
0d321657c2 | ||
|
|
9dbdeb6f9e | ||
|
|
92a6e62f98 | ||
|
|
448aec4e86 | ||
|
|
3e38056e71 | ||
|
|
c73c74dbde | ||
|
|
e73bb75dfc | ||
|
|
ff2ace4df8 | ||
|
|
840f3a1c9b | ||
|
|
9a6b240b3e | ||
|
|
6d139b71d7 | ||
|
|
2e50b86f88 | ||
|
|
f22d43ac18 | ||
|
|
5caf675514 | ||
|
|
14b9a8c794 | ||
|
|
10c02071e3 | ||
|
|
351f96bc83 | ||
|
|
29c9fcfb6c | ||
|
|
461b26f95c | ||
|
|
c7f721c9b7 | ||
|
|
f529baa189 | ||
|
|
62b5603a61 | ||
|
|
378415ea72 | ||
|
|
00e8b54f5e | ||
|
|
603a50e038 | ||
|
|
3b9bf4af77 | ||
|
|
0e0da26da1 | ||
|
|
abbf2c436b | ||
|
|
d59e465639 | ||
|
|
f9de6819aa | ||
|
|
89fee39484 | ||
|
|
0bf15fd164 | ||
|
|
bb4b02765e | ||
|
|
ddb1761f0a | ||
|
|
94988d48a1 | ||
|
|
399b663dc6 | ||
|
|
f3d45cbc97 | ||
|
|
029c7828d2 | ||
|
|
f56e9a4e7e | ||
|
|
bda3e31733 | ||
|
|
be3c590d29 | ||
|
|
0827d8a620 | ||
|
|
8e6bd419fb | ||
|
|
723234dae5 | ||
|
|
5058bea561 | ||
|
|
6935124f29 | ||
|
|
39e31d7647 | ||
|
|
ea6e19fd97 | ||
|
|
3ea68aca59 | ||
|
|
1ae81d7b59 | ||
|
|
2ee5ff81fa | ||
|
|
6f23043b59 | ||
|
|
7bc5b4d5e6 | ||
|
|
353009689b | ||
|
|
dafce8bf02 | ||
|
|
893fa92af4 | ||
|
|
169d0be5ee | ||
|
|
d72c3a64fd | ||
|
|
b071ba58c2 | ||
|
|
dfe97e562d | ||
|
|
7f656ecaec | ||
|
|
b5ffec54a7 | ||
|
|
37d67c032a | ||
|
|
26b4f46f6a | ||
|
|
11609ee194 | ||
|
|
f89bf7754b | ||
|
|
b2a53db4be | ||
|
|
36e5d27b01 | ||
|
|
53720f6d4f | ||
|
|
c476456d11 | ||
|
|
3405ba34ba | ||
|
|
d865ae645c | ||
|
|
ed90a56e0f | ||
|
|
2d5c883a97 | ||
|
|
01b2098165 | ||
|
|
03eadbbf6d | ||
|
|
6a11a6427a | ||
|
|
351087749a | ||
|
|
871552e430 | ||
|
|
e24e5e3e6a | ||
|
|
5fbbaaafe6 | ||
|
|
40b78b7a57 | ||
|
|
6cc8fd4daf | ||
|
|
2257b8ad00 | ||
|
|
af0fa2c884 | ||
|
|
3615eea94d | ||
|
|
1784c2f655 | ||
|
|
bb211c9c76 | ||
|
|
c47ef897cd | ||
|
|
714448c94d | ||
|
|
128cae73e9 | ||
|
|
e4b2be84e0 | ||
|
|
8f1354796c | ||
|
|
ea6dbec9e2 | ||
|
|
5a70cabc56 | ||
|
|
94dbaf8c3c | ||
|
|
e9a230d5f1 | ||
|
|
44beff079d | ||
|
|
2cee0bb943 | ||
|
|
a00649aec4 | ||
|
|
8809b92498 | ||
|
|
b7962ce50b | ||
|
|
efed954a78 | ||
|
|
4cbdd415b5 | ||
|
|
9a45f54cf9 | ||
|
|
667fd6f890 | ||
|
|
9de4eda0c2 | ||
|
|
5a1d37060e | ||
|
|
19d31722b7 | ||
|
|
901d95643e | ||
|
|
77f7782636 | ||
|
|
f872401ab0 | ||
|
|
cd3ebcbbd0 | ||
|
|
88625d3bb7 | ||
|
|
5ebc241133 | ||
|
|
42675dbb3a | ||
|
|
f8c5821089 | ||
|
|
f3c1452c83 | ||
|
|
8350eef747 | ||
|
|
e576d5a8ee | ||
|
|
4bec4fdec5 | ||
|
|
20e085a94e | ||
|
|
eb7f33c477 | ||
|
|
58e3d5124c | ||
|
|
fe64ce505a | ||
|
|
f914b2f81c | ||
|
|
83baadade5 | ||
|
|
1cfef0f9b4 | ||
|
|
886647f9c2 | ||
|
|
f2b2493ddc | ||
|
|
11ba58e2a1 | ||
|
|
1192735cca | ||
|
|
3a64cf67de | ||
|
|
88a3c8e735 | ||
|
|
36eac6b912 | ||
|
|
7f8108ae77 | ||
|
|
f8d1c8751f | ||
|
|
6a5dcbf81f | ||
|
|
333579a5de | ||
|
|
c2aadc123b | ||
|
|
51a9c29a6f | ||
|
|
74ee7e3f02 | ||
|
|
4180c96eb0 | ||
|
|
8a1b9c8705 | ||
|
|
3427f7750d | ||
|
|
72252c476d | ||
|
|
9b65e2f563 | ||
|
|
be96cb810c | ||
|
|
461fa651e8 | ||
|
|
085b1d38ef | ||
|
|
9a5c0a696b | ||
|
|
29ae8bad8c | ||
|
|
edcafc3688 | ||
|
|
d598077a2e | ||
|
|
de7e68515c | ||
|
|
2920fff789 | ||
|
|
bda1549092 | ||
|
|
96507297d3 | ||
|
|
8f326ab80d | ||
|
|
f3586f1ebe | ||
|
|
9545d76071 | ||
|
|
e9805e98e4 | ||
|
|
b4c1e2fc75 | ||
|
|
059cd4a212 |
No files matched your search
@@ -0,0 +1,32 @@
|
||||
# ---> VisualStudioCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
!.vscode/*.code-snippets
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
|
||||
# Run temp file and dir
|
||||
docs/temp/
|
||||
|
||||
# Built Visual Studio Code Extensions
|
||||
*.vsix
|
||||
*.bak
|
||||
|
||||
# build and release package
|
||||
build/
|
||||
debbuild/etc
|
||||
debbuild/usr
|
||||
debbuild/lib
|
||||
debbuild/22.04/etc
|
||||
debbuild/22.04/usr
|
||||
debbuild/22.04/lib
|
||||
# !debbuild/DEBIAN
|
||||
# !debbuild/22.04/DEBIAN
|
||||
|
||||
# --> release
|
||||
release/*
|
||||
# --> debbuild
|
||||
@@ -1,3 +1,36 @@
|
||||
# build.ems
|
||||
# Quickstart Of Build
|
||||
|
||||
OMC 打包脚本
|
||||
## Platform
|
||||
|
||||
OS: Ubuntu 18.04 / 22.04 (Recommendation)
|
||||
|
||||
Arch: amd64
|
||||
|
||||
Database: 10.6.16-MariaDB, Redis server v=5.0.5 (or above)
|
||||
|
||||
- Golang: go1.24.2 linux/amd64
|
||||
- node.js: v20.18.0 (or above)
|
||||
|
||||
## Build Guide
|
||||
|
||||
```bash
|
||||
# pwd
|
||||
cd /root/omc.git
|
||||
# ls
|
||||
# be.ems build.ems fe.ems.vue3
|
||||
cp build.ems/pkg.sh .
|
||||
bash pkg.sh --web --api -v 2.2508.1
|
||||
```
|
||||
|
||||
Encountered character error
|
||||
|
||||
error: `sed: -e expression #1, char 46: Invalid collation character`
|
||||
|
||||
```bash
|
||||
sudo apt-get update
|
||||
sudo apt-get install locales
|
||||
sudo locale-gen en_US.UTF-8
|
||||
sudo update-locale LANG=en_US.UTF-8
|
||||
source /etc/default/locale
|
||||
locale
|
||||
```
|
||||
@@ -0,0 +1,308 @@
|
||||
#!/bin/bash
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 [OPTION] deb|badeb|rpm"
|
||||
echo
|
||||
echo "Build omc package, option as follow:"
|
||||
echo " deb|badeb|rpm, deb: ubuntu|debian package build by dpkg"
|
||||
echo " badeb: ubuntu|debian package build by dpkg"
|
||||
echo " rpm: centos/redhat package, build by rpmbuild"
|
||||
echo " -r, =build root directory build root directory, default directory is $HOME/omc.git"
|
||||
echo " -d dump SQL from database"
|
||||
echo
|
||||
}
|
||||
|
||||
pkgtype=""
|
||||
new_args=()
|
||||
# Traverse all parameters
|
||||
for arg in "$@"; do
|
||||
if [[ "$arg" == "deb" || "$arg" == "badeb" || "$arg" == "rpm" ]]; then
|
||||
pkgtype=$arg
|
||||
else
|
||||
new_args+=("$arg") # Add non pkgtype parameters to a new parameter list
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$pkgtype" ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Use a new parameter list
|
||||
set -- "${new_args[@]}"
|
||||
|
||||
RootDir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
GitLocalRoot=$(dirname $(dirname "$RootDir"))
|
||||
while getopts "r:d" option; do
|
||||
case $option in
|
||||
r)
|
||||
GitLocalRoot=$OPTARG
|
||||
;;
|
||||
d)
|
||||
dumpdb="yes"
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
usage
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ ! -d ${GitLocalRoot} ]; then
|
||||
echo "Not exist directory: ${GitLocalRoot}"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
ProjectL=omc
|
||||
ProjectU=OMC
|
||||
PROJECT=${ProjectL}
|
||||
VERSION=2.2508.1
|
||||
RelDate=`date +%Y%m%d`
|
||||
RelVer=${VERSION}-${RelDate}-mt
|
||||
Ky10Arch=ky10.aarch64
|
||||
RpmPkgName=${ProjectL}-${RelVer}.ky10.aarch64.rpm
|
||||
RpmPkgRename=${ProjectL}-r${RelVer}-ky10.rpm
|
||||
DebPkgName=${ProjectL}-r${RelVer}-ub*.deb
|
||||
EmsBEDir=${GitLocalRoot}/be.ems
|
||||
EmsBuildRoot=${GitLocalRoot}/build.ems
|
||||
RpmArch=`arch`
|
||||
RpmsDir=${EmsBuildRoot}/rpmbuild/RPMS/
|
||||
ReleaseDir=${EmsBuildRoot}/release
|
||||
DumpToolDir=${EmsBEDir}/tools/misc
|
||||
ProjectTag=""
|
||||
|
||||
BuildDir=${EmsBuildRoot}/build
|
||||
CustomizedDir=${EmsBuildRoot}/customized
|
||||
BuildOMCDir=${BuildDir}/usr/local/omc
|
||||
BuildOMCBinDir=${BuildOMCDir}/bin
|
||||
BuildOMCEtcDir=${BuildOMCDir}/etc
|
||||
BuildLibDir=${BuildDir}/lib
|
||||
BuildLibSystemDir=${BuildLibDir}/systemd/system
|
||||
DebBuildDir=${EmsBuildRoot}/debbuild
|
||||
DebBuildOMCDir=${EmsBuildRoot}/debbuild/usr/local/omc
|
||||
DebFEBuildDir=${EmsBuildRoot}/debbuild/usr/local/omc/htdocs
|
||||
DebBuild2204Dir=${EmsBuildRoot}/debbuild/22.04
|
||||
DebBuild2204OMCDir=${EmsBuildRoot}/debbuild/22.04/usr/local/omc
|
||||
DebFEBuild2204Dir=${EmsBuildRoot}/debbuild/22.04/usr/local/omc/htdocs
|
||||
RpmBuildDir=${EmsBuildRoot}/rpmbuild
|
||||
RpmFEBuildDir=${RpmBuildDir}/BUILD/usr/local/omc/htdocs
|
||||
OmcInstallDir=/usr/local/omc
|
||||
ConfigEtcDir=${EmsBEDir}/config/etc
|
||||
ConfigSystemdDir=${EmsBEDir}/config/systemd
|
||||
EmsFEDir=${GitLocalRoot}/fe.ems
|
||||
EmsFEVue3Dir=${GitLocalRoot}/fe.ems.vue3/dist
|
||||
LibDir=${EmsBEDir}/lib
|
||||
RESTAGENT=restagent
|
||||
SshSvcBin=sshsvc
|
||||
RestagentDir=${EmsBEDir}/${RESTAGENT}
|
||||
SshSvcDir=${EmsBEDir}/${SshSvcBin}
|
||||
DBSQLSrcDir=${EmsBEDir}/database
|
||||
MiscDir=${EmsBEDir}/misc
|
||||
FrontBuildDir=${BuildOMCDir}/htdocs
|
||||
FrontSrcDir=${EmsBEDir}/front
|
||||
BinWriterDir=${HOME}/bin
|
||||
|
||||
if [[ ${RpmArch} =~ "x86_64" ]];then
|
||||
RelArch=amd64
|
||||
elif [[ ${RpmArch} =~ "aarch64" ]];then
|
||||
RelArch=arm64
|
||||
fi
|
||||
|
||||
case "${pkgtype}" in
|
||||
rpm)
|
||||
echo "Begin to make ${pkgtype} package ======>"
|
||||
|
||||
cd $EmsBEDir
|
||||
# make rpm
|
||||
# clear build cache
|
||||
rm -rf ${FrontBuildDir}/front/*
|
||||
rm -rf ${RpmFEBuildDir}/front/*
|
||||
rm -rf ${RpmBuildDir}/BUILD/usr/local/omc/etc/db/*
|
||||
|
||||
cp -rf ${RestagentDir}/${RESTAGENT} ${BuildOMCBinDir}
|
||||
cp -rf ${SshSvcDir}/${SshSvcBin} ${BuildOMCBinDir}
|
||||
cp -rf ${MiscDir}/* ${BuildOMCBinDir}
|
||||
# rm -rf ${BinDir2}/ne-hosts
|
||||
cp -rf ${ConfigEtcDir}/* ${BuildOMCEtcDir}
|
||||
rm -rf ${BuildOMCEtcDir}/db && mkdir -p ${BuildOMCEtcDir}/db
|
||||
cp -rf ${DBSQLSrcDir}/* ${BuildOMCEtcDir}/db/
|
||||
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/install
|
||||
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgrade
|
||||
#Get SQL from database, overwrite from git
|
||||
if [ "$dumpdb" = "yes" ]; then
|
||||
cd ${DumpToolDir}
|
||||
chmod +x ${DumpToolDir}/dumpsql.sh
|
||||
${DumpToolDir}/dumpsql.sh
|
||||
fi
|
||||
cp -rf ${ConfigSystemdDir}/* ${BuildLibSystemDir}
|
||||
#unzip ${FrontSrcDir}/front.zip -d ${FrontBuildDir} >/dev/null
|
||||
mkdir -p ${FrontBuildDir}/front
|
||||
cp -rf ${EmsFEVue3Dir}/* ${FrontBuildDir}/front >/dev/null
|
||||
chmod 755 ${BuildOMCBinDir}/*
|
||||
# chmod 755 ${BinDir2}/*
|
||||
cp -rf ${BuildDir}/* ${RpmBuildDir}/BUILD/
|
||||
#cp -rf ${BuildDir}/nginx ${RpmBuildDir}/BUILD/etc/
|
||||
#cp -rf ${BuildDir}/systemd ${RpmBuildDir}/BUILD/lib/
|
||||
cd ${RpmBuildDir}
|
||||
rpmbuild -bb -D "_topdir ${RpmBuildDir}" ${RpmBuildDir}/SPECS/omc.spec
|
||||
|
||||
ReleasePkgDir=${ReleaseDir}/rpms/${RelArch}
|
||||
mv -f $RpmsDir/$RpmArch/$RpmPkgName ${ReleasePkgDir}/$RpmPkgRename
|
||||
cd ${ReleasePkgDir}
|
||||
rm -f omc-md5sum.txt
|
||||
# rpm --addsign *.rpm
|
||||
md5sum $RpmPkgRename >omc-md5sum.txt
|
||||
echo "Finish to make ${pkgtype} package <======"
|
||||
;;
|
||||
deb)
|
||||
echo "Begin to make ${pkgtype} package ======>"
|
||||
|
||||
VersionID=`grep VERSION_ID /etc/os-release`
|
||||
if [[ ${VersionID} =~ 'VERSION_ID="22.04"' ]]; then
|
||||
DebBuildDir=${DebBuild2204Dir}
|
||||
DebBuildOMCDir=${DebBuild2204OMCDir}
|
||||
DebFEBuildDir=${DebFEBuild2204Dir}
|
||||
#DebPkgFile=${PROJECT}-${VERSION}-22.04-${Release).${PLATFORM).deb
|
||||
DebPkgFile=${PROJECT}-r${RelVer}-ub22.deb
|
||||
if [ ! $ProjectTag = "" ]; then
|
||||
DebPkgFile=${ProjectL}-r${RelVer}-ub22-${ProjectTag}.deb
|
||||
fi
|
||||
elif [[ ${VersionID} =~ 'VERSION_ID="24.04"' ]]; then
|
||||
DebBuildDir=${DebBuild2204Dir}
|
||||
DebBuildOMCDir=${DebBuild2204OMCDir}
|
||||
DebFEBuildDir=${DebFEBuild2204Dir}
|
||||
DebPkgFile=${PROJECT}-r${RelVer}-ub24.deb
|
||||
if [ ! $ProjectTag = "" ]; then
|
||||
DebPkgFile=${ProjectL}-r${RelVer}-ub24-${ProjectTag}.deb
|
||||
fi
|
||||
elif [[ ${VersionID} =~ 'VERSION_ID="18.04"' ]]; then
|
||||
DebPkgFile=${ProjectL}-r${RelVer}-ub18.deb
|
||||
if [ ! $ProjectTag = "" ]; then
|
||||
DebPkgFile=${ProjectL}-r${RelVer}-ub18-${ProjectTag}.deb
|
||||
fi
|
||||
else
|
||||
echo "Invalid OS release: ${VersionID}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ${EmsBEDir}
|
||||
|
||||
#make deb
|
||||
# clear build cache
|
||||
rm -rf ${FrontBuildDir}/front/*
|
||||
rm -rf ${DebFEBuildDir}/front/*
|
||||
rm -rf ${DebBuildDir}/usr/local/omc/etc/db/*
|
||||
rm -rf ${DebBuildOMCDir}/static/*
|
||||
|
||||
cp -rf ${RestagentDir}/${RESTAGENT} ${BuildOMCBinDir}
|
||||
cp -rf ${SshSvcDir}/${SshSvcBin} ${BuildOMCBinDir}
|
||||
cp -rf ${MiscDir}/* ${BuildOMCBinDir}
|
||||
cp -rf ${ConfigEtcDir}/* ${BuildOMCEtcDir}
|
||||
rm -rf ${BuildOMCEtcDir}/db && mkdir -p ${BuildOMCEtcDir}/db
|
||||
cp -rf ${DBSQLSrcDir}/* ${BuildOMCEtcDir}/db/
|
||||
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/install
|
||||
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgrade
|
||||
#Get SQL from database, overwrite from git
|
||||
if [ "${dumpdb}" = "yes" ]; then
|
||||
cd ${DumpToolDir}
|
||||
chmod +x ${DumpToolDir}/dumpsql.sh
|
||||
${DumpToolDir}/dumpsql.sh
|
||||
fi
|
||||
cp -rf ${ConfigSystemdDir}/* ${BuildLibSystemDir}
|
||||
cp -rf ${EmsFEVue3Dir}/* ${FrontBuildDir}/front >/dev/null
|
||||
chmod 755 ${BuildOMCBinDir}/*
|
||||
chmod 755 ${DebBuildDir}/DEBIAN/preinst
|
||||
chmod 755 ${DebBuildDir}/DEBIAN/postinst
|
||||
chmod 755 ${DebBuildDir}/DEBIAN/postrm
|
||||
cp -rf ${BuildDir}/* ${DebBuildDir}/
|
||||
cp -rf ${CustomizedDir}/agt.d ${DebBuildOMCDir}/static
|
||||
cp -rf ${CustomizedDir}/omc.d ${DebBuildOMCDir}/static
|
||||
cp -rf ${CustomizedDir}/ba.d ${DebBuildOMCDir}/static
|
||||
#cp -rf ${BuildDir}/nginx/* ${DebBuildDir}/etc/nginx/conf.d
|
||||
#cp -rf ${BuildDir}/systemd/*.service ${DebBuildDir}/lib/systemd/system/
|
||||
chmod +x ${DebBuildDir}/usr/local/omc/bin/*
|
||||
sed -i "s/YYYYMMDD/${RelDate}/g" ${DebBuildDir}/DEBIAN/control
|
||||
ReleasePkgDir=${ReleaseDir}/debs/${RelArch}
|
||||
dpkg -b ${DebBuildDir} ${ReleasePkgDir}/${DebPkgFile}
|
||||
|
||||
cd ${ReleasePkgDir}
|
||||
rm -f omc-md5sum.txt
|
||||
# rpm --addsign *.rpm
|
||||
md5sum ${DebPkgName} >omc-md5sum.txt
|
||||
echo "Finish to make ${pkgtype} package <======="
|
||||
;;
|
||||
badeb)
|
||||
echo "Begin to make ${pkgtype} package ======>"
|
||||
|
||||
VersionID=`grep VERSION_ID /etc/os-release`
|
||||
if [[ ${VersionID} =~ 'VERSION_ID="22.04"' ]]; then
|
||||
DebBuildDir=${DebBuild2204Dir}
|
||||
DebBuildOMCDir=${DebBuild2204OMCDir}
|
||||
DebFEBuildDir=${DebFEBuild2204Dir}
|
||||
#DebPkgFile=${PROJECT}-${VERSION}-22.04-${Release).${PLATFORM).deb
|
||||
DebPkgFile=${ProjectL}-r${RelVer}-ub22-ba.deb
|
||||
elif [[ ${VersionID} =~ 'VERSION_ID="24.04"' ]]; then
|
||||
DebBuildDir=${DebBuild2204Dir}
|
||||
DebBuildOMCDir=${DebBuild2204OMCDir}
|
||||
DebFEBuildDir=${DebFEBuild2204Dir}
|
||||
DebPkgFile=${PROJECT}-r${RelVer}-ub24.deb
|
||||
if [ ! $ProjectTag = "" ]; then
|
||||
DebPkgFile=${ProjectL}-r${RelVer}-ub24-${ProjectTag}.deb
|
||||
fi
|
||||
elif [[ ${VersionID} =~ 'VERSION_ID="18.04"' ]]; then
|
||||
DebPkgFile=${ProjectL}-r${RelVer}-ub18-ba.deb
|
||||
else
|
||||
echo "Invalid OS release: ${VersionID}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ${EmsBEDir}
|
||||
|
||||
#make deb
|
||||
# clear build cache
|
||||
rm -rf ${FrontBuildDir}/front/*
|
||||
rm -rf ${DebFEBuildDir}/front/*
|
||||
rm -rf ${DebBuildDir}/usr/local/omc/etc/db/*
|
||||
rm -rf ${DebBuildOMCDir}/static/*
|
||||
|
||||
cp -rf ${RestagentDir}/${RESTAGENT} ${BuildOMCBinDir}
|
||||
cp -rf ${SshSvcDir}/${SshSvcBin} ${BuildOMCBinDir}
|
||||
cp -rf ${MiscDir}/* ${BuildOMCBinDir}
|
||||
cp -rf ${ConfigEtcDir}/* ${BuildOMCEtcDir}
|
||||
rm -rf ${BuildOMCEtcDir}/db && mkdir -p ${BuildOMCEtcDir}/db
|
||||
cp -rf ${DBSQLSrcDir}/* ${BuildOMCEtcDir}/db/
|
||||
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/install
|
||||
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgrade
|
||||
#Get SQL from database, overwrite from git
|
||||
if [ "${dumpdb}" = "yes" ]; then
|
||||
cd ${DumpToolDir}
|
||||
chmod +x ${DumpToolDir}/dumpsql.sh
|
||||
${DumpToolDir}/dumpsql.sh
|
||||
fi
|
||||
cp -rf ${ConfigSystemdDir}/* ${BuildLibSystemDir}
|
||||
cp -rf ${EmsFEVue3Dir}/* ${FrontBuildDir}/front >/dev/null
|
||||
chmod 755 ${BuildOMCBinDir}/*
|
||||
chmod 755 ${DebBuildDir}/DEBIAN/preinst
|
||||
chmod 755 ${DebBuildDir}/DEBIAN/postinst
|
||||
chmod 755 ${DebBuildDir}/DEBIAN/postrm
|
||||
cp -rf ${BuildDir}/* ${DebBuildDir}/
|
||||
cp -rf ${CustomizedDir}/ba.d ${DebBuildOMCDir}/static
|
||||
# replace Chinese character
|
||||
find "${DebBuildOMCDir}/etc/db" -type f -name '*.sql' -exec sed -i 's/[一-龥()“”,。?!]~·]//g' {} +
|
||||
echo "Replace all chinese character."
|
||||
chmod +x ${DebBuildDir}/usr/local/omc/bin
|
||||
sed -i "s/YYYYMMDD/${RelDate}/g" ${DebBuildDir}/DEBIAN/control
|
||||
ReleasePkgDir=${ReleaseDir}/debs/${RelArch}
|
||||
dpkg -b ${DebBuildDir} ${ReleasePkgDir}/${DebPkgFile}
|
||||
|
||||
cd ${ReleasePkgDir}
|
||||
rm -f omc-md5sum.txt
|
||||
md5sum ${DebPkgName} >omc-md5sum.txt
|
||||
echo "Finish to make ${pkgtype} package <======"
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit 4
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,146 @@
|
||||
#!/bin/bash
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 deb|rpm [option]..."
|
||||
echo
|
||||
echo "Make omc package, option as follow:"
|
||||
echo " deb|rpm, deb: ubuntu|debian package build by dpkg"
|
||||
echo " rpm: centos/redhat package, build by rpmbuild"
|
||||
echo " -r, =build root directory build root directory, default directory is $HOME/omc.git"
|
||||
echo " -d dump SQL from database"
|
||||
echo " -m, =be|fe|all be: only process back-end code, default if non input"
|
||||
echo " fe: only process front-end code"
|
||||
echo " all: process all include be and fe"
|
||||
echo " -c, =ba ba: customized for BA OMC"
|
||||
}
|
||||
|
||||
pkgtype=""
|
||||
new_args=()
|
||||
be_args=()
|
||||
# Traverse all parameters
|
||||
for arg in "$@"; do
|
||||
if [[ "$arg" == "deb" || "$arg" == "rpm" ]]; then
|
||||
pkgtype=$arg
|
||||
be_args+=("$arg")
|
||||
else
|
||||
new_args+=("$arg") # Add non pkgtype parameters to a new parameter list
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$pkgtype" ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Use a new parameter list
|
||||
set -- "${new_args[@]}"
|
||||
|
||||
rootdir=${HOME}/omc.git
|
||||
m_arg="*"
|
||||
while getopts "m:r:c:d" option; do
|
||||
case $option in
|
||||
m)
|
||||
m_arg=$(echo $OPTARG | tr '[:upper:]' '[:lower:]')
|
||||
;;
|
||||
r)
|
||||
rootdir=$OPTARG
|
||||
be_args+=("-r ${rootdir}")
|
||||
;;
|
||||
d)
|
||||
be_args+=("-d")
|
||||
;;
|
||||
c)
|
||||
c_arg=$(echo $OPTARG | tr '[:upper:]' '[:lower:]')
|
||||
if [ "${c_arg}" == "ba" ]; then
|
||||
pkgtype="badeb"
|
||||
be_args+=("${pkgtype}")
|
||||
fi
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
usage
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ ! -d ${rootdir} ]; then
|
||||
echo "Not exist directory: ${rootdir}"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
bedir=${rootdir}/be.ems
|
||||
|
||||
builddir=${rootdir}/build.ems
|
||||
buildcustomized=${builddir}/customized
|
||||
customizeddir=${buildcustomized}/${c_arg}.d
|
||||
|
||||
fedir=${rootdir}/fe.ems.vue3
|
||||
feassetsdir=${fedir}/public
|
||||
felocalesdir=${fedir}/src/i18n/locales
|
||||
feconstantsdir=${fedir}/src/constants
|
||||
fehooksdir=${fedir}/src/hooks
|
||||
|
||||
makefe() {
|
||||
cd ${fedir}
|
||||
# git checkout ${feassetsdir}
|
||||
# git checkout ${felocalesdir}
|
||||
# git checkout ${feconstantsdir}
|
||||
# git checkout ${fehooksdir}
|
||||
git pull
|
||||
if [ "${pkgtype}" == "badeb" ]; then
|
||||
cp -rf ${customizeddir}/images/background_light.jpg ${feassetsdir}/background/light.jpg
|
||||
cp -rf ${customizeddir}/images/background_dark.jpg ${feassetsdir}/background/dark.jpg
|
||||
cp -rf ${customizeddir}/locales/zh-CN.ts ${felocalesdir}/zh-CN.ts
|
||||
find "${feconstantsdir}" -type f -name '*.ts' -exec sed -i 's/[一-龥()“”,。?!]~·]//g' {} +
|
||||
find "${fehooksdir}" -type f -name '*.ts' -exec sed -i 's/[一-龥()“”,。?!]~·]//g' {} +
|
||||
fi
|
||||
# npm install --force --registry https://registry.npmmirror.com
|
||||
npm install --registry https://registry.npmmirror.com
|
||||
echo -n "Building front-end vue ... "
|
||||
npm run build 1>/dev/null
|
||||
if [ $? = 0 ]; then
|
||||
echo "done"
|
||||
fi
|
||||
git checkout ${feassetsdir}
|
||||
git checkout ${felocalesdir}
|
||||
git checkout ${feconstantsdir}
|
||||
git checkout ${fehooksdir}
|
||||
}
|
||||
|
||||
makebe() {
|
||||
cd ${builddir}/bin
|
||||
#chmod +x mkpkg.sh
|
||||
EmsBEDir=${rootdir}/be.ems
|
||||
ProcList="restagent sshsvc"
|
||||
cd $EmsBEDir
|
||||
for procName in $ProcList;do
|
||||
cd $EmsBEDir/$procName
|
||||
echo "Make $procName ..."
|
||||
make
|
||||
done
|
||||
|
||||
chmod +x build.sh
|
||||
./build.sh ${be_args[@]}
|
||||
}
|
||||
|
||||
post_makepkg() {
|
||||
cd ${builddir}
|
||||
git checkout debbuild/DEBIAN/
|
||||
git checkout debbuild/22.04/DEBIAN/
|
||||
}
|
||||
|
||||
case "${m_arg}" in
|
||||
"fe")
|
||||
makefe
|
||||
;;
|
||||
"all")
|
||||
makefe
|
||||
makebe
|
||||
post_makepkg
|
||||
;;
|
||||
"be" | "*")
|
||||
makebe
|
||||
post_makepkg
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,5 @@
|
||||
# copy to /etc/profile.d/ to set the environment variables for all users
|
||||
# cp -f nodejs.sh /etc/profile.d/99-nodejs.sh
|
||||
|
||||
export PATH=/usr/local/bin:$PATH
|
||||
export NODE_OPTIONS=--max-old-space-size=50000
|
||||
@@ -0,0 +1,71 @@
|
||||
server {
|
||||
listen 44080;
|
||||
listen 44443;
|
||||
listen [::]:44080;
|
||||
listen [::]:44443;
|
||||
server_name localhost;
|
||||
|
||||
client_max_body_size 100M;
|
||||
keepalive_timeout 180s;
|
||||
|
||||
#access_log /var/log/nginx/host.access.log main;
|
||||
|
||||
# ssl_certificate /usr/local/omc/etc/certs/omc-server.crt;
|
||||
# ssl_certificate_key /usr/local/omc/etc/certs/omc-server.key;
|
||||
# ssl_client_certificate /usr/local/omc/etc/certs/omc-ca.crt;
|
||||
# ssl_verify_client on;
|
||||
# ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
||||
# ssl_session_timeout 5m;
|
||||
# ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
|
||||
# ssl_prefer_server_ciphers on;
|
||||
|
||||
# OMC
|
||||
location / {
|
||||
root /usr/local/omc/htdocs/front;
|
||||
|
||||
try_files $uri $uri/ /index.html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
location /omc-api/ {
|
||||
proxy_pass http://127.0.0.1:33030/;
|
||||
|
||||
proxy_connect_timeout 180s;
|
||||
proxy_send_timeout 180s;
|
||||
proxy_read_timeout 180s;
|
||||
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
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;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
}
|
||||
|
||||
location /api/rest/ {
|
||||
proxy_pass http://127.0.0.1:33030/api/rest/;
|
||||
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
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;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
}
|
||||
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||
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
|
||||
-----END OPENSSH PRIVATE KEY-----
|
||||
@@ -0,0 +1 @@
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCjzE0MHy0P2sQmG1OKvArwLEzR77BwxPp+4N9NKBz8lEyNch4zoHvoLDaUJKPBMwTrScZnxhvRJNde6hz5Z0QVxZolVKV95fMfgb9YICzDfPF3Bphae5q/PBYUJNfrC9SAjQeHV4CCO6xk6LV8O/Nfw8uaXwtuN3yfpUWd5mRWKMc3GHV4vxerfKoIQZN6etLhIEYibAhCJ21P0uoWzZl7ceLmkG+6qrRSbyC0bCnrN3+wjN4bwtflrEFJk3XQGuRbVsYLzux+mMm9p22+CLPRl/FUPF3x4/wKCsqr7JDSxx80HSPhk4g/1nCTpDR9hAfF6A9ww2va/k8jMeYPBO8Owe7erLEZzvg5WQAR3Wj05eJpJD99BeC91S5KW6AFQDfDHxWWprSibd/Jj9dtct2pK2ZxW0ph9OJ49ftRhzT1iVi4UnJwnG5/qLfwl6Tnx+qnQ1If/9lY/99erCTATzFTMSImKrRz7CnuPlcw8WkzCYpWKKe0kJLkL2cRD5Qi4yk= simon@simonzhangsz
|
||||
@@ -0,0 +1,38 @@
|
||||
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||
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
|
||||
-----END OPENSSH PRIVATE KEY-----
|
||||
@@ -0,0 +1,49 @@
|
||||
ManagedElement:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
VendorName: ""
|
||||
ManagedBy: ""
|
||||
ManagementIpAddress: ""
|
||||
SwVersion: ""
|
||||
PatchInfo: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
|
||||
AmfFunction:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
VnfInstanceId: ""
|
||||
Fqdn: ""
|
||||
SbiServiceList: ""
|
||||
AmfGuamiList: ""
|
||||
SnssaiList: ""
|
||||
MaxUser: ""
|
||||
RelativeCapacity: ""
|
||||
MaxGnbNum: ""
|
||||
|
||||
EpRpDynN8Amf:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
LocIpAddrList: ""
|
||||
FarIpSubnetworkList: ""
|
||||
|
||||
EpRpDynN11Amf:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
LocIpAddrList: ""
|
||||
FarIpSubnetworkList: ""
|
||||
|
||||
EpRpDynN12Amf:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
LocIpAddrList: ""
|
||||
FarIpSubnetworkList: ""
|
||||
|
||||
IPResource:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
InterfaceType: ""
|
||||
LocIpV4AddrList: ""
|
||||
LocIpV6AddrList: ""
|
||||
@@ -0,0 +1,48 @@
|
||||
ManagedElement:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
VendorName: ""
|
||||
ManagedBy: ""
|
||||
ManagementIpAddress: ""
|
||||
SwVersion: ""
|
||||
PatchInfo: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
|
||||
SmfFunction:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
VnfInstanceId: ""
|
||||
Fqdn: ""
|
||||
SbiServiceList: ""
|
||||
MaxPduSessions: ""
|
||||
MaxQfi: ""
|
||||
UpfList: ""
|
||||
|
||||
AddrPool:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AddrType: "Static"
|
||||
IpVersion: ""
|
||||
AddrSegList: ""
|
||||
|
||||
EpRpDynN7Smf:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
LocIpAddrList: ""
|
||||
FarIpSubnetworkList: ""
|
||||
|
||||
EpRpDynN10Smf:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
LocIpAddrList: ""
|
||||
FarIpSubnetworkList: ""
|
||||
|
||||
IPResource:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
InterfaceType: ""
|
||||
LocIpV4AddrList: ""
|
||||
LocIpV6AddrList: ""
|
||||
@@ -0,0 +1,39 @@
|
||||
ManagedElement:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
VendorName: ""
|
||||
ManagedBy: ""
|
||||
ManagementIpAddress: ""
|
||||
SwVersion: ""
|
||||
PatchInfo: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
|
||||
UdmFunction:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
VnfInstanceId: ""
|
||||
Fqdn: ""
|
||||
SbiServiceList: ""
|
||||
|
||||
UdrFunction:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AddrType: "Static"
|
||||
IpVersion: ""
|
||||
AddrSegList: ""
|
||||
|
||||
AusfFunction:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
LocIpAddrList: ""
|
||||
FarIpSubnetworkList: ""
|
||||
|
||||
IPResource:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
InterfaceType: ""
|
||||
LocIpV4AddrList: ""
|
||||
LocIpV6AddrList: ""
|
||||
@@ -0,0 +1,141 @@
|
||||
ManagedElement:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
VendorName: ""
|
||||
ManagedBy: ""
|
||||
ManagementIpAddress: ""
|
||||
SwVersion: ""
|
||||
PatchInfo: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
|
||||
InventoryUnitRack:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
VnfInstanceId: ""
|
||||
Fqdn: ""
|
||||
SbiServiceList: ""
|
||||
MaxPduSessions: ""
|
||||
MaxQfi: ""
|
||||
UpfList: ""
|
||||
|
||||
InventoryUnitShelf:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
VendorUnitFamilyType: ""
|
||||
VendorUnitTypeNumber: ""
|
||||
VendorName: ""
|
||||
SerialNumber: ""
|
||||
VersionNumber: ""
|
||||
DateOfManufacture: ""
|
||||
DateOfLastService: ""
|
||||
ManufacturerData: ""
|
||||
RackPosition: ""
|
||||
|
||||
InventoryUnitPack:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
VendorUnitFamilyType: ""
|
||||
VendorUnitTypeNumber: ""
|
||||
VendorName: ""
|
||||
SerialNumber: ""
|
||||
VersionNumber: ""
|
||||
DateOfManufacture: ""
|
||||
DateOfLastService: ""
|
||||
ManufacturerData: ""
|
||||
PortsInformation: ""
|
||||
PackPosition: ""
|
||||
SlotsOccupied: ""
|
||||
|
||||
InventoryUnitHost:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
VendorUnitFamilyType: ""
|
||||
VendorUnitTypeNumber: ""
|
||||
VendorName: ""
|
||||
SerialNumber: ""
|
||||
VersionNumber: ""
|
||||
DateOfManufacture: ""
|
||||
DateOfLastService: ""
|
||||
ManufacturerData: ""
|
||||
HostPosition: ""
|
||||
NumberOfCpu: ""
|
||||
MemSize: ""
|
||||
HardDiskSize: ""
|
||||
|
||||
InventoryUnitAccessory:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
VendorUnitFamilyType: ""
|
||||
VendorUnitTypeNumber: ""
|
||||
VendorName: ""
|
||||
SerialNumber: ""
|
||||
VersionNumber: ""
|
||||
DateOfManufacture: ""
|
||||
DateOfLastService: ""
|
||||
ManufacturerData: ""
|
||||
AccessoryPosition: ""
|
||||
AccessoryType: ""
|
||||
AddtionalInformation: ""
|
||||
|
||||
UpfFunction:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
VnfInstanceId: ""
|
||||
MaxQosFlows: ""
|
||||
MaxThroughput: ""
|
||||
|
||||
EpRpDynN9Upf:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
LocIpAddrList: ""
|
||||
FarIpSubnetworkList: ""
|
||||
|
||||
EpRpDynN3Upf:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
LocIpAddrList: ""
|
||||
FarIpSubnetworkList: ""
|
||||
|
||||
AmfFunction:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
VnfInstanceId: ""
|
||||
Fqdn: ""
|
||||
|
||||
SmfFunction:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
VnfInstanceId: ""
|
||||
Fqdn: ""
|
||||
|
||||
UdrFunction:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
VnfInstanceId: ""
|
||||
Fqdn: ""
|
||||
|
||||
AusfFunction:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
VnfInstanceId: ""
|
||||
Fqdn: ""
|
||||
|
||||
IPResource:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
InterfaceType: ""
|
||||
LocIpV4AddrList: ""
|
||||
LocIpV6AddrList: ""
|
||||
@@ -0,0 +1,71 @@
|
||||
server {
|
||||
listen 44080;
|
||||
listen 44443;
|
||||
listen [::]:44080;
|
||||
listen [::]:44443;
|
||||
server_name localhost;
|
||||
|
||||
client_max_body_size 100M;
|
||||
keepalive_timeout 180s;
|
||||
|
||||
#access_log /var/log/nginx/host.access.log main;
|
||||
|
||||
# ssl_certificate /usr/local/omc/etc/certs/omc-server.crt;
|
||||
# ssl_certificate_key /usr/local/omc/etc/certs/omc-server.key;
|
||||
# ssl_client_certificate /usr/local/omc/etc/certs/omc-ca.crt;
|
||||
# ssl_verify_client on;
|
||||
# ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
||||
# ssl_session_timeout 5m;
|
||||
# ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
|
||||
# ssl_prefer_server_ciphers on;
|
||||
|
||||
# OMC
|
||||
location / {
|
||||
root /usr/local/omc/htdocs/front;
|
||||
|
||||
try_files $uri $uri/ /index.html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
location /omc-api/ {
|
||||
proxy_pass http://127.0.0.1:33030/;
|
||||
|
||||
proxy_connect_timeout 180s;
|
||||
proxy_send_timeout 180s;
|
||||
proxy_read_timeout 180s;
|
||||
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
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;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
}
|
||||
|
||||
location /api/rest/ {
|
||||
proxy_pass http://127.0.0.1:33030/api/rest/;
|
||||
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
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;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
}
|
||||
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xs:element name="DataFile">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="FileHeader">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="TimeStamp" type="xs:dateTime"/>
|
||||
<xs:element name="TimeZone" type="xs:string"/>
|
||||
<xs:element name="VendorName" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="ElementType" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="CmVersion" type="xs:string" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="Objects" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="ObjectType" type="xs:string"/>
|
||||
<!--该字段必选-->
|
||||
<xs:element name="FieldName">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="N">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="i" type="xs:integer" use="required"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="FieldValue">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="Object">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="V">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="i" type="xs:integer" use="required"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="rmUID" type="xs:string" use="required"/>
|
||||
<xs:attribute name="Dn" type="xs:string"/>
|
||||
<!-- //无线、核心网专业该字段必选,传输、IP专业、业务系统无该字段-->
|
||||
<xs:attribute name="UserLabel" type="xs:string"/>
|
||||
<!-- //无线、核心网专业该字段必选,传输、IP专业、业务系统无该字段-->
|
||||
<xs:attribute name="PVFlag" type="xs:string" use="required"/>
|
||||
<!-- //必须-->
|
||||
<xs:attribute name="VMID" type="xs:string"/>
|
||||
<!-- //VNF网络或VNF和PNF混合组网:虚拟网元必选,物理网元无该字段-->
|
||||
<xs:attribute name="VNFInstanceID" type="xs:string"/>
|
||||
<!-- //VNF网络或VNF和PNF混合组网:虚拟网元必选,物理网元无该字段-->
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<!-- This XSLT will convert a PDML file, saved by Wireshark, into
|
||||
HTML. The HTML page should look similar to Wireshark. See
|
||||
https://gitlab.com/wireshark/wireshark/-/wikis/PDML for information
|
||||
on how to generate such a HTML file from PDML.
|
||||
For questions contact Dirk Jagdmann (doj@cubic.org).
|
||||
|
||||
Version: 2010-06-09
|
||||
|
||||
Wireshark - Network traffic analyzer
|
||||
By Gerald Combs <gerald@wireshark.org>
|
||||
Copyright 1998 Gerald Combs
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
-->
|
||||
|
||||
<!-- set parameters of the HTML output -->
|
||||
<xsl:output method="html" encoding="UTF-8" omit-xml-declaration="no" standalone="yes" indent="yes"/>
|
||||
|
||||
<!-- this matches the "field" tag -->
|
||||
<xsl:template match="field">
|
||||
    <!-- indent with 3 non-breaking spaces -->
|
||||
|
||||
<!-- output either the "showname" or "show" attribute -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length(@showname)>0">
|
||||
<xsl:value-of select="@showname"/><br/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!--<xsl:value-of select="@name"/>:--> <xsl:value-of select="@show"/><br/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<xsl:apply-templates/> <!-- we expect to match "field" tags -->
|
||||
</xsl:template>
|
||||
|
||||
<!-- this matches the "packet" tag -->
|
||||
<xsl:template match="packet">
|
||||
|
||||
<!-- declare some variables for later use -->
|
||||
<xsl:variable name="frame_num" select="proto[@name='frame']/field[@name='frame.number']/@show"/>
|
||||
<xsl:variable name="frame_id" select="concat('f',$frame_num)"/>
|
||||
<xsl:variable name="frame_c" select="concat($frame_id,'c')"/>
|
||||
|
||||
<!-- the "title" bar of the frame -->
|
||||
<div width="100%" id="{$frame_id}">
|
||||
<a href="javascript:toggle_node('{$frame_c}')">⇒</a> <!-- #8658 is a "rArr" (double right arrow) character -->
|
||||
Frame <xsl:value-of select="$frame_num"/>:
|
||||
<xsl:for-each select="proto[@name!='geninfo']">
|
||||
<xsl:value-of select="@name"/>,
|
||||
</xsl:for-each>
|
||||
<small><a href="javascript:hide_node('{$frame_id}')">[X]</a></small>
|
||||
</div>
|
||||
|
||||
<!-- the frame contents are stored in a div, so we can toggle it -->
|
||||
<div width="100%" id="{$frame_c}" style="display:none">
|
||||
<!-- loop through all proto tags, but skip the "geninfo" one -->
|
||||
<xsl:for-each select="proto[@name!='geninfo']">
|
||||
|
||||
<xsl:variable name="proto" select="concat($frame_id,@name,count(preceding-sibling::proto)+1)"/>
|
||||
|
||||
<!-- the "title" bar of the proto -->
|
||||
<div width="100%" style="background-color:#e5e5e5; margin-bottom: 2px">
|
||||
 <a href="javascript:toggle_node('{$proto}')">⇒</a> <xsl:value-of select="@showname"/>
|
||||
|
||||
<!-- print "proto" details inside another div -->
|
||||
<div width="100%" id="{$proto}" style="display:none">
|
||||
<xsl:apply-templates/> <!-- we expect to match "field" tags -->
|
||||
</div>
|
||||
</div>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
|
||||
<!-- use the javascript function set_node_color() to set the color
|
||||
of the frame title bar. Defer colorization until the full page has
|
||||
been loaded. If the browser would support the XPath function
|
||||
replace() we could simply set the class attribute of the title bar div,
|
||||
but for now we're stuck with class names from Wireshark's colorfilters
|
||||
that contain spaces and we can't handle them in CSS. -->
|
||||
<script type="text/javascript">
|
||||
dojo.addOnLoad(function(){
|
||||
set_node_color(
|
||||
'<xsl:value-of select="$frame_id"/>',
|
||||
'<xsl:value-of select="proto[@name='frame']/field[@name='frame.coloring_rule.name']/@show"/>'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="pdml">
|
||||
Capture Filename: <b><xsl:value-of select="@capture_file"/></b>
|
||||
PDML created: <b><xsl:value-of select="@time"/></b>
|
||||
<tt>
|
||||
<xsl:apply-templates/> <!-- we expect to match the "packet" nodes -->
|
||||
</tt>
|
||||
</xsl:template>
|
||||
|
||||
<!-- this block matches the start of the PDML file -->
|
||||
<xsl:template match="/">
|
||||
<html>
|
||||
<head>
|
||||
<title>poor man's Wireshark</title>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
function set_node(node, str)
|
||||
{
|
||||
if(dojo.isString(node))
|
||||
node = dojo.byId(node);
|
||||
if(!node) return;
|
||||
node.style.display = str;
|
||||
}
|
||||
function toggle_node(node)
|
||||
{
|
||||
if(dojo.isString(node))
|
||||
node = dojo.byId(node);
|
||||
if(!node) return;
|
||||
set_node(node, (node.style.display != 'none') ? 'none' : 'block');
|
||||
}
|
||||
function hide_node(node)
|
||||
{
|
||||
set_node(node, 'none');
|
||||
}
|
||||
// this function was generated by colorfilters2js.pl
|
||||
function set_node_color(node,colorname)
|
||||
{
|
||||
if(dojo.isString(node))
|
||||
node = dojo.byId(node);
|
||||
if(!node) return;
|
||||
var fg;
|
||||
var bg;
|
||||
if(colorname == 'Bad TCP') {
|
||||
bg='#000000';
|
||||
fg='#ff5f5f';
|
||||
}
|
||||
if(colorname == 'HSRP State Change') {
|
||||
bg='#000000';
|
||||
fg='#fff600';
|
||||
}
|
||||
if(colorname == 'Spanning Tree Topology Change') {
|
||||
bg='#000000';
|
||||
fg='#fff600';
|
||||
}
|
||||
if(colorname == 'OSPF State Change') {
|
||||
bg='#000000';
|
||||
fg='#fff600';
|
||||
}
|
||||
if(colorname == 'ICMP errors') {
|
||||
bg='#000000';
|
||||
fg='#00ff0e';
|
||||
}
|
||||
if(colorname == 'ARP') {
|
||||
bg='#d6e8ff';
|
||||
fg='#000000';
|
||||
}
|
||||
if(colorname == 'ICMP') {
|
||||
bg='#c2c2ff';
|
||||
fg='#000000';
|
||||
}
|
||||
if(colorname == 'TCP RST') {
|
||||
bg='#900000';
|
||||
fg='#fff680';
|
||||
}
|
||||
if(colorname == 'TTL low or unexpected') {
|
||||
bg='#900000';
|
||||
fg='#ffffff';
|
||||
}
|
||||
if(colorname == 'Checksum Errors') {
|
||||
bg='#000000';
|
||||
fg='#ff5f5f';
|
||||
}
|
||||
if(colorname == 'SMB') {
|
||||
bg='#fffa99';
|
||||
fg='#000000';
|
||||
}
|
||||
if(colorname == 'HTTP') {
|
||||
bg='#8dff7f';
|
||||
fg='#000000';
|
||||
}
|
||||
if(colorname == 'IPX') {
|
||||
bg='#ffe3e5';
|
||||
fg='#000000';
|
||||
}
|
||||
if(colorname == 'DCERPC') {
|
||||
bg='#c797ff';
|
||||
fg='#000000';
|
||||
}
|
||||
if(colorname == 'Routing') {
|
||||
bg='#fff3d6';
|
||||
fg='#000000';
|
||||
}
|
||||
if(colorname == 'TCP SYN/FIN') {
|
||||
bg='#a0a0a0';
|
||||
fg='#000000';
|
||||
}
|
||||
if(colorname == 'TCP') {
|
||||
bg='#e7e6ff';
|
||||
fg='#000000';
|
||||
}
|
||||
if(colorname == 'UDP') {
|
||||
bg='#70e0ff';
|
||||
fg='#000000';
|
||||
}
|
||||
if(colorname == 'Broadcast') {
|
||||
bg='#ffffff';
|
||||
fg='#808080';
|
||||
}
|
||||
if(fg.length > 0)
|
||||
node.style.color = fg;
|
||||
if(bg.length > 0)
|
||||
node.style.background = bg;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<xsl:apply-templates/> <!-- we expect to match the "pdml" node -->
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xs:element name="PmFile">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="FileHeader">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="TimeStamp" type="xs:dateTime" />
|
||||
<xs:element name="TimeZone" type="xs:string" />
|
||||
<xs:element name="Period" type="xs:integer" />
|
||||
<xs:element name="VendorName" type="xs:string" />
|
||||
<xs:element name="ElementType" type="xs:string" />
|
||||
<xs:element name="PmVersion" type="xs:string" />
|
||||
<xs:element name="StartTime" type="xs:dateTime" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="Measurements" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="ObjectType" type="xs:string" />
|
||||
<xs:element name="PmName">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="N">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="i" type="xs:integer" use="required" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="PmData">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="Object">
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="V">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="i" type="xs:integer" use="required" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="CV">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="SN" type="xs:string" />
|
||||
<xs:element name="SV" type="xs:string" />
|
||||
</xs:sequence>
|
||||
<xs:attribute name="i" type="xs:integer"
|
||||
use="required" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
<xs:attribute name="rmUID" type="xs:string" use="required" />
|
||||
<xs:attribute name="Dn" type="xs:string" use="required" />
|
||||
<xs:attribute name="UserLabel" type="xs:string" use="required" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
@@ -0,0 +1,20 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
--
|
||||
REPLACE INTO `sys_config` VALUES (6, 'config.sys.officialUrl', 'sys.officialUrl', 'https://www.agrandtech.com', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.officialUrlRemark');
|
||||
REPLACE INTO `sys_config` VALUES (106, 'config.sys.title', 'sys.title', 'config.sys.titleValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.titleRemark');
|
||||
REPLACE INTO `sys_config` VALUES (107, 'config.sys.copyright', 'sys.copyright', 'config.sys.copyrightValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.copyrightRemark');
|
||||
REPLACE INTO `sys_config` VALUES (108, 'config.sys.i18nOpen', 'sys.i18n.open', 'true', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nOpenRemark');
|
||||
REPLACE INTO `sys_config` VALUES (109, 'config.sys.i18nDefault', 'sys.i18n.default', 'en_US', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nDefaultRemark');
|
||||
|
||||
--
|
||||
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'AGrand EMS', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2025 千通科技', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'AGrand EMS', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2025 AGrandTech', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
|
||||
-- set internationalization switching to ON
|
||||
-- REPLACE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2122);
|
||||
UPDATE `sys_menu` SET `status` = '1' WHERE `menu_id` = 2122;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 226 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 48 KiB |
@@ -0,0 +1,20 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
--
|
||||
REPLACE INTO `sys_config` VALUES (6, 'config.sys.officialUrl', 'sys.officialUrl', 'https://www.bluearcus.com', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.officialUrlRemark');
|
||||
REPLACE INTO `sys_config` VALUES (106, 'config.sys.title', 'sys.title', 'config.sys.titleValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.titleRemark');
|
||||
REPLACE INTO `sys_config` VALUES (107, 'config.sys.copyright', 'sys.copyright', 'config.sys.copyrightValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.copyrightRemark');
|
||||
REPLACE INTO `sys_config` VALUES (108, 'config.sys.i18nOpen', 'sys.i18n.open', 'false', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nOpenRemark');
|
||||
REPLACE INTO `sys_config` VALUES (109, 'config.sys.i18nDefault', 'sys.i18n.default', 'en_US', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nDefaultRemark');
|
||||
|
||||
--
|
||||
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'BlueArcus EMS', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2025 BlueArcus', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'BlueArcus EMS', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2025 BlueArcus', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
|
||||
-- set internationalization switching to ON
|
||||
-- REPLACE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2122);
|
||||
UPDATE `sys_menu` SET `status` = '0' WHERE `menu_id` = 2122;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
After Width: | Height: | Size: 217 KiB |
|
After Width: | Height: | Size: 217 KiB |
|
After Width: | Height: | Size: 217 KiB |
@@ -0,0 +1,2 @@
|
||||
export default {
|
||||
};
|
||||
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
@@ -0,0 +1,20 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
--
|
||||
REPLACE INTO `sys_config` VALUES (6, 'config.sys.officialUrl', 'sys.officialUrl', '#', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.officialUrlRemark');
|
||||
REPLACE INTO `sys_config` VALUES (106, 'config.sys.title', 'sys.title', 'config.sys.titleValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.titleRemark');
|
||||
REPLACE INTO `sys_config` VALUES (107, 'config.sys.copyright', 'sys.copyright', 'config.sys.copyrightValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.copyrightRemark');
|
||||
REPLACE INTO `sys_config` VALUES (108, 'config.sys.i18nOpen', 'sys.i18n.open', 'true', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nOpenRemark');
|
||||
REPLACE INTO `sys_config` VALUES (109, 'config.sys.i18nDefault', 'sys.i18n.default', 'en_US', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nDefaultRemark');
|
||||
|
||||
--
|
||||
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'OMC', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2025', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'OMC', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2025', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
|
||||
|
||||
-- set internationalization switching to ON
|
||||
-- REPLACE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2122);
|
||||
UPDATE `sys_menu` SET `status` = '1' WHERE `menu_id` = 2122;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 226 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
@@ -0,0 +1,8 @@
|
||||
Package: OMC
|
||||
Version: 2.2508.1-YYYYMMDD-mt
|
||||
Section: AGrandTech
|
||||
Prioritt: optional
|
||||
Architecture: amd64
|
||||
Maintainer: Simon Zhangsz
|
||||
Depends:
|
||||
Description: OMC
|
||||
@@ -0,0 +1,151 @@
|
||||
#!/bin/bash
|
||||
|
||||
OMCRootDir=/usr/local/omc
|
||||
SystemdRootDir=/lib/systemd/system
|
||||
OMCEtcDir=${OMCRootDir}/etc
|
||||
FERootDir=${OMCRootDir}/htdocs/front
|
||||
OMCBinDir=${OMCRootDir}/bin
|
||||
OMCStaticDir=${OMCRootDir}/static
|
||||
UsrLocalBinDir=/usr/local/bin
|
||||
OMCDaemon=omcd
|
||||
NginxEtcDir=/etc/nginx
|
||||
NginxConfDir=${NginxEtcDir}/conf.d
|
||||
CFileList="restconf.yaml sshsvc.yaml omc.conf"
|
||||
LogoFileList="zh_brand.png zh_icon.png en_brand.png en_icon.png"
|
||||
|
||||
echo ""
|
||||
echo "* To start/stop/restart/status omc service, please run:"
|
||||
echo " sudo systemctl start/stop/restart/status restagent.service"
|
||||
echo " sudo systemctl start/stop/restart/status sshsvc.service"
|
||||
echo " or run: "
|
||||
echo " sudo /usr/local/omc/bin/omcsvc.sh start/stop/restart/status"
|
||||
echo ""
|
||||
|
||||
cd ${UsrLocalBinDir}
|
||||
if [ ! -e ${OMCDaemon} ]; then ln -s ${OMCBinDir}/omcsvc.sh ${OMCDaemon}; fi
|
||||
|
||||
chmod +rx ${OMCRootDir}/bin/*
|
||||
chmod +rx ${OMCRootDir}/*
|
||||
chmod +rx ${UsrLocalBinDir}/*
|
||||
chmod -R 755 ${OMCRootDir}/htdocs/front
|
||||
|
||||
for CFile in ${CFileList}; do
|
||||
if [ ! -e "${OMCEtcDir}/${CFile}" ]; then
|
||||
cp -f ${OMCEtcDir}/default/${CFile} ${OMCEtcDir}
|
||||
else
|
||||
# mv -f ${OMCEtcDir}/${CFile} ${OMCEtcDir}/${CFile}.bak
|
||||
# cp -f ${OMCEtcDir}/default/${CFile} ${OMCEtcDir}
|
||||
if [ -e "${OMCBinDir}/upgconf.sh" ] && [ "${CFile}" = "restconf.yaml" ]; then
|
||||
${OMCBinDir}/upgconf.sh
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# # Install redis db if not exist /usr/local/db
|
||||
# if [ ! -e "${RedisRootDir}/bin/kvdb-server" ]; then
|
||||
# # if [ ! -e "${RedisRootDir}" ]; then
|
||||
# # mkdir -p ${RedisRootDir}
|
||||
# # fi
|
||||
# # stop old adb service
|
||||
# if [ -e "${RedisOldRootDir}/bin/redis-server" ] && [ -e "${SystemdRootDir}/adb.service" ]; then
|
||||
# systemctl stop adb.service
|
||||
# systemctl disable adb.service
|
||||
# fi
|
||||
# # stop adb service
|
||||
# if [ -e "${UsrLocalBinDir}/adb-server" ] && [ -e "${SystemdRootDir}/adb.service" ]; then
|
||||
# systemctl stop adb.service
|
||||
# systemctl disable adb.service
|
||||
# fi
|
||||
# cp -rf ${DependsRootDir}/kvdb/* /
|
||||
# chmod +rx ${RedisRootDir}/bin/kvdb*
|
||||
# if [ ! -e "${RedisConfDir}/kvdb.conf" ]; then
|
||||
# cp ${RedisConfDir}/default/kvdb.conf ${RedisConfDir}
|
||||
# fi
|
||||
# sed -i 's/replica-read-only yes/replica-read-only no/g' ${RedisConfDir}/kvdb.conf
|
||||
|
||||
# LINE="masterauth helloearth"
|
||||
# FILE="${RedisConfDir}/kvdb.conf"
|
||||
# # 检查文件中是否存在该行
|
||||
# if ! grep -qxF "$LINE" "$FILE"; then
|
||||
# # 如果不存在,将其添加到文件末尾
|
||||
# echo "$LINE" >> "$FILE"
|
||||
# fi
|
||||
|
||||
# # copy the old adb dump.rdb
|
||||
# if [ -e "${RedisOldRootDir}/bin/conf/dump.rdb" ] && [ ! -e "${RedisRootDir}/etc/kvdb/dump.rdb" ]; then
|
||||
# cp -f ${RedisOldRootDir}/bin/conf/dump.rdb ${RedisRootDir}/etc/kvdb/;
|
||||
# mv -f ${RedisRootDir}/db ${RedisRootDir}/adb.old
|
||||
# fi
|
||||
# # copy the adb dump.rdb
|
||||
# if [ -e "${RedisRootDir}/etc/adb/dump.rdb" ] && [ ! -e "${RedisRootDir}/etc/kvdb/dump.rdb" ]; then
|
||||
# cp -f ${RedisRootDir}/etc/adb/dump.rdb ${RedisRootDir}/etc/kvdb/;
|
||||
# mv -f ${RedisRootDir}/etc/adb ${RedisRootDir}/etc/adb.old
|
||||
# fi
|
||||
# # cp -f ${DependsRootDir}/systemd/kvdb.service ${SystemdRootDir}
|
||||
# else
|
||||
# if [ ! -e "${RedisConfDir}/kvdb.conf" ]; then
|
||||
# cp ${RedisConfDir}/default/kvdb.conf ${RedisConfDir}
|
||||
# fi
|
||||
# sed -i 's/replica-read-only yes/replica-read-only no/g' ${RedisConfDir}/kvdb.conf
|
||||
|
||||
# LINE="masterauth helloearth"
|
||||
# FILE="${RedisConfDir}/kvdb.conf"
|
||||
# # 检查文件中是否存在该行
|
||||
# if ! grep -qxF "$LINE" "$FILE"; then
|
||||
# # 如果不存在,将其添加到文件末尾
|
||||
# echo "$LINE" >> "$FILE"
|
||||
# fi
|
||||
# fi
|
||||
|
||||
if [ ! -e "${FERootDir}/config.js" ]; then
|
||||
cp ${FERootDir}/default/config.js ${FERootDir};
|
||||
fi
|
||||
|
||||
# for LogoFile in ${LogoFileList}; do
|
||||
# if [ ! -e "${OMCStaticDir}/logo/${LogoFile}" ]; then
|
||||
# cp ${OMCStaticDir}/omc.d/logo/${LogoFile} ${OMCStaticDir}/logo;
|
||||
# fi
|
||||
# done
|
||||
|
||||
# if ! id -u omc >/dev/null 2>&1 ; then
|
||||
# useradd -d /opt/omc -m -s /bin/bash -pomc123 omc;
|
||||
# mkdir -p /opt/omc/ftp
|
||||
# else
|
||||
# echo "user omc exist";
|
||||
# fi
|
||||
|
||||
if [ ! -e "${NginxConfDir}/omc.conf" ]; then
|
||||
mkdir -p ${NginxConfDir}
|
||||
cp -f ${OMCEtcDir}/nginx/omc.conf ${NginxConfDir};
|
||||
fi
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
# disable auto upgrade
|
||||
systemctl disable --now unattended-upgrades
|
||||
|
||||
systemctl enable restagent.service
|
||||
systemctl enable sshsvc.service
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
# read environment parameter and to do
|
||||
if [ "$M_PARAM" = "install" -o "$M_PARAM" = "upgrade" ]; then
|
||||
echo "M parameter: $M_PARAM"
|
||||
if [ -n "$C_PARAM" ]; then
|
||||
echo "C parameter: $C_PARAM"
|
||||
${OMCRootDir}/bin/setomc.sh -m $M_PARAM -c $C_PARAM
|
||||
else
|
||||
${OMCRootDir}/bin/setomc.sh -m $M_PARAM
|
||||
fi
|
||||
# exit while failed to run setomc.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "setomc.sh execution failed. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -n "Starting OMC service ... "
|
||||
systemctl start sshsvc.service
|
||||
systemctl start restagent.service
|
||||
echo "done"
|
||||
@@ -0,0 +1,19 @@
|
||||
# !/bin/bash
|
||||
|
||||
#rm -rf /usr/local/omc
|
||||
rm -rf /etc/nginx/conf.d/omc.conf
|
||||
rm -f /usr/local/bin/omcd
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
|
||||
echo -n "Stopping OMC service ... "
|
||||
systemctl stop restagent.service
|
||||
systemctl stop sshsvc.service
|
||||
echo "done"
|
||||
fi
|
||||
|
||||
systemctl disable restagent.service
|
||||
systemctl disable sshsvc.service
|
||||
|
||||
systemctl daemon-reload
|
||||
@@ -0,0 +1,17 @@
|
||||
# !/bin/bash
|
||||
|
||||
systemctl daemon-reload
|
||||
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
|
||||
echo -n "Stopping OMC service ... "
|
||||
systemctl stop restagent.service
|
||||
systemctl stop sshsvc.service
|
||||
echo "done"
|
||||
fi
|
||||
|
||||
FERootDir=/usr/local/omc/htdocs/front
|
||||
|
||||
# apt-get install zip
|
||||
# clear front-end old hash js files
|
||||
rm -rf ${FERootDir}/assets
|
||||
rm -rf ${FERootDir}/js
|
||||
rm -rf ${FERootDir}/index.*.js
|
||||
@@ -0,0 +1,71 @@
|
||||
server {
|
||||
listen 44080;
|
||||
listen 44443;
|
||||
listen [::]:44080;
|
||||
listen [::]:44443;
|
||||
server_name localhost;
|
||||
|
||||
client_max_body_size 100M;
|
||||
keepalive_timeout 180s;
|
||||
|
||||
#access_log /var/log/nginx/host.access.log main;
|
||||
|
||||
# ssl_certificate /usr/local/omc/etc/certs/omc-server.crt;
|
||||
# ssl_certificate_key /usr/local/omc/etc/certs/omc-server.key;
|
||||
# ssl_client_certificate /usr/local/omc/etc/certs/omc-ca.crt;
|
||||
# ssl_verify_client on;
|
||||
# ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
||||
# ssl_session_timeout 5m;
|
||||
# ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
|
||||
# ssl_prefer_server_ciphers on;
|
||||
|
||||
# OMC
|
||||
location / {
|
||||
root /usr/local/omc/htdocs/front;
|
||||
|
||||
try_files $uri $uri/ /index.html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
location /omc-api/ {
|
||||
proxy_pass http://127.0.0.1:33030/;
|
||||
|
||||
proxy_connect_timeout 180s;
|
||||
proxy_send_timeout 180s;
|
||||
proxy_read_timeout 180s;
|
||||
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
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;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
}
|
||||
|
||||
location /api/rest/ {
|
||||
proxy_pass http://127.0.0.1:33030/api/rest/;
|
||||
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
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;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
}
|
||||
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
ManagedElement:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
VendorName: ""
|
||||
ManagedBy: ""
|
||||
ManagementIpAddress: ""
|
||||
SwVersion: ""
|
||||
PatchInfo: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
|
||||
AmfFunction:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
VnfInstanceId: ""
|
||||
Fqdn: ""
|
||||
SbiServiceList: ""
|
||||
AmfGuamiList: ""
|
||||
SnssaiList: ""
|
||||
MaxUser: ""
|
||||
RelativeCapacity: ""
|
||||
MaxGnbNum: ""
|
||||
|
||||
EpRpDynN8Amf:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
LocIpAddrList: ""
|
||||
FarIpSubnetworkList: ""
|
||||
|
||||
EpRpDynN11Amf:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
LocIpAddrList: ""
|
||||
FarIpSubnetworkList: ""
|
||||
|
||||
EpRpDynN12Amf:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
LocIpAddrList: ""
|
||||
FarIpSubnetworkList: ""
|
||||
|
||||
IPResource:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
InterfaceType: ""
|
||||
LocIpV4AddrList: ""
|
||||
LocIpV6AddrList: ""
|
||||
@@ -0,0 +1,48 @@
|
||||
ManagedElement:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
VendorName: ""
|
||||
ManagedBy: ""
|
||||
ManagementIpAddress: ""
|
||||
SwVersion: ""
|
||||
PatchInfo: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
|
||||
SmfFunction:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
VnfInstanceId: ""
|
||||
Fqdn: ""
|
||||
SbiServiceList: ""
|
||||
MaxPduSessions: ""
|
||||
MaxQfi: ""
|
||||
UpfList: ""
|
||||
|
||||
AddrPool:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AddrType: "Static"
|
||||
IpVersion: ""
|
||||
AddrSegList: ""
|
||||
|
||||
EpRpDynN7Smf:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
LocIpAddrList: ""
|
||||
FarIpSubnetworkList: ""
|
||||
|
||||
EpRpDynN10Smf:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
LocIpAddrList: ""
|
||||
FarIpSubnetworkList: ""
|
||||
|
||||
IPResource:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
InterfaceType: ""
|
||||
LocIpV4AddrList: ""
|
||||
LocIpV6AddrList: ""
|
||||
@@ -0,0 +1,39 @@
|
||||
ManagedElement:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
VendorName: ""
|
||||
ManagedBy: ""
|
||||
ManagementIpAddress: ""
|
||||
SwVersion: ""
|
||||
PatchInfo: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
|
||||
UdmFunction:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
VnfInstanceId: ""
|
||||
Fqdn: ""
|
||||
SbiServiceList: ""
|
||||
|
||||
UdrFunction:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AddrType: "Static"
|
||||
IpVersion: ""
|
||||
AddrSegList: ""
|
||||
|
||||
AusfFunction:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
LocIpAddrList: ""
|
||||
FarIpSubnetworkList: ""
|
||||
|
||||
IPResource:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
InterfaceType: ""
|
||||
LocIpV4AddrList: ""
|
||||
LocIpV6AddrList: ""
|
||||
@@ -0,0 +1,141 @@
|
||||
ManagedElement:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
VendorName: ""
|
||||
ManagedBy: ""
|
||||
ManagementIpAddress: ""
|
||||
SwVersion: ""
|
||||
PatchInfo: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
|
||||
InventoryUnitRack:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
VnfInstanceId: ""
|
||||
Fqdn: ""
|
||||
SbiServiceList: ""
|
||||
MaxPduSessions: ""
|
||||
MaxQfi: ""
|
||||
UpfList: ""
|
||||
|
||||
InventoryUnitShelf:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
VendorUnitFamilyType: ""
|
||||
VendorUnitTypeNumber: ""
|
||||
VendorName: ""
|
||||
SerialNumber: ""
|
||||
VersionNumber: ""
|
||||
DateOfManufacture: ""
|
||||
DateOfLastService: ""
|
||||
ManufacturerData: ""
|
||||
RackPosition: ""
|
||||
|
||||
InventoryUnitPack:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
VendorUnitFamilyType: ""
|
||||
VendorUnitTypeNumber: ""
|
||||
VendorName: ""
|
||||
SerialNumber: ""
|
||||
VersionNumber: ""
|
||||
DateOfManufacture: ""
|
||||
DateOfLastService: ""
|
||||
ManufacturerData: ""
|
||||
PortsInformation: ""
|
||||
PackPosition: ""
|
||||
SlotsOccupied: ""
|
||||
|
||||
InventoryUnitHost:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
VendorUnitFamilyType: ""
|
||||
VendorUnitTypeNumber: ""
|
||||
VendorName: ""
|
||||
SerialNumber: ""
|
||||
VersionNumber: ""
|
||||
DateOfManufacture: ""
|
||||
DateOfLastService: ""
|
||||
ManufacturerData: ""
|
||||
HostPosition: ""
|
||||
NumberOfCpu: ""
|
||||
MemSize: ""
|
||||
HardDiskSize: ""
|
||||
|
||||
InventoryUnitAccessory:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
VendorUnitFamilyType: ""
|
||||
VendorUnitTypeNumber: ""
|
||||
VendorName: ""
|
||||
SerialNumber: ""
|
||||
VersionNumber: ""
|
||||
DateOfManufacture: ""
|
||||
DateOfLastService: ""
|
||||
ManufacturerData: ""
|
||||
AccessoryPosition: ""
|
||||
AccessoryType: ""
|
||||
AddtionalInformation: ""
|
||||
|
||||
UpfFunction:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
VnfInstanceId: ""
|
||||
MaxQosFlows: ""
|
||||
MaxThroughput: ""
|
||||
|
||||
EpRpDynN9Upf:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
LocIpAddrList: ""
|
||||
FarIpSubnetworkList: ""
|
||||
|
||||
EpRpDynN3Upf:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
LocIpAddrList: ""
|
||||
FarIpSubnetworkList: ""
|
||||
|
||||
AmfFunction:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
VnfInstanceId: ""
|
||||
Fqdn: ""
|
||||
|
||||
SmfFunction:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
VnfInstanceId: ""
|
||||
Fqdn: ""
|
||||
|
||||
UdrFunction:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
VnfInstanceId: ""
|
||||
Fqdn: ""
|
||||
|
||||
AusfFunction:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
AdministrativeState: ""
|
||||
OperationalState: ""
|
||||
VnfInstanceId: ""
|
||||
Fqdn: ""
|
||||
|
||||
IPResource:
|
||||
Id: ""
|
||||
UserLabel: ""
|
||||
InterfaceType: ""
|
||||
LocIpV4AddrList: ""
|
||||
LocIpV6AddrList: ""
|
||||
@@ -0,0 +1,71 @@
|
||||
server {
|
||||
listen 44080;
|
||||
listen 44443;
|
||||
listen [::]:44080;
|
||||
listen [::]:44443;
|
||||
server_name localhost;
|
||||
|
||||
client_max_body_size 100M;
|
||||
keepalive_timeout 180s;
|
||||
|
||||
#access_log /var/log/nginx/host.access.log main;
|
||||
|
||||
# ssl_certificate /usr/local/omc/etc/certs/omc-server.crt;
|
||||
# ssl_certificate_key /usr/local/omc/etc/certs/omc-server.key;
|
||||
# ssl_client_certificate /usr/local/omc/etc/certs/omc-ca.crt;
|
||||
# ssl_verify_client on;
|
||||
# ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
||||
# ssl_session_timeout 5m;
|
||||
# ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
|
||||
# ssl_prefer_server_ciphers on;
|
||||
|
||||
# OMC
|
||||
location / {
|
||||
root /usr/local/omc/htdocs/front;
|
||||
|
||||
try_files $uri $uri/ /index.html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
location /omc-api/ {
|
||||
proxy_pass http://127.0.0.1:33030/;
|
||||
|
||||
proxy_connect_timeout 180s;
|
||||
proxy_send_timeout 180s;
|
||||
proxy_read_timeout 180s;
|
||||
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
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;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
}
|
||||
|
||||
location /api/rest/ {
|
||||
proxy_pass http://127.0.0.1:33030/api/rest/;
|
||||
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
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;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
}
|
||||
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xs:element name="DataFile">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="FileHeader">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="TimeStamp" type="xs:dateTime"/>
|
||||
<xs:element name="TimeZone" type="xs:string"/>
|
||||
<xs:element name="VendorName" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="ElementType" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="CmVersion" type="xs:string" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="Objects" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="ObjectType" type="xs:string"/>
|
||||
<!--该字段必选-->
|
||||
<xs:element name="FieldName">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="N">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="i" type="xs:integer" use="required"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="FieldValue">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="Object">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="V">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="i" type="xs:integer" use="required"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="rmUID" type="xs:string" use="required"/>
|
||||
<xs:attribute name="Dn" type="xs:string"/>
|
||||
<!-- //无线、核心网专业该字段必选,传输、IP专业、业务系统无该字段-->
|
||||
<xs:attribute name="UserLabel" type="xs:string"/>
|
||||
<!-- //无线、核心网专业该字段必选,传输、IP专业、业务系统无该字段-->
|
||||
<xs:attribute name="PVFlag" type="xs:string" use="required"/>
|
||||
<!-- //必须-->
|
||||
<xs:attribute name="VMID" type="xs:string"/>
|
||||
<!-- //VNF网络或VNF和PNF混合组网:虚拟网元必选,物理网元无该字段-->
|
||||
<xs:attribute name="VNFInstanceID" type="xs:string"/>
|
||||
<!-- //VNF网络或VNF和PNF混合组网:虚拟网元必选,物理网元无该字段-->
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<!-- This XSLT will convert a PDML file, saved by Wireshark, into
|
||||
HTML. The HTML page should look similar to Wireshark. See
|
||||
https://gitlab.com/wireshark/wireshark/-/wikis/PDML for information
|
||||
on how to generate such a HTML file from PDML.
|
||||
For questions contact Dirk Jagdmann (doj@cubic.org).
|
||||
|
||||
Version: 2010-06-09
|
||||
|
||||
Wireshark - Network traffic analyzer
|
||||
By Gerald Combs <gerald@wireshark.org>
|
||||
Copyright 1998 Gerald Combs
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
-->
|
||||
|
||||
<!-- set parameters of the HTML output -->
|
||||
<xsl:output method="html" encoding="UTF-8" omit-xml-declaration="no" standalone="yes" indent="yes"/>
|
||||
|
||||
<!-- this matches the "field" tag -->
|
||||
<xsl:template match="field">
|
||||
    <!-- indent with 3 non-breaking spaces -->
|
||||
|
||||
<!-- output either the "showname" or "show" attribute -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length(@showname)>0">
|
||||
<xsl:value-of select="@showname"/><br/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!--<xsl:value-of select="@name"/>:--> <xsl:value-of select="@show"/><br/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<xsl:apply-templates/> <!-- we expect to match "field" tags -->
|
||||
</xsl:template>
|
||||
|
||||
<!-- this matches the "packet" tag -->
|
||||
<xsl:template match="packet">
|
||||
|
||||
<!-- declare some variables for later use -->
|
||||
<xsl:variable name="frame_num" select="proto[@name='frame']/field[@name='frame.number']/@show"/>
|
||||
<xsl:variable name="frame_id" select="concat('f',$frame_num)"/>
|
||||
<xsl:variable name="frame_c" select="concat($frame_id,'c')"/>
|
||||
|
||||
<!-- the "title" bar of the frame -->
|
||||
<div width="100%" id="{$frame_id}">
|
||||
<a href="javascript:toggle_node('{$frame_c}')">⇒</a> <!-- #8658 is a "rArr" (double right arrow) character -->
|
||||
Frame <xsl:value-of select="$frame_num"/>:
|
||||
<xsl:for-each select="proto[@name!='geninfo']">
|
||||
<xsl:value-of select="@name"/>,
|
||||
</xsl:for-each>
|
||||
<small><a href="javascript:hide_node('{$frame_id}')">[X]</a></small>
|
||||
</div>
|
||||
|
||||
<!-- the frame contents are stored in a div, so we can toggle it -->
|
||||
<div width="100%" id="{$frame_c}" style="display:none">
|
||||
<!-- loop through all proto tags, but skip the "geninfo" one -->
|
||||
<xsl:for-each select="proto[@name!='geninfo']">
|
||||
|
||||
<xsl:variable name="proto" select="concat($frame_id,@name,count(preceding-sibling::proto)+1)"/>
|
||||
|
||||
<!-- the "title" bar of the proto -->
|
||||
<div width="100%" style="background-color:#e5e5e5; margin-bottom: 2px">
|
||||
 <a href="javascript:toggle_node('{$proto}')">⇒</a> <xsl:value-of select="@showname"/>
|
||||
|
||||
<!-- print "proto" details inside another div -->
|
||||
<div width="100%" id="{$proto}" style="display:none">
|
||||
<xsl:apply-templates/> <!-- we expect to match "field" tags -->
|
||||
</div>
|
||||
</div>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
|
||||
<!-- use the javascript function set_node_color() to set the color
|
||||
of the frame title bar. Defer colorization until the full page has
|
||||
been loaded. If the browser would support the XPath function
|
||||
replace() we could simply set the class attribute of the title bar div,
|
||||
but for now we're stuck with class names from Wireshark's colorfilters
|
||||
that contain spaces and we can't handle them in CSS. -->
|
||||
<script type="text/javascript">
|
||||
dojo.addOnLoad(function(){
|
||||
set_node_color(
|
||||
'<xsl:value-of select="$frame_id"/>',
|
||||
'<xsl:value-of select="proto[@name='frame']/field[@name='frame.coloring_rule.name']/@show"/>'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="pdml">
|
||||
Capture Filename: <b><xsl:value-of select="@capture_file"/></b>
|
||||
PDML created: <b><xsl:value-of select="@time"/></b>
|
||||
<tt>
|
||||
<xsl:apply-templates/> <!-- we expect to match the "packet" nodes -->
|
||||
</tt>
|
||||
</xsl:template>
|
||||
|
||||
<!-- this block matches the start of the PDML file -->
|
||||
<xsl:template match="/">
|
||||
<html>
|
||||
<head>
|
||||
<title>poor man's Wireshark</title>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
function set_node(node, str)
|
||||
{
|
||||
if(dojo.isString(node))
|
||||
node = dojo.byId(node);
|
||||
if(!node) return;
|
||||
node.style.display = str;
|
||||
}
|
||||
function toggle_node(node)
|
||||
{
|
||||
if(dojo.isString(node))
|
||||
node = dojo.byId(node);
|
||||
if(!node) return;
|
||||
set_node(node, (node.style.display != 'none') ? 'none' : 'block');
|
||||
}
|
||||
function hide_node(node)
|
||||
{
|
||||
set_node(node, 'none');
|
||||
}
|
||||
// this function was generated by colorfilters2js.pl
|
||||
function set_node_color(node,colorname)
|
||||
{
|
||||
if(dojo.isString(node))
|
||||
node = dojo.byId(node);
|
||||
if(!node) return;
|
||||
var fg;
|
||||
var bg;
|
||||
if(colorname == 'Bad TCP') {
|
||||
bg='#000000';
|
||||
fg='#ff5f5f';
|
||||
}
|
||||
if(colorname == 'HSRP State Change') {
|
||||
bg='#000000';
|
||||
fg='#fff600';
|
||||
}
|
||||
if(colorname == 'Spanning Tree Topology Change') {
|
||||
bg='#000000';
|
||||
fg='#fff600';
|
||||
}
|
||||
if(colorname == 'OSPF State Change') {
|
||||
bg='#000000';
|
||||
fg='#fff600';
|
||||
}
|
||||
if(colorname == 'ICMP errors') {
|
||||
bg='#000000';
|
||||
fg='#00ff0e';
|
||||
}
|
||||
if(colorname == 'ARP') {
|
||||
bg='#d6e8ff';
|
||||
fg='#000000';
|
||||
}
|
||||
if(colorname == 'ICMP') {
|
||||
bg='#c2c2ff';
|
||||
fg='#000000';
|
||||
}
|
||||
if(colorname == 'TCP RST') {
|
||||
bg='#900000';
|
||||
fg='#fff680';
|
||||
}
|
||||
if(colorname == 'TTL low or unexpected') {
|
||||
bg='#900000';
|
||||
fg='#ffffff';
|
||||
}
|
||||
if(colorname == 'Checksum Errors') {
|
||||
bg='#000000';
|
||||
fg='#ff5f5f';
|
||||
}
|
||||
if(colorname == 'SMB') {
|
||||
bg='#fffa99';
|
||||
fg='#000000';
|
||||
}
|
||||
if(colorname == 'HTTP') {
|
||||
bg='#8dff7f';
|
||||
fg='#000000';
|
||||
}
|
||||
if(colorname == 'IPX') {
|
||||
bg='#ffe3e5';
|
||||
fg='#000000';
|
||||
}
|
||||
if(colorname == 'DCERPC') {
|
||||
bg='#c797ff';
|
||||
fg='#000000';
|
||||
}
|
||||
if(colorname == 'Routing') {
|
||||
bg='#fff3d6';
|
||||
fg='#000000';
|
||||
}
|
||||
if(colorname == 'TCP SYN/FIN') {
|
||||
bg='#a0a0a0';
|
||||
fg='#000000';
|
||||
}
|
||||
if(colorname == 'TCP') {
|
||||
bg='#e7e6ff';
|
||||
fg='#000000';
|
||||
}
|
||||
if(colorname == 'UDP') {
|
||||
bg='#70e0ff';
|
||||
fg='#000000';
|
||||
}
|
||||
if(colorname == 'Broadcast') {
|
||||
bg='#ffffff';
|
||||
fg='#808080';
|
||||
}
|
||||
if(fg.length > 0)
|
||||
node.style.color = fg;
|
||||
if(bg.length > 0)
|
||||
node.style.background = bg;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<xsl:apply-templates/> <!-- we expect to match the "pdml" node -->
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
<xs:element name="PmFile">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="FileHeader">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="TimeStamp" type="xs:dateTime" />
|
||||
<xs:element name="TimeZone" type="xs:string" />
|
||||
<xs:element name="Period" type="xs:integer" />
|
||||
<xs:element name="VendorName" type="xs:string" />
|
||||
<xs:element name="ElementType" type="xs:string" />
|
||||
<xs:element name="PmVersion" type="xs:string" />
|
||||
<xs:element name="StartTime" type="xs:dateTime" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="Measurements" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="ObjectType" type="xs:string" />
|
||||
<xs:element name="PmName">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="N">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="i" type="xs:integer" use="required" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="PmData">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="Object">
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="V">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="i" type="xs:integer" use="required" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="CV">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="SN" type="xs:string" />
|
||||
<xs:element name="SV" type="xs:string" />
|
||||
</xs:sequence>
|
||||
<xs:attribute name="i" type="xs:integer"
|
||||
use="required" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
<xs:attribute name="rmUID" type="xs:string" use="required" />
|
||||
<xs:attribute name="Dn" type="xs:string" use="required" />
|
||||
<xs:attribute name="UserLabel" type="xs:string" use="required" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
@@ -0,0 +1,8 @@
|
||||
Package: OMC
|
||||
Version: 2.2508.1-YYYYMMDD-mt
|
||||
Section: AGrandTech
|
||||
Prioritt: optional
|
||||
Architecture: amd64
|
||||
Maintainer: Simon Zhangsz
|
||||
Depends:
|
||||
Description: OMC
|
||||
@@ -0,0 +1,95 @@
|
||||
#!/bin/bash
|
||||
|
||||
OMCRootDir=/usr/local/omc
|
||||
SystemdRootDir=/lib/systemd/system
|
||||
OMCEtcDir=${OMCRootDir}/etc
|
||||
FERootDir=${OMCRootDir}/htdocs/front
|
||||
OMCBinDir=${OMCRootDir}/bin
|
||||
OMCStaticDir=${OMCRootDir}/static
|
||||
UsrLocalBinDir=/usr/local/bin
|
||||
OMCDaemon=omcd
|
||||
NginxEtcDir=/etc/nginx
|
||||
NginxConfDir=${NginxEtcDir}/conf.d
|
||||
CFileList="restconf.yaml sshsvc.yaml omc.conf"
|
||||
LogoFileList="zh_brand.png zh_icon.png en_brand.png en_icon.png"
|
||||
|
||||
echo ""
|
||||
echo "* To start/stop/restart/status omc service, please run:"
|
||||
echo " sudo systemctl start/stop/restart/status restagent.service"
|
||||
echo " sudo systemctl start/stop/restart/status sshsvc.service"
|
||||
echo " or run: "
|
||||
echo " sudo /usr/local/omc/bin/omcsvc.sh start/stop/restart/status"
|
||||
echo ""
|
||||
|
||||
cd ${UsrLocalBinDir}
|
||||
if [ ! -e ${OMCDaemon} ]; then ln -s ${OMCBinDir}/omcsvc.sh ${OMCDaemon}; fi
|
||||
|
||||
chmod +rx ${OMCRootDir}/bin/*
|
||||
chmod +rx ${OMCRootDir}/*
|
||||
chmod +rx ${UsrLocalBinDir}/*
|
||||
chmod -R 755 ${OMCRootDir}/htdocs/front
|
||||
|
||||
for CFile in ${CFileList}; do
|
||||
if [ ! -e "${OMCEtcDir}/${CFile}" ]; then
|
||||
cp -f ${OMCEtcDir}/default/${CFile} ${OMCEtcDir}
|
||||
else
|
||||
# mv -f ${OMCEtcDir}/${CFile} ${OMCEtcDir}/${CFile}.bak
|
||||
# cp -f ${OMCEtcDir}/default/${CFile} ${OMCEtcDir}
|
||||
if [ -e "${OMCBinDir}/upgconf.sh" ] && [ "${CFile}" = "restconf.yaml" ]; then
|
||||
${OMCBinDir}/upgconf.sh
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -e "${FERootDir}/config.js" ]; then
|
||||
cp ${FERootDir}/default/config.js ${FERootDir};
|
||||
fi
|
||||
|
||||
# for LogoFile in ${LogoFileList}; do
|
||||
# if [ ! -e "${OMCStaticDir}/logo/${LogoFile}" ]; then
|
||||
# cp ${OMCStaticDir}/omc.d/logo/${LogoFile} ${OMCStaticDir}/logo;
|
||||
# fi
|
||||
# done
|
||||
|
||||
if ! id -u omc >/dev/null 2>&1 ; then
|
||||
useradd -d /opt/omc -m -s /bin/bash -pomc123 omc;
|
||||
mkdir -p /opt/omc/ftp
|
||||
else
|
||||
echo "user omc exist";
|
||||
fi
|
||||
|
||||
if [ ! -e "${NginxConfDir}/omc.conf" ]; then
|
||||
mkdir -p ${NginxConfDir}
|
||||
cp -f ${OMCEtcDir}/nginx/omc.conf ${NginxConfDir};
|
||||
fi
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
# disable auto upgrade
|
||||
systemctl disable --now unattended-upgrades
|
||||
|
||||
systemctl enable restagent.service
|
||||
systemctl enable sshsvc.service
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
# read environment parameter and to do
|
||||
if [ "$M_PARAM" = "install" -o "$M_PARAM" = "upgrade" ]; then
|
||||
echo "M parameter: $M_PARAM"
|
||||
if [ -n "$C_PARAM" ]; then
|
||||
echo "C parameter: $C_PARAM"
|
||||
${OMCRootDir}/bin/setomc.sh -m $M_PARAM -c $C_PARAM
|
||||
else
|
||||
${OMCRootDir}/bin/setomc.sh -m $M_PARAM
|
||||
fi
|
||||
# exit while failed to run setomc.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "setomc.sh execution failed. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -n "Starting OMC service ... "
|
||||
systemctl start sshsvc.service
|
||||
systemctl start restagent.service
|
||||
echo "done"
|
||||