Compare commits
128 Commits
2.231120.8
...
2.231214.9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f410f4203 | ||
| 85e8ac3e34 | |||
| f577948005 | |||
| 999aca571f | |||
| e0d38a11a2 | |||
| 38996c9e4b | |||
|
|
4340572421 | ||
|
|
738ff3b6f5 | ||
|
|
fd05fe1834 | ||
|
|
0e908e525c | ||
|
|
db5f349ae7 | ||
|
|
194395198e | ||
|
|
ea59f0c8d4 | ||
|
|
0baba9e40f | ||
|
|
97042b846d | ||
|
|
4405c5bed6 | ||
|
|
0ed715ae9f | ||
|
|
1292a3381f | ||
|
|
adb86d7f32 | ||
|
|
9c4260c690 | ||
| 4fcd1f2724 | |||
|
|
d94cf752a3 | ||
| 79500c6a2c | |||
| 0b8fe85b49 | |||
| 85beacc66a | |||
| 44575b8606 | |||
| 9a954da5ac | |||
| 6355039768 | |||
| 6d231f4100 | |||
| b686c60784 | |||
| 928a3db836 | |||
| c90f85ced1 | |||
| 667b958f0b | |||
|
|
595f2d379f | ||
| 4f30f7c9a3 | |||
| 9d998153b1 | |||
|
|
7eb63499c3 | ||
| 1abd25b754 | |||
| dbed5b729a | |||
| 0a39420728 | |||
|
|
9429a466bd | ||
| b9e4b2e6d9 | |||
|
|
0357b137bc | ||
|
|
e11da6c904 | ||
| 1b57d460c0 | |||
|
|
24b542fdaf | ||
| 9514e3d31b | |||
|
|
39e9695836 | ||
|
|
e8d1d0470f | ||
|
|
31d50c1fc7 | ||
| baa30022b0 | |||
| b38906f964 | |||
| 86b93e7332 | |||
| 474ea15027 | |||
|
|
896cbbe0a8 | ||
|
|
9ce63d0f95 | ||
| bb379ce509 | |||
| 50165a7dab | |||
| 680335b66e | |||
| 4d1e73f121 | |||
| 19b601a851 | |||
| a692bc0edd | |||
| a46fbb63c5 | |||
| 5870e3e820 | |||
| 97598556c6 | |||
|
|
8224071881 | ||
| dd1058feb7 | |||
| e8d6c13f71 | |||
| 9281f54080 | |||
| c109ad3826 | |||
| 0508866bef | |||
| e6299b0084 | |||
|
|
1ed15ac50b | ||
| e1859c2a19 | |||
| 59da0128d4 | |||
|
|
1380bf8698 | ||
|
|
05d94572f4 | ||
| 08b4174b83 | |||
| 93a17a1c81 | |||
| e36ef6a339 | |||
| 82e7f53352 | |||
| 4b4a0f53ea | |||
| af8e815ecb | |||
| e49a5efa9d | |||
| db383eb42f | |||
|
|
ee90ec827b | ||
| e5429d5a49 | |||
|
|
fbb6e1ff02 | ||
|
|
635167c0f7 | ||
| 0e26e1d754 | |||
| 8862f1dd90 | |||
| 57d33a536e | |||
|
|
ed64c68048 | ||
|
|
716d05295d | ||
| 4eacb3bd17 | |||
| 9c228764e1 | |||
| 85a20ba4f9 | |||
| b7b7e6507f | |||
| e5b677c535 | |||
|
|
793546543a | ||
|
|
57f16a7b71 | ||
| abba0664fd | |||
| 753779aa17 | |||
| cb16276f0a | |||
| 8c2b892dc5 | |||
| 40acec3eef | |||
| d4c3fe1aea | |||
| 9c21c91a11 | |||
|
|
c7606e3f92 | ||
| 0fb3df542f | |||
| 2005b8219f | |||
|
|
18241efc31 | ||
|
|
2a44f250f5 | ||
|
|
8b9e4ca240 | ||
|
|
a538fa98e7 | ||
|
|
9648e79dd9 | ||
|
|
80978c96f0 | ||
| b586b0cb55 | |||
|
|
5604bd9b9d | ||
|
|
d52945c946 | ||
|
|
99e247506a | ||
|
|
084a7b3c93 | ||
|
|
506866e082 | ||
|
|
a5139cf29c | ||
|
|
2bfb528907 | ||
|
|
03a944aff2 | ||
|
|
0c3cd1b31f | ||
|
|
03b404ed18 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -8,6 +8,7 @@
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
.idea/
|
||||
|
||||
# Run temp file and dir
|
||||
crontask/log/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Makefile for rest agent project
|
||||
|
||||
PROJECT = OMC
|
||||
VERSION = 2.2311.8
|
||||
VERSION = 2.2312.8
|
||||
PLATFORM = amd64
|
||||
ARMPLATFORM = aarch64
|
||||
BUILDDIR = ../../build
|
||||
|
||||
@@ -61,6 +61,7 @@ redis:
|
||||
# used to specify the default data source for multiple data resourece
|
||||
defaultDataSourceName: "default"
|
||||
|
||||
# upfHeaderLength: spare upf buffer, must destroy
|
||||
mml:
|
||||
port: 4100
|
||||
sleep: 200
|
||||
@@ -68,10 +69,11 @@ mml:
|
||||
password: admin
|
||||
mmlHome: ./mmlhome
|
||||
upload: /home/agtuser
|
||||
upfHeaderLength: 2335
|
||||
|
||||
# NE config
|
||||
ne:
|
||||
user: root
|
||||
user: agtuser
|
||||
etcdir: /usr/local/etc
|
||||
bindir: /usr/local/bin
|
||||
omcdir: /usr/local/omc
|
||||
|
||||
BIN
config/goldkpi/核心网网元黄金指标集.xlsx
Normal file
BIN
config/goldkpi/核心网网元黄金指标集.xlsx
Normal file
Binary file not shown.
BIN
config/locales/i18n_data.xlsx
Normal file
BIN
config/locales/i18n_data.xlsx
Normal file
Binary file not shown.
BIN
config/locales/i18n_table.xlsx
Normal file
BIN
config/locales/i18n_table.xlsx
Normal file
Binary file not shown.
@@ -1076,6 +1076,7 @@ omc:
|
||||
- operation: "run"
|
||||
object: "shell"
|
||||
display: "Run Shell Command"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "cmd"
|
||||
alias: "cmd"
|
||||
|
||||
@@ -26,7 +26,7 @@ udm:
|
||||
type: "string"
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "Ki"
|
||||
display: "KI"
|
||||
comment: ""
|
||||
- name: "amf"
|
||||
type: "string"
|
||||
@@ -38,11 +38,11 @@ udm:
|
||||
type: "int"
|
||||
optional: "false"
|
||||
filter: "0~15"
|
||||
display: "Algo"
|
||||
display: "Algo Index"
|
||||
comment: ""
|
||||
- name: "opc"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "OPC"
|
||||
comment: ""
|
||||
@@ -70,13 +70,13 @@ udm:
|
||||
type: "int"
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "auth data number"
|
||||
display: "Auth Data Number"
|
||||
comment: ""
|
||||
- name: "ki"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "Ki"
|
||||
display: "KI"
|
||||
comment: ""
|
||||
- name: "amf"
|
||||
type: "string"
|
||||
@@ -88,11 +88,11 @@ udm:
|
||||
type: "int"
|
||||
optional: "false"
|
||||
filter: "0~15"
|
||||
display: "Algo"
|
||||
display: "Algo Index"
|
||||
comment: ""
|
||||
- name: "opc"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "OPC"
|
||||
comment: ""
|
||||
@@ -110,17 +110,17 @@ udm:
|
||||
type: "int"
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "auth data number"
|
||||
display: "Auth Data Number"
|
||||
comment: ""
|
||||
- operation: "import"
|
||||
object: "authdat"
|
||||
display: "Import Auth Data From File"
|
||||
params:
|
||||
- name: "path"
|
||||
type: "string"
|
||||
type: "file"
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "Path file"
|
||||
filter: ".txt"
|
||||
display: "Path File"
|
||||
comment: ""
|
||||
- operation: "export"
|
||||
object: "authdat"
|
||||
@@ -130,7 +130,7 @@ udm:
|
||||
type: "string"
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "Path file"
|
||||
display: "Path File"
|
||||
comment: ""
|
||||
subscriberManagement:
|
||||
display: "Subcriber Management"
|
||||
@@ -163,51 +163,100 @@ udm:
|
||||
comment: ""
|
||||
- name: "ambr"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "AMBR"
|
||||
display: "5G UE AMBR"
|
||||
comment: ""
|
||||
- name: "nssai"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "Nssai"
|
||||
display: "5G SNSSAIs"
|
||||
comment: ""
|
||||
- name: "arfb"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "Arfb"
|
||||
display: "5G Forbidden Areas"
|
||||
comment: ""
|
||||
- name: "sar"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "SAR"
|
||||
display: "5G Service Area Restriction"
|
||||
comment: ""
|
||||
- name: "rat"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "RAT"
|
||||
display: "RAT Type"
|
||||
comment: ""
|
||||
- name: "cn"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "CN"
|
||||
display: "Core Network"
|
||||
comment: ""
|
||||
- name: "smf_sel"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "SMF_sel"
|
||||
display: "5G SMF Selection Data"
|
||||
comment: ""
|
||||
- name: "sm_data"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "SM_data"
|
||||
display: "5G SM Data"
|
||||
comment: ""
|
||||
- name: "static_ip"
|
||||
type: "string"
|
||||
value: "-"
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "4G Static IP"
|
||||
comment: "Specify mobile phone static IP address, and '-' indicates the use of dynamic IP address"
|
||||
- name: "context_id"
|
||||
type: "int"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G Context ID"
|
||||
comment: ""
|
||||
- name: "apn_context"
|
||||
type: "int"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G APN Context"
|
||||
comment: ""
|
||||
- name: "epstpl"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G EPS User Template Name"
|
||||
comment: ""
|
||||
- name: "eps_flag"
|
||||
type: "enum"
|
||||
optional: "true"
|
||||
filter: "{\"0\":\"Disable\", \"1\":\"Enable\"}"
|
||||
display: "4G EPS Flag"
|
||||
comment: ""
|
||||
- name: "eps_odb"
|
||||
type: "int"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G EPS ODB"
|
||||
comment: ""
|
||||
- name: "hplmn_odb"
|
||||
type: "int"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G HPLMN ODB"
|
||||
comment: ""
|
||||
- name: "ard"
|
||||
type: "int"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G Access Restriction Data"
|
||||
comment: ""
|
||||
- operation: "del"
|
||||
object: "udmuser"
|
||||
@@ -228,7 +277,7 @@ udm:
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "IMSI"
|
||||
c1omment: ""
|
||||
comment: ""
|
||||
- name: "msisdn"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
@@ -239,48 +288,97 @@ udm:
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "AMBR"
|
||||
display: "5G UE AMBR"
|
||||
comment: ""
|
||||
- name: "nssai"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "Nssai"
|
||||
display: "5G SNSSAIs"
|
||||
comment: ""
|
||||
- name: "arfb"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "Arfb"
|
||||
display: "5G Forbidden Areas"
|
||||
comment: ""
|
||||
- name: "sar"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "SAR"
|
||||
display: "5G Service Area Restriction"
|
||||
comment: ""
|
||||
- name: "rat"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "RAT"
|
||||
display: "RAT Type"
|
||||
comment: ""
|
||||
- name: "cn"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "CN"
|
||||
display: "Core Network"
|
||||
comment: ""
|
||||
- name: "smf_sel"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "SMF_sel"
|
||||
display: "5G SMF Selection Data"
|
||||
comment: ""
|
||||
- name: "sm_data"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "SM_data"
|
||||
display: "5G SM Data"
|
||||
comment: ""
|
||||
- name: "static_ip"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G Static IP"
|
||||
comment: "Specify mobile phone static IP address, and '-' indicates the use of dynamic IP address"
|
||||
- name: "context_id"
|
||||
type: "int"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G Context ID"
|
||||
comment: ""
|
||||
- name: "apn_context"
|
||||
type: "int"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G APN Context"
|
||||
comment: ""
|
||||
- name: "epstpl"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G EPS User Template Name"
|
||||
comment: ""
|
||||
- name: "eps_flag"
|
||||
type: "enum"
|
||||
optional: "true"
|
||||
filter: "{\"0\":\"Disable\", \"1\":\"Enable\"}"
|
||||
display: "4G EPS Flag"
|
||||
comment: ""
|
||||
- name: "eps_odb"
|
||||
type: "int"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G EPS ODB"
|
||||
comment: ""
|
||||
- name: "hplmn_odb"
|
||||
type: "int"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G HPLMN ODB"
|
||||
comment: ""
|
||||
- name: "ard"
|
||||
type: "int"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G Access Restriction Data"
|
||||
comment: ""
|
||||
- operation: "bad"
|
||||
object: "udmuser"
|
||||
@@ -290,67 +388,116 @@ udm:
|
||||
type: "string"
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "IMSI"
|
||||
display: "Starting IMSI"
|
||||
comment: ""
|
||||
- name: "start_msisdn"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "MSISDN"
|
||||
display: "Starting MSISDN"
|
||||
comment: ""
|
||||
- name: "sub_num"
|
||||
type: "int"
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "subscriber number"
|
||||
display: "Subscriber Number"
|
||||
comment: ""
|
||||
- name: "ambr"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "AMBR"
|
||||
display: "5G UE AMBR"
|
||||
comment: ""
|
||||
- name: "nssai"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "Nssai"
|
||||
display: "5G SNSSAIs"
|
||||
comment: ""
|
||||
- name: "arfb"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "Arfb"
|
||||
display: "5G Forbidden Areas"
|
||||
comment: ""
|
||||
- name: "sar"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "SAR"
|
||||
display: "5G Service Area Restriction"
|
||||
comment: ""
|
||||
- name: "rat"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "RAT"
|
||||
display: "RAT Type"
|
||||
comment: ""
|
||||
- name: "cn"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "CN"
|
||||
display: "Core Network"
|
||||
comment: ""
|
||||
- name: "smf_sel"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "SMF_sel"
|
||||
display: "5G SMF Selection Data"
|
||||
comment: ""
|
||||
- name: "sm_data"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "SM_data"
|
||||
display: "5G SM Data"
|
||||
comment: ""
|
||||
- name: "static_ip"
|
||||
type: "string"
|
||||
value: "-"
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "4G Static IP"
|
||||
comment: "Specify mobile phone static IP address, and '-' indicates the use of dynamic IP address"
|
||||
- name: "context_id"
|
||||
type: "int"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G Context ID"
|
||||
comment: ""
|
||||
- name: "apn_context"
|
||||
type: "int"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G APN Context"
|
||||
comment: ""
|
||||
- name: "epstpl"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G EPS User Template Name"
|
||||
comment: ""
|
||||
- name: "eps_flag"
|
||||
type: "enum"
|
||||
optional: "true"
|
||||
filter: "{\"0\":\"Disable\", \"1\":\"Enable\"}"
|
||||
display: "4G EPS Flag"
|
||||
comment: ""
|
||||
- name: "eps_odb"
|
||||
type: "int"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G EPS ODB"
|
||||
comment: ""
|
||||
- name: "hplmn_odb"
|
||||
type: "int"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G HPLMN ODB"
|
||||
comment: ""
|
||||
- name: "ard"
|
||||
type: "int"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G Access Restriction Data"
|
||||
comment: ""
|
||||
- operation: "bde"
|
||||
object: "udmuser"
|
||||
@@ -360,13 +507,13 @@ udm:
|
||||
type: "string"
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "IMSI"
|
||||
display: "Starting IMSI"
|
||||
comment: ""
|
||||
- name: "sub_num"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "Subcribers number"
|
||||
display: "Subcribers Number"
|
||||
comment: ""
|
||||
- operation: "bmd"
|
||||
object: "udmuser"
|
||||
@@ -376,41 +523,141 @@ udm:
|
||||
type: "string"
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "IMSI"
|
||||
display: "Starting IMSI"
|
||||
comment: ""
|
||||
- name: "sub_num"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "Subcribers number"
|
||||
display: "Subcribers Number"
|
||||
comment: ""
|
||||
- name: "ambr"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "5G UE AMBR"
|
||||
comment: ""
|
||||
- name: "nssai"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "5G SNSSAIs"
|
||||
comment: ""
|
||||
- name: "arfb"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "5G Forbidden Areas"
|
||||
comment: ""
|
||||
- name: "sar"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "5G Service Area Restriction"
|
||||
comment: ""
|
||||
- name: "rat"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "RAT Type"
|
||||
comment: ""
|
||||
- name: "cn"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "Core Network"
|
||||
comment: ""
|
||||
- name: "smf_sel"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "5G SMF Selection Data"
|
||||
comment: ""
|
||||
- name: "sm_data"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "SM_data"
|
||||
display: "5G SM Data"
|
||||
comment: ""
|
||||
- name: "static_ip"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G Static IP"
|
||||
comment: "Specify mobile phone static IP address, and '-' indicates the use of dynamic IP address"
|
||||
- name: "context_id"
|
||||
type: "int"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G Context ID"
|
||||
comment: ""
|
||||
- name: "apn_context"
|
||||
type: "int"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G APN Context"
|
||||
comment: ""
|
||||
- name: "epstpl"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G EPS User Template Name"
|
||||
comment: ""
|
||||
- name: "eps_flag"
|
||||
type: "enum"
|
||||
optional: "true"
|
||||
filter: "{\"0\":\"Disable\", \"1\":\"Enable\"}"
|
||||
display: "4G EPS Flag"
|
||||
comment: ""
|
||||
- name: "eps_odb"
|
||||
type: "int"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G EPS ODB"
|
||||
comment: ""
|
||||
- name: "hplmn_odb"
|
||||
type: "int"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G HPLMN ODB"
|
||||
comment: ""
|
||||
- name: "ard"
|
||||
type: "int"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "4G Access Restriction Data"
|
||||
comment: ""
|
||||
- operation: "import"
|
||||
object: "udmuser"
|
||||
display: "Import Subscriber Data From File"
|
||||
params:
|
||||
- name: "path"
|
||||
type: "string"
|
||||
type: "file"
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "Path file"
|
||||
filter: ".txt"
|
||||
display: "Path File"
|
||||
comment: ""
|
||||
- operation: "upload"
|
||||
object: "udmuser"
|
||||
display: "Upload Subscriber Data"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "path"
|
||||
type: "file"
|
||||
optional: "false"
|
||||
filter: ".txt"
|
||||
display: "Path File"
|
||||
comment: ""
|
||||
- operation: "export"
|
||||
object: "udmuser"
|
||||
display: "Export Subscriber Data to File"
|
||||
params:
|
||||
- name: "path"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "Path file"
|
||||
comment: ""
|
||||
display: "Path File"
|
||||
comment: ""
|
||||
- operation: "sync"
|
||||
object: "start"
|
||||
display: "Sync UDM Data From Public UDM"
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
amf:
|
||||
amfManagement:
|
||||
display: "AMF Management"
|
||||
mml:
|
||||
- operation: "help"
|
||||
object: ""
|
||||
display: "List AMF MML CMD"
|
||||
params:
|
||||
systemManagement:
|
||||
display: "System Management"
|
||||
mml:
|
||||
- operation: "set"
|
||||
object: "n8_ip"
|
||||
display: "Set N8 IP Address"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "ip"
|
||||
type: "string"
|
||||
@@ -15,6 +23,7 @@ amf:
|
||||
- operation: "set"
|
||||
object: "n11_ip"
|
||||
display: "Set N11 IP Address"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "ip"
|
||||
type: "string"
|
||||
@@ -25,6 +34,7 @@ amf:
|
||||
- operation: "set"
|
||||
object: "n12_ip"
|
||||
display: "Set N12 IP Address"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "ip"
|
||||
type: "string"
|
||||
@@ -35,6 +45,7 @@ amf:
|
||||
- operation: "set"
|
||||
object: "relative_capacity"
|
||||
display: "Set Relative Capacity"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "capacity"
|
||||
type: "int"
|
||||
@@ -45,6 +56,7 @@ amf:
|
||||
- operation: "set"
|
||||
object: "n2_ip"
|
||||
display: "Set N2 IP Address"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "ip"
|
||||
type: "string"
|
||||
@@ -55,6 +67,7 @@ amf:
|
||||
- operation: "set"
|
||||
object: "n2_port"
|
||||
display: "Set N2 Port"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "port"
|
||||
type: "int"
|
||||
@@ -65,6 +78,7 @@ amf:
|
||||
- operation: "set"
|
||||
object: "ntpversion"
|
||||
display: "Set NTP Version"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "version"
|
||||
type: "int"
|
||||
@@ -75,6 +89,7 @@ amf:
|
||||
- operation: "set"
|
||||
object: "ntpmaxdiff"
|
||||
display: "Set NTP Max Diff"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "value"
|
||||
type: "int"
|
||||
@@ -85,6 +100,7 @@ amf:
|
||||
- operation: "set"
|
||||
object: "ntpsynctimer"
|
||||
display: "Set NTP Sync Timer"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "periods"
|
||||
type: "int"
|
||||
@@ -95,6 +111,7 @@ amf:
|
||||
- operation: "add"
|
||||
object: "slice"
|
||||
display: "Add Slice"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "sst"
|
||||
type: "string"
|
||||
@@ -111,6 +128,7 @@ amf:
|
||||
- operation: "deregister"
|
||||
object: "imsi"
|
||||
display: "Deregister IMSI"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "IMSI"
|
||||
type: "string"
|
||||
@@ -121,6 +139,7 @@ amf:
|
||||
- operation: "exec"
|
||||
object: "shell"
|
||||
display: "Execute Shell Command"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "cmd"
|
||||
type: "string"
|
||||
@@ -131,6 +150,7 @@ amf:
|
||||
- operation: "reload"
|
||||
object: ""
|
||||
display: "Reload Config"
|
||||
status: "Inactive"
|
||||
params:
|
||||
subsManagement:
|
||||
display: "Subscriber Management"
|
||||
@@ -138,6 +158,7 @@ amf:
|
||||
- operation: "list"
|
||||
object: "imsi"
|
||||
display: "List Online IMSI"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "imsi"
|
||||
type: "string"
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
ausf:
|
||||
ausfManagement:
|
||||
display: "AUSF Management"
|
||||
mml:
|
||||
- operation: "help"
|
||||
object: ""
|
||||
display: "List AUSF MML CMD"
|
||||
params:
|
||||
systemManagement:
|
||||
display: "System Management"
|
||||
mml:
|
||||
- operation: "set"
|
||||
object: "n12ip"
|
||||
display: "Set N12 IP Address"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "ip"
|
||||
type: "string"
|
||||
@@ -15,6 +23,7 @@ ausf:
|
||||
- operation: "set"
|
||||
object: "n12port"
|
||||
display: "Set N12 Port"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "port"
|
||||
type: "int"
|
||||
@@ -25,6 +34,7 @@ ausf:
|
||||
- operation: "set"
|
||||
object: "n12scheme"
|
||||
display: "Set N12 Scheme"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "scheme"
|
||||
type: "enum"
|
||||
@@ -35,6 +45,7 @@ ausf:
|
||||
- operation: "set"
|
||||
object: "supirange"
|
||||
display: "Set SUPI Range"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "supirange"
|
||||
type: "string"
|
||||
@@ -45,4 +56,5 @@ ausf:
|
||||
- operation: "reload"
|
||||
object: ""
|
||||
display: "Reload Config"
|
||||
status: "Inactive"
|
||||
params:
|
||||
|
||||
8
config/mml/system/ims_sys_mml_config.yaml
Normal file
8
config/mml/system/ims_sys_mml_config.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
ims:
|
||||
imsManagement:
|
||||
display: "IMS Management"
|
||||
mml:
|
||||
- operation: "help"
|
||||
object: ""
|
||||
display: "List IMS MML CMD"
|
||||
params:
|
||||
8
config/mml/system/mme_sys_mml_config.yaml
Normal file
8
config/mml/system/mme_sys_mml_config.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
mme:
|
||||
mmeManagement:
|
||||
display: "MME Management"
|
||||
mml:
|
||||
- operation: "help"
|
||||
object: ""
|
||||
display: "List MME MML CMD"
|
||||
params:
|
||||
8
config/mml/system/n3iwf_sys_mml_config.yaml
Normal file
8
config/mml/system/n3iwf_sys_mml_config.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
n3iwf:
|
||||
n3iwfManagement:
|
||||
display: "N3IWF Management"
|
||||
mml:
|
||||
- operation: "help"
|
||||
object: ""
|
||||
display: "List N3IWF MML CMD"
|
||||
params:
|
||||
8
config/mml/system/nrf_sys_mml_config.yaml
Normal file
8
config/mml/system/nrf_sys_mml_config.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
nrf:
|
||||
nrfManagement:
|
||||
display: "NRF Management"
|
||||
mml:
|
||||
- operation: "help"
|
||||
object: ""
|
||||
display: "List NRF MML CMD"
|
||||
params:
|
||||
8
config/mml/system/nssf_sys_mml_config.yaml
Normal file
8
config/mml/system/nssf_sys_mml_config.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
nssf:
|
||||
nssfManagement:
|
||||
display: "NSSF Management"
|
||||
mml:
|
||||
- operation: "help"
|
||||
object: ""
|
||||
display: "List NSSF MML CMD"
|
||||
params:
|
||||
8
config/mml/system/pcf_sys_mml_config.yaml
Normal file
8
config/mml/system/pcf_sys_mml_config.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
pcf:
|
||||
pcfManagement:
|
||||
display: "PCF Management"
|
||||
mml:
|
||||
- operation: "help"
|
||||
object: ""
|
||||
display: "List PCF MML CMD"
|
||||
params:
|
||||
@@ -1,10 +1,18 @@
|
||||
smf:
|
||||
smfManagement:
|
||||
display: "SMF Management"
|
||||
mml:
|
||||
- operation: "help"
|
||||
object: ""
|
||||
display: "List SMF MML CMD"
|
||||
params:
|
||||
systemManagement:
|
||||
display: "System Management"
|
||||
mml:
|
||||
- operation: "set"
|
||||
object: "n7 server"
|
||||
display: "Set N7 Server"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "scheme"
|
||||
type: "enum"
|
||||
@@ -27,6 +35,7 @@ smf:
|
||||
- operation: "set"
|
||||
object: "n7 client"
|
||||
display: "Set N7 Client"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "scheme"
|
||||
type: "enum"
|
||||
@@ -43,6 +52,7 @@ smf:
|
||||
- operation: "set"
|
||||
object: "n10 server"
|
||||
display: "Set N10 Server"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "scheme"
|
||||
type: "enum"
|
||||
@@ -65,6 +75,7 @@ smf:
|
||||
- operation: "set"
|
||||
object: "n10 client"
|
||||
display: "Set N10 Client"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "scheme"
|
||||
type: "enum"
|
||||
@@ -81,6 +92,7 @@ smf:
|
||||
- operation: "set"
|
||||
object: "n11 server"
|
||||
display: "Set N11 Server"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "scheme"
|
||||
type: "enum"
|
||||
@@ -103,6 +115,7 @@ smf:
|
||||
- operation: "set"
|
||||
object: "n11 client"
|
||||
display: "Set N11 Client"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "scheme"
|
||||
type: "enum"
|
||||
@@ -119,6 +132,7 @@ smf:
|
||||
- operation: "set"
|
||||
object: "dnn"
|
||||
display: "Set DNN"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "index"
|
||||
type: "int"
|
||||
@@ -135,6 +149,7 @@ smf:
|
||||
- operation: "set pccrule <index> <precedence> <qosIndex> <filter direction> <filter> <appId>"
|
||||
object: "pccrule"
|
||||
display: "Set PCC Rule"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "index"
|
||||
type: "int"
|
||||
@@ -175,6 +190,7 @@ smf:
|
||||
- operation: "set"
|
||||
object: "urr"
|
||||
display: "Set URR"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "index"
|
||||
type: "string"
|
||||
@@ -209,6 +225,7 @@ smf:
|
||||
- operation: "set"
|
||||
object: "qos"
|
||||
display: "Set Qos"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "index"
|
||||
type: "string"
|
||||
@@ -273,6 +290,7 @@ smf:
|
||||
- operation: "set"
|
||||
object: "snssai"
|
||||
display: "Set Snssai"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "index"
|
||||
type: "string"
|
||||
@@ -288,6 +306,7 @@ smf:
|
||||
- operation: "release"
|
||||
object: "imsi"
|
||||
display: "Release IMSI"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "imsi"
|
||||
type: "string"
|
||||
@@ -303,6 +322,7 @@ smf:
|
||||
- operation: "set"
|
||||
object: "urr"
|
||||
display: "Set URR"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "index"
|
||||
type: "string"
|
||||
@@ -337,6 +357,7 @@ smf:
|
||||
- operation: "set"
|
||||
object: "dpi"
|
||||
display: "Set DPI"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "flag"
|
||||
type: "enum"
|
||||
@@ -353,6 +374,7 @@ smf:
|
||||
- operation: "exec"
|
||||
object: "shell"
|
||||
display: "Execute Shell Command"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "cmd"
|
||||
type: "string"
|
||||
@@ -363,4 +385,5 @@ smf:
|
||||
- operation: "reload"
|
||||
object: ""
|
||||
display: "Reload Config"
|
||||
status: "Inactive"
|
||||
params:
|
||||
@@ -1,10 +1,18 @@
|
||||
udm:
|
||||
udmManagement:
|
||||
display: "UDM Management"
|
||||
mml:
|
||||
- operation: "help"
|
||||
object: ""
|
||||
display: "List UDM MML CMD"
|
||||
params:
|
||||
systemManagement:
|
||||
display: "System Management"
|
||||
mml:
|
||||
- operation: "set"
|
||||
object: "n8ip"
|
||||
display: "Set N8 IP Address"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "ip"
|
||||
type: "ipv4"
|
||||
@@ -15,6 +23,7 @@ udm:
|
||||
- operation: "set"
|
||||
object: "n8port"
|
||||
display: "Set N8 Port"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "port"
|
||||
type: "int"
|
||||
@@ -25,6 +34,7 @@ udm:
|
||||
- operation: "set"
|
||||
object: "n8scheme"
|
||||
display: "Set N8 Scheme"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "scheme"
|
||||
type: "enum"
|
||||
@@ -35,6 +45,7 @@ udm:
|
||||
- operation: "set"
|
||||
object: "n10ip"
|
||||
display: "Set N10 IP Address"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "ip"
|
||||
type: "string"
|
||||
@@ -45,6 +56,7 @@ udm:
|
||||
- operation: "set"
|
||||
object: "n10port"
|
||||
display: "Set N10 Port"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "port"
|
||||
type: "int"
|
||||
@@ -55,6 +67,7 @@ udm:
|
||||
- operation: "set"
|
||||
object: "n10scheme"
|
||||
display: "Set N10 Scheme"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "scheme"
|
||||
type: "enum"
|
||||
@@ -65,6 +78,7 @@ udm:
|
||||
- operation: "exec"
|
||||
object: "shell"
|
||||
display: "Execute Shell Command"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "cmd"
|
||||
type: "string"
|
||||
@@ -75,4 +89,5 @@ udm:
|
||||
- operation: "reload"
|
||||
object: ""
|
||||
display: "Reload Config"
|
||||
status: "Inactive"
|
||||
params:
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
upf:
|
||||
upfManagement:
|
||||
display: "UPF Management"
|
||||
mml:
|
||||
- operation: "help"
|
||||
object: ""
|
||||
display: "List UPF MML CMD"
|
||||
params:
|
||||
systemManagement:
|
||||
display: "System Management"
|
||||
mml:
|
||||
- operation: "set"
|
||||
object: "n3 driver"
|
||||
display: "Set N3 Driver"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "type"
|
||||
type: "int"
|
||||
@@ -39,6 +47,7 @@ upf:
|
||||
- operation: "set"
|
||||
object: "n4 ip"
|
||||
display: "Set N4 IP Address"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "ip"
|
||||
type: "string"
|
||||
@@ -49,6 +58,7 @@ upf:
|
||||
- operation: "set"
|
||||
object: "n6 driver"
|
||||
display: "Set N6 Driver"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "type"
|
||||
type: "int"
|
||||
@@ -83,6 +93,7 @@ upf:
|
||||
- operation: "set"
|
||||
object: "n9 driver"
|
||||
display: "Set N9 Driver"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "type"
|
||||
type: "int"
|
||||
@@ -117,6 +128,7 @@ upf:
|
||||
- operation: "set"
|
||||
object: "dnn"
|
||||
display: "Set DNN"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "dnn"
|
||||
type: "string"
|
||||
@@ -133,6 +145,7 @@ upf:
|
||||
- operation: "set"
|
||||
object: "pfcp"
|
||||
display: "Set PFCP"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "path"
|
||||
type: "string"
|
||||
@@ -155,6 +168,7 @@ upf:
|
||||
- operation: "set"
|
||||
object: "qos"
|
||||
display: "Set Qos"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "index"
|
||||
type: "string"
|
||||
@@ -189,6 +203,7 @@ upf:
|
||||
- operation: "set"
|
||||
object: "pccrule"
|
||||
display: "Set PCC Rule"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "index"
|
||||
type: "int"
|
||||
@@ -229,6 +244,7 @@ upf:
|
||||
- operation: "exec"
|
||||
object: "shell"
|
||||
display: "Execute Shell Command"
|
||||
status: "Inactive"
|
||||
params:
|
||||
- name: "cmd"
|
||||
type: "string"
|
||||
@@ -239,4 +255,5 @@ upf:
|
||||
- operation: "reload"
|
||||
object: ""
|
||||
display: "Reload Config"
|
||||
status: "Inactive"
|
||||
params:
|
||||
@@ -305,6 +305,6 @@ amf:
|
||||
type: "regex"
|
||||
value: '000001'
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
filter: '^[A-Fa-f0-9]{6}'
|
||||
display: "SD"
|
||||
comment: ""
|
||||
|
||||
@@ -26,7 +26,7 @@ mme:
|
||||
- name: "s1MmePort"
|
||||
type: "int"
|
||||
value: "36412"
|
||||
access: "read-write"
|
||||
access: "read-only"
|
||||
filter: "0~65535"
|
||||
display: "S1 MME Port"
|
||||
comment: "0~65535"
|
||||
@@ -68,7 +68,7 @@ mme:
|
||||
- name: "sgsMmePort"
|
||||
type: "int"
|
||||
value: "29118"
|
||||
access: "read-write"
|
||||
access: "read-only"
|
||||
filter: "0~65535"
|
||||
display: "SGs MME Port"
|
||||
comment: "0~65535"
|
||||
@@ -87,7 +87,7 @@ mme:
|
||||
value: '46000'
|
||||
access: "read-write"
|
||||
filter: '^[0-9]{5,6}$'
|
||||
display: "Plmn Id"
|
||||
display: "PLMN ID"
|
||||
comment: ""
|
||||
- name: "groupId"
|
||||
type: "int"
|
||||
@@ -118,7 +118,7 @@ mme:
|
||||
value: '46000'
|
||||
access: "read-write"
|
||||
filter: '^[0-9]{5,6}$'
|
||||
display: "Plmn Id"
|
||||
display: "PLMN ID"
|
||||
comment: ""
|
||||
- name: "tac"
|
||||
type: "int"
|
||||
@@ -180,7 +180,7 @@ mme:
|
||||
value: '46000'
|
||||
access: "read-write"
|
||||
filter: '^[0-9]{5,6}$'
|
||||
display: "Plmn Id"
|
||||
display: "PLMN ID"
|
||||
comment: ""
|
||||
- name: "tac"
|
||||
type: "int"
|
||||
@@ -196,6 +196,37 @@ mme:
|
||||
filter: '0~64'
|
||||
display: "SGW IP"
|
||||
comment: ""
|
||||
pgw:
|
||||
display: "PGW List"
|
||||
array:
|
||||
- name: "index"
|
||||
type: "int"
|
||||
value: "0"
|
||||
access: "read-write"
|
||||
filter: '0~15'
|
||||
display: "Index"
|
||||
comment: "0~15"
|
||||
- name: "plmnId"
|
||||
type: "regex"
|
||||
value: '46000'
|
||||
access: "read-write"
|
||||
filter: '^[0-9]{5,6}$'
|
||||
display: "PLMN ID"
|
||||
comment: ""
|
||||
- name: "apn"
|
||||
type: "string"
|
||||
value: "cmnet"
|
||||
access: "read-write"
|
||||
filter: '0~128'
|
||||
display: "APN"
|
||||
comment: ""
|
||||
- name: "pgwIp"
|
||||
type: "string"
|
||||
value: "192.168.1.181"
|
||||
access: "read-write"
|
||||
filter: '0~64'
|
||||
display: "PGW IP"
|
||||
comment: ""
|
||||
amf:
|
||||
display: "AMF List"
|
||||
array:
|
||||
@@ -211,7 +242,7 @@ mme:
|
||||
value: '46000'
|
||||
access: "read-write"
|
||||
filter: '^[0-9]{5,6}$'
|
||||
display: "Plmn Id"
|
||||
display: "PLMN ID"
|
||||
comment: ""
|
||||
- name: "tac"
|
||||
type: "int"
|
||||
|
||||
@@ -252,28 +252,28 @@ nssf:
|
||||
- name: "mcc"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "MCC"
|
||||
comment: "MCC"
|
||||
- name: "mnc"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "MNC"
|
||||
comment: "MNC"
|
||||
- name: "tac"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "TAC"
|
||||
comment: "TAC"
|
||||
- name: "supportedSst"
|
||||
type: "int"
|
||||
value: ""
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "Supported SST"
|
||||
comment: "Supported SST"
|
||||
@@ -287,7 +287,7 @@ nssf:
|
||||
- name: "restrictedSst"
|
||||
type: "int"
|
||||
value: ""
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "Restricted SST"
|
||||
comment: "Restricted SST"
|
||||
@@ -339,28 +339,28 @@ nssf:
|
||||
- name: "operatorName"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "Operator Name"
|
||||
comment: "Operator Name"
|
||||
- name: "mcc"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "MCC"
|
||||
comment: "MCC"
|
||||
- name: "mnc"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "MNC"
|
||||
comment: "MNC"
|
||||
- name: "servingSnssaiSst"
|
||||
type: "int"
|
||||
value: "1"
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "Serving SNSSAI SST"
|
||||
comment: "Serving SNSSAI SST"
|
||||
@@ -374,7 +374,7 @@ nssf:
|
||||
- name: "homeSnssaiSst"
|
||||
type: "int"
|
||||
value: "1"
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "Home SNSSAI SST"
|
||||
comment: "Home SNSSAI SST"
|
||||
|
||||
@@ -118,7 +118,7 @@ pcf:
|
||||
value: ''
|
||||
access: "read-write"
|
||||
filter: '^.{1,63}$'
|
||||
display: "App ID"
|
||||
display: "APP ID"
|
||||
comment: "0~63"
|
||||
- name: "flowTemplate"
|
||||
type: "string"
|
||||
|
||||
@@ -164,7 +164,7 @@ smf:
|
||||
value: ""
|
||||
access: "read-write"
|
||||
filter: '1~64'
|
||||
display: "UPF Id"
|
||||
display: "UPF ID"
|
||||
comment: "upfId-1"
|
||||
- name: "addr"
|
||||
type: "string"
|
||||
@@ -251,8 +251,8 @@ smf:
|
||||
value: ""
|
||||
access: "read-write"
|
||||
filter: '1~64'
|
||||
display: "UPF Id"
|
||||
comment: "UPF Id"
|
||||
display: "UPF ID"
|
||||
comment: "UPF ID"
|
||||
dnnTaiSelectUpf:
|
||||
display: "DNN TAI Select UPF"
|
||||
array:
|
||||
@@ -282,5 +282,5 @@ smf:
|
||||
value: "upf2-Id"
|
||||
access: "read-write"
|
||||
filter: '1~64'
|
||||
display: "UPF Id"
|
||||
comment: "UPF Id"
|
||||
display: "UPF ID"
|
||||
comment: "UPF ID"
|
||||
@@ -111,7 +111,7 @@ udm:
|
||||
display: "Downlink"
|
||||
comment: ""
|
||||
subsNssais:
|
||||
display: "Subs Nssais"
|
||||
display: "Subs NSSAIs"
|
||||
array:
|
||||
- name: "index"
|
||||
type: "int"
|
||||
@@ -225,7 +225,7 @@ udm:
|
||||
display: "Max TAs"
|
||||
comment: "0~32"
|
||||
smfSelection:
|
||||
display: "Subs Smf Selection"
|
||||
display: "Subs SMF Selection"
|
||||
array:
|
||||
- name: "index"
|
||||
type: "int"
|
||||
@@ -383,14 +383,14 @@ udm:
|
||||
value: "1Gbps"
|
||||
access: "read-write"
|
||||
filter: '^\d+(\.\d+)?( ?)(bps|Kbps|Mbps|Gbps|Tbps)$'
|
||||
display: "Subscribed Session AMBR UL"
|
||||
display: "Subscribed Session AMBR Uplink"
|
||||
comment: ""
|
||||
- name: "subscribedSessionAmbrDL"
|
||||
type: "regex"
|
||||
value: "2Gbps"
|
||||
access: "read-write"
|
||||
filter: '^\d+(\.\d+)?( ?)(bps|Kbps|Mbps|Gbps|Tbps)$'
|
||||
display: "Subscribed Session AMBR DL"
|
||||
display: "Subscribed Session AMBR Downlink"
|
||||
comment: ""
|
||||
- name: "staticIPAddress"
|
||||
type: "ipv4"
|
||||
|
||||
@@ -261,7 +261,7 @@ upf:
|
||||
value: ""
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "NE Id"
|
||||
display: "NE ID"
|
||||
comment: ""
|
||||
- name: "neName"
|
||||
type: "string"
|
||||
@@ -359,14 +359,14 @@ upf:
|
||||
- name: "type"
|
||||
type: "string"
|
||||
value: "upfd"
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "Type"
|
||||
comment: "Type"
|
||||
- name: "instanceId"
|
||||
type: "int"
|
||||
value: "1"
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: '1~255'
|
||||
display: "Instance ID"
|
||||
comment: "1~255"
|
||||
@@ -412,6 +412,13 @@ upf:
|
||||
filter: ''
|
||||
display: "N3 Heartbeat Interval"
|
||||
comment: "N3 Heartbeat Interval"
|
||||
- name: "rxTxQueueNum"
|
||||
type: "int"
|
||||
value: "1"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "RX TX Queue Num"
|
||||
comment: "RX TX Queue Num"
|
||||
dataForwarderUpfd:
|
||||
display: "Data Forwarder Upfd"
|
||||
list:
|
||||
@@ -1021,14 +1028,14 @@ upf:
|
||||
- name: "ipv4"
|
||||
type: "string"
|
||||
value: "0.0.0.0"
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "IPv4"
|
||||
comment: "IPv4"
|
||||
- name: "ipv4Mask"
|
||||
type: "string"
|
||||
value: "255.255.255.0"
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "IPv4 Mask"
|
||||
comment: "IPv4 Mask"
|
||||
@@ -1050,14 +1057,14 @@ upf:
|
||||
- name: "ipv6"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "IPv6"
|
||||
comment: "IPv6"
|
||||
- name: "ipv6Prefix"
|
||||
type: "int"
|
||||
value: "64"
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: '1~128'
|
||||
display: "IPv6 Prefix"
|
||||
comment: "IPv6 Prefix"
|
||||
@@ -1079,14 +1086,14 @@ upf:
|
||||
- name: "ipv4"
|
||||
type: "string"
|
||||
value: "0.0.0.0"
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "IPv4"
|
||||
comment: "IPv4"
|
||||
- name: "ipv4Mask"
|
||||
type: "string"
|
||||
value: "255.255.255.0"
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "IPv4 Mask"
|
||||
comment: "IPv4 Mask"
|
||||
@@ -1108,14 +1115,14 @@ upf:
|
||||
- name: "ipv6"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "IPv6"
|
||||
comment: "IPv6"
|
||||
- name: "ipv6Prefix"
|
||||
type: "int"
|
||||
value: "64"
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: '1~128'
|
||||
display: "IPv6 Prefix"
|
||||
comment: "IPv6 Prefix"
|
||||
@@ -1190,8 +1197,8 @@ upf:
|
||||
value: "0"
|
||||
access: "read-write"
|
||||
filter: '0~32'
|
||||
display: "N6 Interface Id"
|
||||
comment: "N6 Interface Id"
|
||||
display: "N6 Interface ID"
|
||||
comment: "N6 Interface ID"
|
||||
- name: "qerMaxSupportMbps"
|
||||
type: "int"
|
||||
value: "0"
|
||||
@@ -1451,21 +1458,21 @@ upf:
|
||||
- name: "index"
|
||||
type: "int"
|
||||
value: "1"
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: '1~32'
|
||||
display: "Index"
|
||||
comment: "1~32"
|
||||
- name: "appName"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "APP Name"
|
||||
comment: "APP Name"
|
||||
- name: "proxyEnabled"
|
||||
type: "int"
|
||||
value: "0"
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: '0~1'
|
||||
display: "Proxy Enabled"
|
||||
comment: "Proxy Enabled"
|
||||
@@ -1508,28 +1515,28 @@ upf:
|
||||
- name: "ruleId"
|
||||
type: "int"
|
||||
value: ""
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "Rule ID"
|
||||
comment: "Rule ID"
|
||||
- name: "regexMatch"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "REGEX Match"
|
||||
comment: "REGEX Match"
|
||||
- name: "flowDescription"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "Flow Description"
|
||||
comment: "Flow Description"
|
||||
- name: "customName"
|
||||
type: "string"
|
||||
value: ""
|
||||
access: "read-only"
|
||||
access: "read-write"
|
||||
filter: ''
|
||||
display: "Custom Name"
|
||||
comment: "Custom Name"
|
||||
@@ -1,7 +1,7 @@
|
||||
# Makefile for OMC-OMC-crontask project
|
||||
|
||||
PROJECT = OMC
|
||||
VERSION = 2.2311.8
|
||||
VERSION = 2.2312.8
|
||||
LIBDIR = ems.agt/lib
|
||||
BINNAME = crontask
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Makefile for rest agent project
|
||||
|
||||
PROJECT = OMC
|
||||
VERSION = 2.2311.8
|
||||
VERSION = 2.2312.8
|
||||
RelDate = `date +%Y%m%d`
|
||||
Release = $(RelDate)
|
||||
RelVer = $(VERSION)-$(RelDate)
|
||||
|
||||
1638
database/backup/omc_db.sql
Normal file
1638
database/backup/omc_db.sql
Normal file
File diff suppressed because it is too large
Load Diff
@@ -3,15 +3,142 @@ SET FOREIGN_KEY_CHECKS=0;
|
||||
INSERT IGNORE INTO `omc_db`.`user` (`id`,`account_id`, `name`, `real_name`, `sn`, `gender`, `email`, `id_card_number`, `description`, `telephone_number`, `phone`, `mobile`, `employee_number`, `employee_type`, `organize`, `supporter_corp_name`, `start_time`, `end_time`, `password`, `password_sha512`, `change_password_flag`, `password_expiration`, `status`, `user_expiration`, `group_name`, `profile`) VALUES (1, 'admin', 'admin', 'administrator', '', '', 'admin@aa.com', NULL, NULL, NULL, '312', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '$2a$10$QgIcp6yuOEGrEU0TNU12K.uQRLbcufesEU7hiRYlRSSdUO7OAkoTq', '324584ab0b03a5af1899c1801485de8a455a114d5f6ee08a48dbdf7e8f1a047eaaa1789e881f9eb268113f6c6814fa20f43183ffa6e014765f2aa8733c526048', 0000, NULL, 'Active', NULL, 'admin', '{\"color\":{\"critical\":\"#e8994a\",\"event\":\"#c5d2dc\",\"major\":\"#494040\",\"minor\":\"#5f70a8\",\"sound\":\"custom\",\"warning\":\"#b9e1dd\"},\"sound\":\"custom\",\"custom\":\"hrxz.com-exz2s3uxhc47391.mp3\"}');
|
||||
|
||||
-- add default ne info
|
||||
INSERT IGNORE INTO `omc_db`.`ne_info` (`id`, `ne_type`, `ne_id`, `rm_uid`, `ne_name`, `ip`, `port`, `pv_flag`, `province`, `vendor_name`, `dn`, `ne_address`, `status`) VALUES (1, 'OMC', '001', '4400HX101', 'OMC_001', '172.16.5.100', 3030, 'PNF', 'GD', 'AGT', 'TN', '-', 0);
|
||||
INSERT IGNORE INTO `omc_db`.`ne_info` (`id`, `ne_type`, `ne_id`, `rm_uid`, `ne_name`, `ip`, `port`, `pv_flag`, `province`, `vendor_name`, `dn`, `ne_address`, `status`) VALUES (2, 'IMS', '001', '4400HX1IMS001', 'IMS_001', '172.16.5.110', 3030, 'PNF', 'GD', 'AGT', 'TN', '-', 0);
|
||||
INSERT IGNORE INTO `omc_db`.`ne_info` (`id`, `ne_type`, `ne_id`, `rm_uid`, `ne_name`, `ip`, `port`, `pv_flag`, `province`, `vendor_name`, `dn`, `ne_address`, `status`) VALUES (3, 'AMF', '001', '4400HX1AMF001', 'AMF_001', '172.16.5.120', 3030, 'PNF', 'GD', 'AGT', 'TN', '-', 0);
|
||||
INSERT IGNORE INTO `omc_db`.`ne_info` (`id`, `ne_type`, `ne_id`, `rm_uid`, `ne_name`, `ip`, `port`, `pv_flag`, `province`, `vendor_name`, `dn`, `ne_address`, `status`) VALUES (4, 'AUSF', '001', '4400HX1AUF001', 'AUSF_001', '172.16.5.130', 3030, 'PNF', 'GD', 'AGT', 'TN', '-', 0);
|
||||
INSERT IGNORE INTO `omc_db`.`ne_info` (`id`, `ne_type`, `ne_id`, `rm_uid`, `ne_name`, `ip`, `port`, `pv_flag`, `province`, `vendor_name`, `dn`, `ne_address`, `status`) VALUES (5, 'UDM', '001', '4400HX1UDM001', 'UDM_001', '172.16.5.140', 3030, 'PNF', 'GD', 'AGT', 'TN', '-', 0);
|
||||
INSERT IGNORE INTO `omc_db`.`ne_info` (`id`, `ne_type`, `ne_id`, `rm_uid`, `ne_name`, `ip`, `port`, `pv_flag`, `province`, `vendor_name`, `dn`, `ne_address`, `status`) VALUES (6, 'SMF', '001', '4400HX1SMF001', 'SMF_001', '172.16.5.150', 3030, 'PNF', 'GD', 'AGT', 'TN', '-', 0);
|
||||
INSERT IGNORE INTO `omc_db`.`ne_info` (`id`, `ne_type`, `ne_id`, `rm_uid`, `ne_name`, `ip`, `port`, `pv_flag`, `province`, `vendor_name`, `dn`, `ne_address`, `status`) VALUES (7, 'PCF', '001', '4400HX1PCF001', 'PCF_001', '172.16.5.160', 3030, 'PNF', 'GD', 'AGT', 'TN', '-', 0);
|
||||
INSERT IGNORE INTO `omc_db`.`ne_info` (`id`, `ne_type`, `ne_id`, `rm_uid`, `ne_name`, `ip`, `port`, `pv_flag`, `province`, `vendor_name`, `dn`, `ne_address`, `status`) VALUES (8, 'NSSF', '001', '4400HX1NSF001', 'NSSF_001', '172.16.5.170', 3030, 'PNF', 'GD', 'AGT', 'TN', '-', 0);
|
||||
INSERT IGNORE INTO `omc_db`.`ne_info` (`id`, `ne_type`, `ne_id`, `rm_uid`, `ne_name`, `ip`, `port`, `pv_flag`, `province`, `vendor_name`, `dn`, `ne_address`, `status`) VALUES (9, 'NRF', '001', '4400HX1NRF001', 'NRF_001', '172.16.5.180', 3030, 'PNF', 'GD', 'AGT', 'TN', '-', 0);
|
||||
INSERT IGNORE INTO `omc_db`.`ne_info` (`id`, `ne_type`, `ne_id`, `rm_uid`, `ne_name`, `ip`, `port`, `pv_flag`, `province`, `vendor_name`, `dn`, `ne_address`, `status`) VALUES (10, 'UPF', '001', '4400HX1UPF001', 'UPF_001', '172.16.5.190', 3030, 'PNF', 'GD', 'AGT', 'TN', '-', 0);
|
||||
INSERT IGNORE INTO `omc_db`.`ne_info` (`id`, `ne_type`, `ne_id`, `rm_uid`, `ne_name`, `ip`, `port`, `pv_flag`, `province`, `vendor_name`, `dn`, `ne_address`, `status`) VALUES (1, 'OMC', '001', '4400HX101', 'OMC_001', '172.16.5.100', 3030, 'PNF', '-', 'AGrandTech', '-', '-', 0);
|
||||
INSERT IGNORE INTO `omc_db`.`ne_info` (`id`, `ne_type`, `ne_id`, `rm_uid`, `ne_name`, `ip`, `port`, `pv_flag`, `province`, `vendor_name`, `dn`, `ne_address`, `status`) VALUES (2, 'IMS', '001', '4400HX1IMS001', 'IMS_001', '172.16.5.110', 3030, 'PNF', '-', 'AGrandTech', '-', '-', 0);
|
||||
INSERT IGNORE INTO `omc_db`.`ne_info` (`id`, `ne_type`, `ne_id`, `rm_uid`, `ne_name`, `ip`, `port`, `pv_flag`, `province`, `vendor_name`, `dn`, `ne_address`, `status`) VALUES (3, 'AMF', '001', '4400HX1AMF001', 'AMF_001', '172.16.5.120', 3030, 'PNF', '-', 'AGrandTech', '-', '-', 0);
|
||||
INSERT IGNORE INTO `omc_db`.`ne_info` (`id`, `ne_type`, `ne_id`, `rm_uid`, `ne_name`, `ip`, `port`, `pv_flag`, `province`, `vendor_name`, `dn`, `ne_address`, `status`) VALUES (4, 'AUSF', '001', '4400HX1AUF001', 'AUSF_001', '172.16.5.130', 3030, 'PNF', '-', 'AGrandTech', '-', '-', 0);
|
||||
INSERT IGNORE INTO `omc_db`.`ne_info` (`id`, `ne_type`, `ne_id`, `rm_uid`, `ne_name`, `ip`, `port`, `pv_flag`, `province`, `vendor_name`, `dn`, `ne_address`, `status`) VALUES (5, 'UDM', '001', '4400HX1UDM001', 'UDM_001', '172.16.5.140', 3030, 'PNF', '-', 'AGrandTech', '-', '-', 0);
|
||||
INSERT IGNORE INTO `omc_db`.`ne_info` (`id`, `ne_type`, `ne_id`, `rm_uid`, `ne_name`, `ip`, `port`, `pv_flag`, `province`, `vendor_name`, `dn`, `ne_address`, `status`) VALUES (6, 'SMF', '001', '4400HX1SMF001', 'SMF_001', '172.16.5.150', 3030, 'PNF', '-', 'AGrandTech', '-', '-', 0);
|
||||
INSERT IGNORE INTO `omc_db`.`ne_info` (`id`, `ne_type`, `ne_id`, `rm_uid`, `ne_name`, `ip`, `port`, `pv_flag`, `province`, `vendor_name`, `dn`, `ne_address`, `status`) VALUES (7, 'PCF', '001', '4400HX1PCF001', 'PCF_001', '172.16.5.160', 3030, 'PNF', '-', 'AGrandTech', '-', '-', 0);
|
||||
INSERT IGNORE INTO `omc_db`.`ne_info` (`id`, `ne_type`, `ne_id`, `rm_uid`, `ne_name`, `ip`, `port`, `pv_flag`, `province`, `vendor_name`, `dn`, `ne_address`, `status`) VALUES (8, 'NSSF', '001', '4400HX1NSF001', 'NSSF_001', '172.16.5.170', 3030, 'PNF', '-', 'AGrandTech', '-', '-', 0);
|
||||
INSERT IGNORE INTO `omc_db`.`ne_info` (`id`, `ne_type`, `ne_id`, `rm_uid`, `ne_name`, `ip`, `port`, `pv_flag`, `province`, `vendor_name`, `dn`, `ne_address`, `status`) VALUES (9, 'NRF', '001', '4400HX1NRF001', 'NRF_001', '172.16.5.180', 3030, 'PNF', '-', 'AGrandTech', '-', '-', 0);
|
||||
INSERT IGNORE INTO `omc_db`.`ne_info` (`id`, `ne_type`, `ne_id`, `rm_uid`, `ne_name`, `ip`, `port`, `pv_flag`, `province`, `vendor_name`, `dn`, `ne_address`, `status`) VALUES (10, 'UPF', '001', '4400HX1UPF001', 'UPF_001', '172.16.5.190', 3030, 'PNF', '-', 'AGrandTech', '-', '-', 0);
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`ne_info` (
|
||||
`id`,
|
||||
`ne_type`,
|
||||
`ne_id`,
|
||||
`rm_uid`,
|
||||
`ne_name`,
|
||||
`ip`,
|
||||
`port`,
|
||||
`pv_flag`,
|
||||
`province`,
|
||||
`vendor_name`,
|
||||
`dn`,
|
||||
`ne_address`,
|
||||
`status`
|
||||
)
|
||||
VALUES (
|
||||
11,
|
||||
'LMF',
|
||||
'001',
|
||||
'4400HX1LMF001',
|
||||
'LMF_001',
|
||||
'172.16.5.200',
|
||||
3030,
|
||||
'PNF',
|
||||
'-',
|
||||
'AGrandTech',
|
||||
'-',
|
||||
'-',
|
||||
0
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`ne_info` (
|
||||
`id`,
|
||||
`ne_type`,
|
||||
`ne_id`,
|
||||
`rm_uid`,
|
||||
`ne_name`,
|
||||
`ip`,
|
||||
`port`,
|
||||
`pv_flag`,
|
||||
`province`,
|
||||
`vendor_name`,
|
||||
`dn`,
|
||||
`ne_address`,
|
||||
`status`
|
||||
)
|
||||
VALUES (
|
||||
12,
|
||||
'NEF',
|
||||
'001',
|
||||
'4400HX1NEF001',
|
||||
'NEF_001',
|
||||
'172.16.5.210',
|
||||
3030,
|
||||
'PNF',
|
||||
'-',
|
||||
'AGrandTech',
|
||||
'-',
|
||||
'-',
|
||||
0
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`ne_info` (
|
||||
`id`,
|
||||
`ne_type`,
|
||||
`ne_id`,
|
||||
`rm_uid`,
|
||||
`ne_name`,
|
||||
`ip`,
|
||||
`port`,
|
||||
`pv_flag`,
|
||||
`province`,
|
||||
`vendor_name`,
|
||||
`dn`,
|
||||
`ne_address`,
|
||||
`status`
|
||||
)
|
||||
VALUES (
|
||||
13,
|
||||
'MME',
|
||||
'001',
|
||||
'4400HX1MME001',
|
||||
'MME_001',
|
||||
'172.16.5.220',
|
||||
3030,
|
||||
'PNF',
|
||||
'-',
|
||||
'AGrandTech',
|
||||
'-',
|
||||
'-',
|
||||
0
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`ne_info` (
|
||||
`id`,
|
||||
`ne_type`,
|
||||
`ne_id`,
|
||||
`rm_uid`,
|
||||
`ne_name`,
|
||||
`ip`,
|
||||
`port`,
|
||||
`pv_flag`,
|
||||
`province`,
|
||||
`vendor_name`,
|
||||
`dn`,
|
||||
`ne_address`,
|
||||
`status`
|
||||
)
|
||||
VALUES (
|
||||
14,
|
||||
'N3IWF',
|
||||
'001',
|
||||
'4400HX1IWF001',
|
||||
'N3IWF_001',
|
||||
'172.16.5.230',
|
||||
3030,
|
||||
'PNF',
|
||||
'-',
|
||||
'AGrandTech',
|
||||
'-',
|
||||
'-',
|
||||
0
|
||||
);
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
@@ -5,8 +5,6 @@ SET FOREIGN_KEY_CHECKS=0;
|
||||
ALTER TABLE
|
||||
`omc_db`.`sys_config` MODIFY COLUMN `config_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '参数键值' AFTER `config_key`;
|
||||
|
||||
-- 参数配置-系统设置属性
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
@@ -21,16 +19,16 @@ INSERT
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
102,
|
||||
'系统设置-LOGO类型',
|
||||
'sys.logo.type',
|
||||
'icon',
|
||||
1,
|
||||
'config.sys.user.initPassword',
|
||||
'sys.user.initPassword',
|
||||
'Abcd@1234..',
|
||||
'Y',
|
||||
'admin',
|
||||
1698112743562,
|
||||
'admin',
|
||||
1698217326676,
|
||||
'全图:brand\n小图:icon'
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'config.sys.user.initPasswordRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
@@ -47,16 +45,16 @@ INSERT
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
103,
|
||||
'系统设置-LOGO文件icon',
|
||||
'sys.logo.filePathIcon',
|
||||
'',
|
||||
2,
|
||||
'config.sys.account.captchaEnabled',
|
||||
'sys.account.captchaEnabled',
|
||||
'false',
|
||||
'Y',
|
||||
'admin',
|
||||
1698112935847,
|
||||
'admin',
|
||||
1698201425536,
|
||||
'文件支持网络地址图片和内部上传的文件路径'
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'config.sys.account.captchaEnabledRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
@@ -73,16 +71,16 @@ INSERT
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
104,
|
||||
'系统设置-系统名称',
|
||||
'sys.title',
|
||||
'核心网管理系统',
|
||||
3,
|
||||
'config.sys.account.registerUser',
|
||||
'sys.account.registerUser',
|
||||
'false',
|
||||
'Y',
|
||||
'admin',
|
||||
1698113035648,
|
||||
'admin',
|
||||
1698217311606,
|
||||
'系统名称长度限制11位字符串'
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'config.sys.account.registerUserRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
@@ -99,70 +97,18 @@ INSERT
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
105,
|
||||
'系统设置-版权声明',
|
||||
'sys.copyright',
|
||||
'Copyright ©2023 for AGrandTech',
|
||||
4,
|
||||
'config.sys.user.maxRetryCount',
|
||||
'sys.user.maxRetryCount',
|
||||
'5',
|
||||
'Y',
|
||||
'admin',
|
||||
1698113158157,
|
||||
'admin',
|
||||
1698220040192,
|
||||
'底脚固定条,左侧放置版权声明'
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'config.sys.user.maxRetryCountRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
`config_name`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`,
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
106,
|
||||
'系统设置-LOGO文件brand',
|
||||
'sys.logo.filePathBrand',
|
||||
'',
|
||||
'Y',
|
||||
'admin',
|
||||
1698112935847,
|
||||
'admin',
|
||||
1698219184041,
|
||||
'文件支持网络地址图片和内部上传的文件路径'
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
`config_name`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`,
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
107,
|
||||
'系统设置-登录界面背景',
|
||||
'sys.loginBackground',
|
||||
'',
|
||||
'Y',
|
||||
'admin',
|
||||
1698205046084,
|
||||
'admin',
|
||||
1698217285996,
|
||||
'文件支持网络地址图片和内部上传的文件路径'
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
@@ -178,15 +124,15 @@ INSERT
|
||||
)
|
||||
VALUES (
|
||||
5,
|
||||
'用户管理-密码锁定时间',
|
||||
'config.sys.user.lockTime',
|
||||
'sys.user.lockTime',
|
||||
'10',
|
||||
'Y',
|
||||
'admin',
|
||||
1693911541269,
|
||||
'',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'密码锁定时间,单位分钟(默认10分钟)'
|
||||
'config.sys.user.lockTimeRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
@@ -204,15 +150,15 @@ INSERT
|
||||
)
|
||||
VALUES (
|
||||
6,
|
||||
'用户管理-授权有效时间',
|
||||
'sys.user.expiresIn',
|
||||
'120',
|
||||
'config.sys.officialUrl',
|
||||
'sys.officialUrl',
|
||||
'https://www.agrandtech.com',
|
||||
'Y',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
'admin',
|
||||
1693911541269,
|
||||
'',
|
||||
0,
|
||||
'令牌有效期(默认120分钟)'
|
||||
1700809804330,
|
||||
'config.sys.officialUrlRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
@@ -230,128 +176,17 @@ INSERT
|
||||
)
|
||||
VALUES (
|
||||
7,
|
||||
'用户管理-多端用户授权登录',
|
||||
'sys.user.multi_login',
|
||||
'true',
|
||||
'config.sys.helpDoc',
|
||||
'sys.helpDoc',
|
||||
'/static/helpDoc/{language}_doc.pdf',
|
||||
'Y',
|
||||
'admin',
|
||||
1693911541269,
|
||||
'',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'多端授权登录'
|
||||
'config.sys.helpDocRemark'
|
||||
);
|
||||
|
||||
UPDATE `omc_db`.`sys_config`
|
||||
SET
|
||||
`config_name` = '用户管理-账号初始密码',
|
||||
`config_key` = 'sys.user.initPassword',
|
||||
`config_value` = 'Abcd@1234..',
|
||||
`config_type` = 'Y',
|
||||
`create_by` = 'admin',
|
||||
`create_time` = 1693908079656,
|
||||
`update_by` = '',
|
||||
`update_time` = 0,
|
||||
`remark` = '导入用户初始化密码'
|
||||
WHERE `config_id` = 1;
|
||||
|
||||
UPDATE `omc_db`.`sys_config`
|
||||
SET
|
||||
`config_name` = '账号自助-验证码开关',
|
||||
`config_key` = 'sys.account.captchaEnabled',
|
||||
`config_value` = 'false',
|
||||
`config_type` = 'Y',
|
||||
`create_by` = 'admin',
|
||||
`create_time` = 1693908079667,
|
||||
`update_by` = '',
|
||||
`update_time` = 0,
|
||||
`remark` = '是否开启验证码功能(true开启,false关闭)'
|
||||
WHERE `config_id` = 2;
|
||||
|
||||
UPDATE `omc_db`.`sys_config`
|
||||
SET
|
||||
`config_name` = '账号自助-是否开启用户注册功能',
|
||||
`config_key` = 'sys.account.registerUser',
|
||||
`config_value` = 'false',
|
||||
`config_type` = 'Y',
|
||||
`create_by` = 'admin',
|
||||
`create_time` = 1693908079669,
|
||||
`update_by` = '',
|
||||
`update_time` = 0,
|
||||
`remark` = '是否开启注册用户功能(true开启,false关闭)'
|
||||
WHERE `config_id` = 3;
|
||||
|
||||
UPDATE `omc_db`.`sys_config`
|
||||
SET
|
||||
`config_name` = '用户管理-密码最大错误次数',
|
||||
`config_key` = 'sys.user.maxRetryCount',
|
||||
`config_value` = '5',
|
||||
`config_type` = 'Y',
|
||||
`create_by` = 'admin',
|
||||
`create_time` = 1693908079680,
|
||||
`update_by` = '',
|
||||
`update_time` = 0,
|
||||
`remark` = '密码最大错误次数'
|
||||
WHERE `config_id` = 4;
|
||||
|
||||
UPDATE `omc_db`.`sys_config`
|
||||
SET
|
||||
`config_name` = '测试',
|
||||
`config_key` = 'test',
|
||||
`config_value` = 'test',
|
||||
`config_type` = 'Y',
|
||||
`create_by` = 'admin',
|
||||
`create_time` = 1693911541269,
|
||||
`update_by` = 'admin',
|
||||
`update_time` = 1693911586418,
|
||||
`remark` = '测试'
|
||||
WHERE `config_id` = 100;
|
||||
|
||||
-- 参数配置-系统设置属性
|
||||
|
||||
DELETE FROM
|
||||
`omc_db`.`sys_config`
|
||||
WHERE
|
||||
`config_id` = 100
|
||||
and `config_key` = 'test';
|
||||
|
||||
DELETE FROM
|
||||
`omc_db`.`sys_config`
|
||||
WHERE
|
||||
`config_id` != 102
|
||||
and `config_key` = 'sys.logo.type';
|
||||
|
||||
DELETE FROM
|
||||
`omc_db`.`sys_config`
|
||||
WHERE
|
||||
`config_id` != 103
|
||||
and `config_key` = 'sys.logo.filePathIcon';
|
||||
|
||||
DELETE FROM
|
||||
`omc_db`.`sys_config`
|
||||
WHERE
|
||||
`config_id` != 104
|
||||
and `config_key` = 'sys.title';
|
||||
|
||||
DELETE FROM
|
||||
`omc_db`.`sys_config`
|
||||
WHERE
|
||||
`config_id` != 105
|
||||
and `config_key` = 'sys.copyright';
|
||||
|
||||
DELETE FROM
|
||||
`omc_db`.`sys_config`
|
||||
WHERE
|
||||
`config_id` != 106
|
||||
and `config_key` = 'sys.logo.filePathBrand';
|
||||
|
||||
DELETE FROM
|
||||
`omc_db`.`sys_config`
|
||||
WHERE
|
||||
`config_id` != 107
|
||||
and `config_key` = 'sys.loginBackground';
|
||||
|
||||
-- 参数配置-监控-系统资源
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
@@ -367,15 +202,275 @@ INSERT
|
||||
)
|
||||
VALUES (
|
||||
10,
|
||||
'监控-系统资源-数据保留时长',
|
||||
'config.monitor.sysResource.storeDays',
|
||||
'monitor.sysResource.storeDays',
|
||||
'30',
|
||||
'Y',
|
||||
'admin',
|
||||
1698483370391,
|
||||
'',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'监控-系统资源-数据保留时长,单位天。根据当前日期,删除超过保留时长的日期数据信息。'
|
||||
'config.monitor.sysResource.storeDaysRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
`config_name`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`,
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
102,
|
||||
'config.sys.logo.type',
|
||||
'sys.logo.type',
|
||||
'icon',
|
||||
'Y',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
'admin',
|
||||
1701252674635,
|
||||
'config.sys.logo.typeRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
`config_name`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`,
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
103,
|
||||
'config.sys.logo.filePathIcon',
|
||||
'sys.logo.filePathIcon',
|
||||
'#',
|
||||
'Y',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
'admin',
|
||||
1701251070089,
|
||||
'config.sys.logo.filePathIconRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
`config_name`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`,
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
104,
|
||||
'config.sys.logo.filePathBrand',
|
||||
'sys.logo.filePathBrand',
|
||||
'#',
|
||||
'Y',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
'admin',
|
||||
1701251023781,
|
||||
'config.sys.logo.filePathBrandRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
`config_name`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`,
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
105,
|
||||
'config.sys.loginBackground',
|
||||
'sys.loginBackground',
|
||||
'#',
|
||||
'Y',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'config.sys.loginBackgroundRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
`config_name`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`,
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
106,
|
||||
'config.sys.title',
|
||||
'sys.title',
|
||||
'config.sys.titleValue',
|
||||
'Y',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'config.sys.titleRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
`config_name`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`,
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
107,
|
||||
'config.sys.copyright',
|
||||
'sys.copyright',
|
||||
'config.sys.copyrightValue',
|
||||
'Y',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'config.sys.copyrightRemark'
|
||||
);
|
||||
|
||||
INSERT IGNORE INTO
|
||||
`omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
`config_name`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`,
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
108,
|
||||
'config.sys.i18nOpen',
|
||||
'sys.i18n.open',
|
||||
'true',
|
||||
'Y',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'config.sys.i18nOpenRemark'
|
||||
);
|
||||
|
||||
INSERT IGNORE INTO
|
||||
`omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
`config_name`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`,
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
109,
|
||||
'config.sys.i18nDefault',
|
||||
'sys.i18n.default',
|
||||
'en_US',
|
||||
'Y',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'config.sys.i18nDefaultRemark'
|
||||
);
|
||||
|
||||
UPDATE `omc_db`.`sys_config`
|
||||
SET
|
||||
`config_name` = 'config.sys.helpDoc',
|
||||
`config_key` = 'sys.helpDoc',
|
||||
`config_value` = '/static/helpDoc/{language}_doc.pdf',
|
||||
`config_type` = 'Y',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698110000000,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'config.sys.helpDocRemark'
|
||||
WHERE `config_id` = 7;
|
||||
|
||||
UPDATE `omc_db`.`sys_config`
|
||||
SET
|
||||
`config_name` = 'config.sys.logo.type',
|
||||
`config_key` = 'sys.logo.type',
|
||||
`config_value` = 'brand',
|
||||
`config_type` = 'Y',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698110000000,
|
||||
`update_by` = 'admin',
|
||||
`update_time` = 1701834845928,
|
||||
`remark` = 'config.sys.logo.typeRemark'
|
||||
WHERE `config_id` = 102;
|
||||
|
||||
UPDATE `omc_db`.`sys_config`
|
||||
SET
|
||||
`config_name` = 'config.sys.logo.filePathIcon',
|
||||
`config_key` = 'sys.logo.filePathIcon',
|
||||
`config_value` = '/static/logo/{language}_icon.png',
|
||||
`config_type` = 'Y',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698110000000,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'config.sys.logo.filePathIconRemark'
|
||||
WHERE `config_id` = 103;
|
||||
|
||||
UPDATE `omc_db`.`sys_config`
|
||||
SET
|
||||
`config_name` = 'config.sys.logo.filePathBrand',
|
||||
`config_key` = 'sys.logo.filePathBrand',
|
||||
`config_value` = '/static/logo/{language}_brand.png',
|
||||
`config_type` = 'Y',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698110000000,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'config.sys.logo.filePathBrandRemark'
|
||||
WHERE `config_id` = 104;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=1;
|
||||
@@ -88,4 +88,39 @@ VALUES (
|
||||
NULL
|
||||
);
|
||||
|
||||
-- for cn/en locale
|
||||
UPDATE `omc_db`.`sys_dept`
|
||||
SET
|
||||
`parent_id` = 0,
|
||||
`ancestors` = '0',
|
||||
`dept_name` = 'dept.root',
|
||||
`order_num` = 0,
|
||||
`leader` = 'supervisor',
|
||||
`phone` = NULL,
|
||||
`email` = NULL,
|
||||
`status` = '1',
|
||||
`del_flag` = '0',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1699348237468,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0
|
||||
WHERE `dept_id` = 100;
|
||||
|
||||
UPDATE `omc_db`.`sys_dept`
|
||||
SET
|
||||
`parent_id` = 100,
|
||||
`ancestors` = '0,100',
|
||||
`dept_name` = 'dept.root.item1',
|
||||
`order_num` = 1,
|
||||
`leader` = 'supervisor',
|
||||
`phone` = NULL,
|
||||
`email` = NULL,
|
||||
`status` = '1',
|
||||
`del_flag` = '0',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1699348237468,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0
|
||||
WHERE `dept_id` = 101;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=1;
|
||||
@@ -37,6 +37,13 @@ CREATE TABLE IF NOT EXISTS `omc_db`.`sys_job` (
|
||||
PRIMARY KEY (`job_id`, `job_name`, `job_group`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '调度任务调度表' ROW_FORMAT = Dynamic;
|
||||
|
||||
ALTER TABLE
|
||||
`omc_db`.`sys_job` DROP PRIMARY KEY,
|
||||
ADD
|
||||
PRIMARY KEY (`job_id`) USING BTREE,
|
||||
ADD
|
||||
UNIQUE INDEX IF NOT EXISTS `idx_uni_name_group`(`job_name`, `job_group`) USING BTREE COMMENT 'unique index for job_name and job_group';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_job
|
||||
-- ----------------------------
|
||||
@@ -99,7 +106,7 @@ VALUES (
|
||||
'删除过期网元备份文件',
|
||||
'SYSTEM',
|
||||
'delExpiredNeBackup',
|
||||
'{\"duration\":90}',
|
||||
'{\"duration\":60}',
|
||||
'0 20 0 * * ?',
|
||||
'3',
|
||||
'0',
|
||||
@@ -109,7 +116,7 @@ VALUES (
|
||||
1697091151529,
|
||||
'admin',
|
||||
1698134207967,
|
||||
'删除过期网元etc备份文件, 传入参数表示保留90天的备份文件, 默认60天'
|
||||
'删除过期网元etc备份文件, 传入参数表示保留{duration}天的备份文件, 默认60天'
|
||||
);
|
||||
|
||||
INSERT IGNORE INTO
|
||||
@@ -135,7 +142,7 @@ VALUES (
|
||||
'删除过期历史告警记录',
|
||||
'SYSTEM',
|
||||
'deleteExpiredRecord',
|
||||
'{\"duration\":34,\"tableName\":\"alarm\",\"colName\":\"event_time\",\"extras\":\"alarm_status=\'0\'\"}',
|
||||
'{\"duration\":90,\"tableName\":\"alarm\",\"colName\":\"event_time\",\"extras\":\"alarm_status=\'0\'\"}',
|
||||
'0 10 0 * * ?',
|
||||
'3',
|
||||
'0',
|
||||
@@ -145,7 +152,7 @@ VALUES (
|
||||
1698150591601,
|
||||
'admin',
|
||||
1698197292003,
|
||||
'删除过期历史告警记录,传入参数表示保留90天的历史告警记录'
|
||||
'删除过期历史告警记录,传入参数表示保留{duration}天的历史告警记录'
|
||||
);
|
||||
|
||||
INSERT IGNORE INTO
|
||||
@@ -171,7 +178,7 @@ VALUES (
|
||||
'删除过期黄金指标记录',
|
||||
'SYSTEM',
|
||||
'deleteExpiredRecord',
|
||||
'{\"duration\":39,\"tableName\":\"gold_kpi\",\"colName\":\"date\"}',
|
||||
'{\"duration\":15,\"tableName\":\"gold_kpi\",\"colName\":\"date\"}',
|
||||
'0 15 0 * * ?',
|
||||
'3',
|
||||
'0',
|
||||
@@ -181,7 +188,7 @@ VALUES (
|
||||
1698197983126,
|
||||
'admin',
|
||||
1698198074872,
|
||||
'黄金指标记录保留60天'
|
||||
'黄金指标记录保留{duration}天'
|
||||
);
|
||||
|
||||
INSERT IGNORE INTO
|
||||
@@ -220,8 +227,102 @@ VALUES (
|
||||
'自动备份网元etc目录下的配置文件'
|
||||
);
|
||||
|
||||
-- 调度任务记录日志字段
|
||||
UPDATE `omc_db`.`sys_job`
|
||||
SET
|
||||
`invoke_target` = 'monitor_sys_resource',
|
||||
`job_name` = 'job.monitor_sys_resource',
|
||||
`target_params` = '{\"interval\":5}',
|
||||
`cron_expression` = '0 0/5 * * * ?',
|
||||
`misfire_policy` = '3',
|
||||
`concurrent` = '0',
|
||||
`status` = '1',
|
||||
`save_log` = '0',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698478134839,
|
||||
`update_by` = 'supervisor',
|
||||
`update_time` = 1700566657587,
|
||||
`remark` = 'job.monitor_sys_resource_remark'
|
||||
WHERE
|
||||
`job_id` = 1
|
||||
AND `job_group` = 'SYSTEM';
|
||||
|
||||
UPDATE `omc_db`.`sys_job`
|
||||
SET
|
||||
`invoke_target` = 'delExpiredNeBackup',
|
||||
`job_name` = 'job.delExpiredNeBackup',
|
||||
`target_params` = '{\"duration\":60}',
|
||||
`cron_expression` = '0 20 0 * * ?',
|
||||
`misfire_policy` = '3',
|
||||
`concurrent` = '0',
|
||||
`status` = '1',
|
||||
`save_log` = '1',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698478134840,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'job.delExpiredNeBackupRemark'
|
||||
WHERE
|
||||
`job_id` = 4
|
||||
AND `job_group` = 'SYSTEM';
|
||||
|
||||
UPDATE `omc_db`.`sys_job`
|
||||
SET
|
||||
`invoke_target` = 'deleteExpiredRecord',
|
||||
`job_name` = 'job.deleteExpiredAlarmRecord',
|
||||
`target_params` = '{\"duration\":90,\"tableName\":\"alarm\",\"colName\":\"event_time\",\"extras\":\"alarm_status=\'0\'\"}',
|
||||
`cron_expression` = '0 10 0 * * ?',
|
||||
`misfire_policy` = '3',
|
||||
`concurrent` = '0',
|
||||
`status` = '1',
|
||||
`save_log` = '1',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698478134841,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'job.deleteExpiredAlarmRecordRemark'
|
||||
WHERE
|
||||
`job_id` = 5
|
||||
AND `job_group` = 'SYSTEM';
|
||||
|
||||
UPDATE `omc_db`.`sys_job`
|
||||
SET
|
||||
`invoke_target` = 'deleteExpiredRecord',
|
||||
`job_name` = 'job.deleteExpiredKpiRecord',
|
||||
`target_params` = '{\"duration\":15,\"tableName\":\"gold_kpi\",\"colName\":\"date\"}',
|
||||
`cron_expression` = '0 15 0 * * ?',
|
||||
`misfire_policy` = '3',
|
||||
`concurrent` = '0',
|
||||
`status` = '1',
|
||||
`save_log` = '1',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698478134842,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'job.deleteExpiredKpiRecordRemark'
|
||||
WHERE
|
||||
`job_id` = 6
|
||||
AND `job_group` = 'SYSTEM';
|
||||
|
||||
UPDATE `omc_db`.`sys_job`
|
||||
SET
|
||||
`invoke_target` = 'backupEtcFromNE',
|
||||
`job_name` = 'job.backupEtcFromNE',
|
||||
`target_params` = NULL,
|
||||
`cron_expression` = '0 30 0 * * ?',
|
||||
`misfire_policy` = '3',
|
||||
`concurrent` = '0',
|
||||
`status` = '1',
|
||||
`save_log` = '1',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698478134843,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'job.backupEtcFromNERemark'
|
||||
WHERE
|
||||
`job_id` = 7
|
||||
AND `job_group` = 'SYSTEM';
|
||||
|
||||
-- 调度任务记录日志字段
|
||||
UPDATE `omc_db`.`sys_job` SET `save_log` = '1';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
@@ -120,4 +120,57 @@ VALUES (
|
||||
''
|
||||
);
|
||||
|
||||
-- for cn/en locales
|
||||
UPDATE `omc_db`.`sys_post`
|
||||
SET
|
||||
`post_code` = 'administator',
|
||||
`post_name` = 'post.admin',
|
||||
`post_sort` = 1,
|
||||
`status` = '1',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1697110106499,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = NULL
|
||||
WHERE `post_id` = 1;
|
||||
|
||||
UPDATE `omc_db`.`sys_post`
|
||||
SET
|
||||
`post_code` = 'operator',
|
||||
`post_name` = 'post.operator',
|
||||
`post_sort` = 2,
|
||||
`status` = '1',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1697110106499,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = NULL
|
||||
WHERE `post_id` = 2;
|
||||
|
||||
UPDATE `omc_db`.`sys_post`
|
||||
SET
|
||||
`post_code` = 'monitor',
|
||||
`post_name` = 'post.monitor',
|
||||
`post_sort` = 3,
|
||||
`status` = '1',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1697110106499,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = NULL
|
||||
WHERE `post_id` = 3;
|
||||
|
||||
UPDATE `omc_db`.`sys_post`
|
||||
SET
|
||||
`post_code` = 'visitor',
|
||||
`post_name` = 'post.visitor',
|
||||
`post_sort` = 4,
|
||||
`status` = '1',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1697110106499,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = NULL
|
||||
WHERE `post_id` = 4;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=1;
|
||||
@@ -172,4 +172,90 @@ VALUES (
|
||||
'普通用户 只可看系统相关信息'
|
||||
);
|
||||
|
||||
-- for cn/en locales
|
||||
UPDATE `omc_db`.`sys_role`
|
||||
SET
|
||||
`role_name` = 'role.admin',
|
||||
`role_key` = 'supervisor',
|
||||
`role_sort` = 1,
|
||||
`data_scope` = '1',
|
||||
`menu_check_strictly` = '1',
|
||||
`dept_check_strictly` = '1',
|
||||
`status` = '1',
|
||||
`del_flag` = '0',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1697091437683,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'role.adminRemark'
|
||||
WHERE `role_id` = 1;
|
||||
|
||||
UPDATE `omc_db`.`sys_role`
|
||||
SET
|
||||
`role_name` = 'role.adminAssign',
|
||||
`role_key` = 'administrator',
|
||||
`role_sort` = 2,
|
||||
`data_scope` = '1',
|
||||
`menu_check_strictly` = '1',
|
||||
`dept_check_strictly` = '1',
|
||||
`status` = '1',
|
||||
`del_flag` = '0',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698486915894,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'role.adminAssignRemark'
|
||||
WHERE `role_id` = 2;
|
||||
|
||||
UPDATE `omc_db`.`sys_role`
|
||||
SET
|
||||
`role_name` = 'role.operator',
|
||||
`role_key` = 'operator',
|
||||
`role_sort` = 3,
|
||||
`data_scope` = '1',
|
||||
`menu_check_strictly` = '1',
|
||||
`dept_check_strictly` = '1',
|
||||
`status` = '1',
|
||||
`del_flag` = '0',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698486934900,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'role.operatorRemark'
|
||||
WHERE `role_id` = 3;
|
||||
|
||||
UPDATE `omc_db`.`sys_role`
|
||||
SET
|
||||
`role_name` = 'role.monitor',
|
||||
`role_key` = 'monitor',
|
||||
`role_sort` = 4,
|
||||
`data_scope` = '1',
|
||||
`menu_check_strictly` = '1',
|
||||
`dept_check_strictly` = '1',
|
||||
`status` = '1',
|
||||
`del_flag` = '0',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698486950714,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'role.monitorRemark'
|
||||
WHERE `role_id` = 4;
|
||||
|
||||
UPDATE `omc_db`.`sys_role`
|
||||
SET
|
||||
`role_name` = 'role.vistor',
|
||||
`role_key` = 'vistor',
|
||||
`role_sort` = 5,
|
||||
`data_scope` = '1',
|
||||
`menu_check_strictly` = '1',
|
||||
`dept_check_strictly` = '1',
|
||||
`status` = '1',
|
||||
`del_flag` = '0',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698486975779,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'role.vistorRemark'
|
||||
WHERE `role_id` = 5;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=1;
|
||||
@@ -298,7 +298,7 @@ VALUES (2, 2075);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (2, 2076);
|
||||
VALUES (2, 2118);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
@@ -586,7 +586,7 @@ VALUES (3, 2075);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2076);
|
||||
VALUES (3, 2118);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
@@ -816,4 +816,228 @@ INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (5, 2082);
|
||||
|
||||
DELETE FROM
|
||||
`omc_db`.`sys_role_menu`
|
||||
WHERE
|
||||
`role_id` = '2'
|
||||
AND `menu_id` = '2076';
|
||||
|
||||
DELETE FROM `omc_db`.`sys_role_menu` WHERE `role_id` = '3';
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 1);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 4);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 5);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 108);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 112);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 115);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 500);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 501);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 1030);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 1031);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 1032);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 1034);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 1039);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 1042);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 1048);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2009);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2010);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2075);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2078);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2080);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2081);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2082);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2083);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2084);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2085);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2086);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2087);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2088);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2089);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2091);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2092);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2094);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2097);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2098);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2099);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2100);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2101);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2102);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2103);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2104);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2105);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2106);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2107);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2108);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2109);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2111);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2112);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2113);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2118);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (2, 2119);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (2, 2120);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (2, 2121);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (2, 2122);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (2, 2123);
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=1;
|
||||
@@ -33,23 +33,15 @@ ADD COLUMN IF NOT EXISTS `updated_at` datetime NULL AFTER `created_at`,
|
||||
ADD COLUMN IF NOT EXISTS `deleted_at` datetime NULL AFTER `updated_at`;
|
||||
|
||||
ALTER TABLE `omc_db`.`permission`
|
||||
DROP INDEX IF EXISTS `permission_name`,
|
||||
ADD UNIQUE INDEX `permission_name`(`permission_name`) USING BTREE;
|
||||
|
||||
ALTER TABLE `omc_db`.`ne_software`
|
||||
DROP COLUMN IF EXISTS `patch_time`,
|
||||
ADD COLUMN IF NOT EXISTS `patch_time` datetime NULL AFTER `update_time`;
|
||||
ADD UNIQUE INDEX IF NOT EXISTS `permission_name`(`permission_name`) USING BTREE;
|
||||
|
||||
ALTER TABLE `omc_db`.`alarm_log`
|
||||
DROP COLUMN IF EXISTS `alarm_seq`,
|
||||
ADD COLUMN IF NOT EXISTS `alarm_seq` int NULL AFTER `ne_id`;
|
||||
|
||||
ALTER TABLE `omc_db`.`ne_software`
|
||||
DROP COLUMN IF EXISTS `patch_time`,
|
||||
ADD COLUMN IF NOT EXISTS `patch_time` datetime NULL AFTER `update_time`;
|
||||
|
||||
ALTER TABLE `omc_db`.`nbi_alarm_log`
|
||||
DROP COLUMN IF EXISTS `alarm_status`,
|
||||
ADD COLUMN IF NOT EXISTS `alarm_status` int NULL COMMENT '0/1: 清除告警/活动告警' AFTER `alarm_code`;
|
||||
|
||||
ALTER TABLE `omc_db`.`cert_info` DROP INDEX IF EXISTS `idx_netype_neid`;
|
||||
@@ -130,4 +122,21 @@ ADD
|
||||
ALTER TABLE
|
||||
`omc_db`.`mml_system`
|
||||
ADD
|
||||
COLUMN IF NOT EXISTS `status` enum('Active', 'Inactive') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'Active' COMMENT '激活: Active 未激活: Inactive' AFTER `param_json`;
|
||||
COLUMN IF NOT EXISTS `status` enum('Active', 'Inactive') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'Active' COMMENT '激活: Active 未激活: Inactive' AFTER `param_json`;
|
||||
|
||||
ALTER TABLE
|
||||
`omc_db`.`system_log`
|
||||
ADD
|
||||
COLUMN IF NOT EXISTS `operation` varchar(16) NULL AFTER `process_id`;
|
||||
|
||||
UPDATE ne_info SET `province` = '-' WHERE `province` = 'GD';
|
||||
|
||||
UPDATE ne_info
|
||||
SET
|
||||
`vendor_name` = "AGrandTech"
|
||||
WHERE `vendor_name` = "AGT";
|
||||
|
||||
UPDATE ne_info SET `dn` = "-" WHERE `dn` = "TN";
|
||||
|
||||
ALTER TABLE
|
||||
`omc_db`.`sys_dept` MODIFY COLUMN `dept_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '部门名称' AFTER `ancestors`;
|
||||
@@ -5,8 +5,6 @@ SET FOREIGN_KEY_CHECKS=0;
|
||||
ALTER TABLE
|
||||
`omc_db`.`sys_config` MODIFY COLUMN `config_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '参数键值' AFTER `config_key`;
|
||||
|
||||
-- 参数配置-系统设置属性
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
@@ -21,16 +19,16 @@ INSERT
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
102,
|
||||
'系统设置-LOGO类型',
|
||||
'sys.logo.type',
|
||||
'icon',
|
||||
1,
|
||||
'config.sys.user.initPassword',
|
||||
'sys.user.initPassword',
|
||||
'Abcd@1234..',
|
||||
'Y',
|
||||
'admin',
|
||||
1698112743562,
|
||||
'admin',
|
||||
1698217326676,
|
||||
'全图:brand\n小图:icon'
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'config.sys.user.initPasswordRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
@@ -47,16 +45,16 @@ INSERT
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
103,
|
||||
'系统设置-LOGO文件icon',
|
||||
'sys.logo.filePathIcon',
|
||||
'',
|
||||
2,
|
||||
'config.sys.account.captchaEnabled',
|
||||
'sys.account.captchaEnabled',
|
||||
'false',
|
||||
'Y',
|
||||
'admin',
|
||||
1698112935847,
|
||||
'admin',
|
||||
1698201425536,
|
||||
'文件支持网络地址图片和内部上传的文件路径'
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'config.sys.account.captchaEnabledRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
@@ -73,16 +71,16 @@ INSERT
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
104,
|
||||
'系统设置-系统名称',
|
||||
'sys.title',
|
||||
'核心网管理系统',
|
||||
3,
|
||||
'config.sys.account.registerUser',
|
||||
'sys.account.registerUser',
|
||||
'false',
|
||||
'Y',
|
||||
'admin',
|
||||
1698113035648,
|
||||
'admin',
|
||||
1698217311606,
|
||||
'系统名称长度限制11位字符串'
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'config.sys.account.registerUserRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
@@ -99,70 +97,18 @@ INSERT
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
105,
|
||||
'系统设置-版权声明',
|
||||
'sys.copyright',
|
||||
'Copyright ©2023 for AGrandTech',
|
||||
4,
|
||||
'config.sys.user.maxRetryCount',
|
||||
'sys.user.maxRetryCount',
|
||||
'5',
|
||||
'Y',
|
||||
'admin',
|
||||
1698113158157,
|
||||
'admin',
|
||||
1698220040192,
|
||||
'底脚固定条,左侧放置版权声明'
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'config.sys.user.maxRetryCountRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
`config_name`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`,
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
106,
|
||||
'系统设置-LOGO文件brand',
|
||||
'sys.logo.filePathBrand',
|
||||
'',
|
||||
'Y',
|
||||
'admin',
|
||||
1698112935847,
|
||||
'admin',
|
||||
1698219184041,
|
||||
'文件支持网络地址图片和内部上传的文件路径'
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
`config_name`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`,
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
107,
|
||||
'系统设置-登录界面背景',
|
||||
'sys.loginBackground',
|
||||
'',
|
||||
'Y',
|
||||
'admin',
|
||||
1698205046084,
|
||||
'admin',
|
||||
1698217285996,
|
||||
'文件支持网络地址图片和内部上传的文件路径'
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
@@ -178,15 +124,15 @@ INSERT
|
||||
)
|
||||
VALUES (
|
||||
5,
|
||||
'用户管理-密码锁定时间',
|
||||
'config.sys.user.lockTime',
|
||||
'sys.user.lockTime',
|
||||
'10',
|
||||
'Y',
|
||||
'admin',
|
||||
1693911541269,
|
||||
'',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'密码锁定时间,单位分钟(默认10分钟)'
|
||||
'config.sys.user.lockTimeRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
@@ -204,15 +150,15 @@ INSERT
|
||||
)
|
||||
VALUES (
|
||||
6,
|
||||
'用户管理-授权有效时间',
|
||||
'sys.user.expiresIn',
|
||||
'120',
|
||||
'config.sys.officialUrl',
|
||||
'sys.officialUrl',
|
||||
'https://www.agrandtech.com',
|
||||
'Y',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
'admin',
|
||||
1693911541269,
|
||||
'',
|
||||
0,
|
||||
'令牌有效期(默认120分钟)'
|
||||
1700809804330,
|
||||
'config.sys.officialUrlRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
@@ -230,128 +176,17 @@ INSERT
|
||||
)
|
||||
VALUES (
|
||||
7,
|
||||
'用户管理-多端用户授权登录',
|
||||
'sys.user.multi_login',
|
||||
'true',
|
||||
'config.sys.helpDoc',
|
||||
'sys.helpDoc',
|
||||
'/static/helpDoc/{language}_doc.pdf',
|
||||
'Y',
|
||||
'admin',
|
||||
1693911541269,
|
||||
'',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'多端授权登录'
|
||||
'config.sys.helpDocRemark'
|
||||
);
|
||||
|
||||
UPDATE `omc_db`.`sys_config`
|
||||
SET
|
||||
`config_name` = '用户管理-账号初始密码',
|
||||
`config_key` = 'sys.user.initPassword',
|
||||
`config_value` = 'Abcd@1234..',
|
||||
`config_type` = 'Y',
|
||||
`create_by` = 'admin',
|
||||
`create_time` = 1693908079656,
|
||||
`update_by` = '',
|
||||
`update_time` = 0,
|
||||
`remark` = '导入用户初始化密码'
|
||||
WHERE `config_id` = 1;
|
||||
|
||||
UPDATE `omc_db`.`sys_config`
|
||||
SET
|
||||
`config_name` = '账号自助-验证码开关',
|
||||
`config_key` = 'sys.account.captchaEnabled',
|
||||
`config_value` = 'false',
|
||||
`config_type` = 'Y',
|
||||
`create_by` = 'admin',
|
||||
`create_time` = 1693908079667,
|
||||
`update_by` = '',
|
||||
`update_time` = 0,
|
||||
`remark` = '是否开启验证码功能(true开启,false关闭)'
|
||||
WHERE `config_id` = 2;
|
||||
|
||||
UPDATE `omc_db`.`sys_config`
|
||||
SET
|
||||
`config_name` = '账号自助-是否开启用户注册功能',
|
||||
`config_key` = 'sys.account.registerUser',
|
||||
`config_value` = 'false',
|
||||
`config_type` = 'Y',
|
||||
`create_by` = 'admin',
|
||||
`create_time` = 1693908079669,
|
||||
`update_by` = '',
|
||||
`update_time` = 0,
|
||||
`remark` = '是否开启注册用户功能(true开启,false关闭)'
|
||||
WHERE `config_id` = 3;
|
||||
|
||||
UPDATE `omc_db`.`sys_config`
|
||||
SET
|
||||
`config_name` = '用户管理-密码最大错误次数',
|
||||
`config_key` = 'sys.user.maxRetryCount',
|
||||
`config_value` = '5',
|
||||
`config_type` = 'Y',
|
||||
`create_by` = 'admin',
|
||||
`create_time` = 1693908079680,
|
||||
`update_by` = '',
|
||||
`update_time` = 0,
|
||||
`remark` = '密码最大错误次数'
|
||||
WHERE `config_id` = 4;
|
||||
|
||||
UPDATE `omc_db`.`sys_config`
|
||||
SET
|
||||
`config_name` = '测试',
|
||||
`config_key` = 'test',
|
||||
`config_value` = 'test',
|
||||
`config_type` = 'Y',
|
||||
`create_by` = 'admin',
|
||||
`create_time` = 1693911541269,
|
||||
`update_by` = 'admin',
|
||||
`update_time` = 1693911586418,
|
||||
`remark` = '测试'
|
||||
WHERE `config_id` = 100;
|
||||
|
||||
-- 参数配置-系统设置属性
|
||||
|
||||
DELETE FROM
|
||||
`omc_db`.`sys_config`
|
||||
WHERE
|
||||
`config_id` = 100
|
||||
and `config_key` = 'test';
|
||||
|
||||
DELETE FROM
|
||||
`omc_db`.`sys_config`
|
||||
WHERE
|
||||
`config_id` != 102
|
||||
and `config_key` = 'sys.logo.type';
|
||||
|
||||
DELETE FROM
|
||||
`omc_db`.`sys_config`
|
||||
WHERE
|
||||
`config_id` != 103
|
||||
and `config_key` = 'sys.logo.filePathIcon';
|
||||
|
||||
DELETE FROM
|
||||
`omc_db`.`sys_config`
|
||||
WHERE
|
||||
`config_id` != 104
|
||||
and `config_key` = 'sys.title';
|
||||
|
||||
DELETE FROM
|
||||
`omc_db`.`sys_config`
|
||||
WHERE
|
||||
`config_id` != 105
|
||||
and `config_key` = 'sys.copyright';
|
||||
|
||||
DELETE FROM
|
||||
`omc_db`.`sys_config`
|
||||
WHERE
|
||||
`config_id` != 106
|
||||
and `config_key` = 'sys.logo.filePathBrand';
|
||||
|
||||
DELETE FROM
|
||||
`omc_db`.`sys_config`
|
||||
WHERE
|
||||
`config_id` != 107
|
||||
and `config_key` = 'sys.loginBackground';
|
||||
|
||||
-- 参数配置-监控-系统资源
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
@@ -367,15 +202,275 @@ INSERT
|
||||
)
|
||||
VALUES (
|
||||
10,
|
||||
'监控-系统资源-数据保留时长',
|
||||
'config.monitor.sysResource.storeDays',
|
||||
'monitor.sysResource.storeDays',
|
||||
'30',
|
||||
'Y',
|
||||
'admin',
|
||||
1698483370391,
|
||||
'',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'监控-系统资源-数据保留时长,单位天。根据当前日期,删除超过保留时长的日期数据信息。'
|
||||
'config.monitor.sysResource.storeDaysRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
`config_name`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`,
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
102,
|
||||
'config.sys.logo.type',
|
||||
'sys.logo.type',
|
||||
'icon',
|
||||
'Y',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
'admin',
|
||||
1701252674635,
|
||||
'config.sys.logo.typeRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
`config_name`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`,
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
103,
|
||||
'config.sys.logo.filePathIcon',
|
||||
'sys.logo.filePathIcon',
|
||||
'#',
|
||||
'Y',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
'admin',
|
||||
1701251070089,
|
||||
'config.sys.logo.filePathIconRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
`config_name`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`,
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
104,
|
||||
'config.sys.logo.filePathBrand',
|
||||
'sys.logo.filePathBrand',
|
||||
'#',
|
||||
'Y',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
'admin',
|
||||
1701251023781,
|
||||
'config.sys.logo.filePathBrandRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
`config_name`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`,
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
105,
|
||||
'config.sys.loginBackground',
|
||||
'sys.loginBackground',
|
||||
'#',
|
||||
'Y',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'config.sys.loginBackgroundRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
`config_name`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`,
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
106,
|
||||
'config.sys.title',
|
||||
'sys.title',
|
||||
'config.sys.titleValue',
|
||||
'Y',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'config.sys.titleRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
`config_name`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`,
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
107,
|
||||
'config.sys.copyright',
|
||||
'sys.copyright',
|
||||
'config.sys.copyrightValue',
|
||||
'Y',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'config.sys.copyrightRemark'
|
||||
);
|
||||
|
||||
INSERT IGNORE INTO
|
||||
`omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
`config_name`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`,
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
108,
|
||||
'config.sys.i18nOpen',
|
||||
'sys.i18n.open',
|
||||
'true',
|
||||
'Y',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'config.sys.i18nOpenRemark'
|
||||
);
|
||||
|
||||
INSERT IGNORE INTO
|
||||
`omc_db`.`sys_config` (
|
||||
`config_id`,
|
||||
`config_name`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`,
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
109,
|
||||
'config.sys.i18nDefault',
|
||||
'sys.i18n.default',
|
||||
'en_US',
|
||||
'Y',
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'config.sys.i18nDefaultRemark'
|
||||
);
|
||||
|
||||
UPDATE `omc_db`.`sys_config`
|
||||
SET
|
||||
`config_name` = 'config.sys.helpDoc',
|
||||
`config_key` = 'sys.helpDoc',
|
||||
`config_value` = '/static/helpDoc/{language}_doc.pdf',
|
||||
`config_type` = 'Y',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698110000000,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'config.sys.helpDocRemark'
|
||||
WHERE `config_id` = 7;
|
||||
|
||||
UPDATE `omc_db`.`sys_config`
|
||||
SET
|
||||
`config_name` = 'config.sys.logo.type',
|
||||
`config_key` = 'sys.logo.type',
|
||||
`config_value` = 'brand',
|
||||
`config_type` = 'Y',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698110000000,
|
||||
`update_by` = 'admin',
|
||||
`update_time` = 1701834845928,
|
||||
`remark` = 'config.sys.logo.typeRemark'
|
||||
WHERE `config_id` = 102;
|
||||
|
||||
UPDATE `omc_db`.`sys_config`
|
||||
SET
|
||||
`config_name` = 'config.sys.logo.filePathIcon',
|
||||
`config_key` = 'sys.logo.filePathIcon',
|
||||
`config_value` = '/static/logo/{language}_icon.png',
|
||||
`config_type` = 'Y',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698110000000,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'config.sys.logo.filePathIconRemark'
|
||||
WHERE `config_id` = 103;
|
||||
|
||||
UPDATE `omc_db`.`sys_config`
|
||||
SET
|
||||
`config_name` = 'config.sys.logo.filePathBrand',
|
||||
`config_key` = 'sys.logo.filePathBrand',
|
||||
`config_value` = '/static/logo/{language}_brand.png',
|
||||
`config_type` = 'Y',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698110000000,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'config.sys.logo.filePathBrandRemark'
|
||||
WHERE `config_id` = 104;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=1;
|
||||
@@ -89,4 +89,39 @@ VALUES (
|
||||
NULL
|
||||
);
|
||||
|
||||
-- for cn/en locale
|
||||
UPDATE `omc_db`.`sys_dept`
|
||||
SET
|
||||
`parent_id` = 0,
|
||||
`ancestors` = '0',
|
||||
`dept_name` = 'dept.root',
|
||||
`order_num` = 0,
|
||||
`leader` = 'supervisor',
|
||||
`phone` = NULL,
|
||||
`email` = NULL,
|
||||
`status` = '1',
|
||||
`del_flag` = '0',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1699348237468,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0
|
||||
WHERE `dept_id` = 100;
|
||||
|
||||
UPDATE `omc_db`.`sys_dept`
|
||||
SET
|
||||
`parent_id` = 100,
|
||||
`ancestors` = '0,100',
|
||||
`dept_name` = 'dept.root.item1',
|
||||
`order_num` = 1,
|
||||
`leader` = 'supervisor',
|
||||
`phone` = NULL,
|
||||
`email` = NULL,
|
||||
`status` = '1',
|
||||
`del_flag` = '0',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1699348237468,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0
|
||||
WHERE `dept_id` = 101;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=1;
|
||||
@@ -38,10 +38,17 @@ CREATE TABLE `omc_db`.`sys_job` (
|
||||
PRIMARY KEY (`job_id`, `job_name`, `job_group`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '调度任务调度表' ROW_FORMAT = Dynamic;
|
||||
|
||||
ALTER TABLE
|
||||
`omc_db`.`sys_job` DROP PRIMARY KEY,
|
||||
ADD
|
||||
PRIMARY KEY (`job_id`) USING BTREE,
|
||||
ADD
|
||||
UNIQUE INDEX IF NOT EXISTS `idx_uni_name_group`(`job_name`, `job_group`) USING BTREE COMMENT 'unique index for job_name and job_group';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_job
|
||||
-- ----------------------------
|
||||
INSERT IGNORE INTO
|
||||
INSERT INTO
|
||||
`omc_db`.`sys_job` (
|
||||
`job_id`,
|
||||
`job_name`,
|
||||
@@ -61,7 +68,7 @@ INSERT IGNORE INTO
|
||||
)
|
||||
VALUES (
|
||||
1,
|
||||
'监控-系统资源',
|
||||
'job.monitor_sys_resource',
|
||||
'SYSTEM',
|
||||
'monitor_sys_resource',
|
||||
'{\"interval\":5}',
|
||||
@@ -70,14 +77,14 @@ VALUES (
|
||||
'0',
|
||||
'1',
|
||||
'0',
|
||||
'admin',
|
||||
'supervisor',
|
||||
1698478134839,
|
||||
'admin',
|
||||
1698483081920,
|
||||
'系统资源CPU/IO/Netword收集,interval单位分钟,0 0/5 * * * ? 表示平均interva5分钟资源情况'
|
||||
'supervisor',
|
||||
1700566657587,
|
||||
'job.monitor_sys_resource_remark'
|
||||
);
|
||||
|
||||
INSERT IGNORE INTO
|
||||
INSERT INTO
|
||||
`omc_db`.`sys_job` (
|
||||
`job_id`,
|
||||
`job_name`,
|
||||
@@ -97,23 +104,23 @@ INSERT IGNORE INTO
|
||||
)
|
||||
VALUES (
|
||||
4,
|
||||
'删除过期网元备份文件',
|
||||
'job.delExpiredNeBackup',
|
||||
'SYSTEM',
|
||||
'delExpiredNeBackup',
|
||||
'{\"duration\":90}',
|
||||
'{\"duration\":60}',
|
||||
'0 20 0 * * ?',
|
||||
'3',
|
||||
'0',
|
||||
'1',
|
||||
'1',
|
||||
'admin',
|
||||
1697091151529,
|
||||
'admin',
|
||||
1698134207967,
|
||||
'删除过期网元etc备份文件, 传入参数表示保留90天的备份文件, 默认60天'
|
||||
'supervisor',
|
||||
1698478134840,
|
||||
NULL,
|
||||
0,
|
||||
'job.delExpiredNeBackupRemark'
|
||||
);
|
||||
|
||||
INSERT IGNORE INTO
|
||||
INSERT INTO
|
||||
`omc_db`.`sys_job` (
|
||||
`job_id`,
|
||||
`job_name`,
|
||||
@@ -133,23 +140,23 @@ INSERT IGNORE INTO
|
||||
)
|
||||
VALUES (
|
||||
5,
|
||||
'删除过期历史告警记录',
|
||||
'job.deleteExpiredAlarmRecord',
|
||||
'SYSTEM',
|
||||
'deleteExpiredRecord',
|
||||
'{\"duration\":34,\"tableName\":\"alarm\",\"colName\":\"event_time\",\"extras\":\"alarm_status=\'0\'\"}',
|
||||
'{\"duration\":90,\"tableName\":\"alarm\",\"colName\":\"event_time\",\"extras\":\"alarm_status=\'0\'\"}',
|
||||
'0 10 0 * * ?',
|
||||
'3',
|
||||
'0',
|
||||
'1',
|
||||
'1',
|
||||
'admin',
|
||||
1698150591601,
|
||||
'admin',
|
||||
1698197292003,
|
||||
'删除过期历史告警记录,传入参数表示保留90天的历史告警记录'
|
||||
'supervisor',
|
||||
1698478134841,
|
||||
NULL,
|
||||
0,
|
||||
'job.deleteExpiredAlarmRecordRemark'
|
||||
);
|
||||
|
||||
INSERT IGNORE INTO
|
||||
INSERT INTO
|
||||
`omc_db`.`sys_job` (
|
||||
`job_id`,
|
||||
`job_name`,
|
||||
@@ -169,23 +176,23 @@ INSERT IGNORE INTO
|
||||
)
|
||||
VALUES (
|
||||
6,
|
||||
'删除过期黄金指标记录',
|
||||
'job.deleteExpiredKpiRecord',
|
||||
'SYSTEM',
|
||||
'deleteExpiredRecord',
|
||||
'{\"duration\":39,\"tableName\":\"gold_kpi\",\"colName\":\"date\"}',
|
||||
'{\"duration\":15,\"tableName\":\"gold_kpi\",\"colName\":\"date\"}',
|
||||
'0 15 0 * * ?',
|
||||
'3',
|
||||
'0',
|
||||
'1',
|
||||
'1',
|
||||
'admin',
|
||||
1698197983126,
|
||||
'admin',
|
||||
1698198074872,
|
||||
'黄金指标记录保留60天'
|
||||
'supervisor',
|
||||
1698478134842,
|
||||
NULL,
|
||||
0,
|
||||
'job.deleteExpiredKpiRecordRemark'
|
||||
);
|
||||
|
||||
INSERT IGNORE INTO
|
||||
INSERT INTO
|
||||
`omc_db`.`sys_job` (
|
||||
`job_id`,
|
||||
`job_name`,
|
||||
@@ -205,24 +212,118 @@ INSERT IGNORE INTO
|
||||
)
|
||||
VALUES (
|
||||
7,
|
||||
'网元配置自动备份任务',
|
||||
'job.backupEtcFromNE',
|
||||
'SYSTEM',
|
||||
'backupEtcFromNE',
|
||||
'',
|
||||
NULL,
|
||||
'0 30 0 * * ?',
|
||||
'3',
|
||||
'0',
|
||||
'1',
|
||||
'1',
|
||||
'admin',
|
||||
1698223216479,
|
||||
'',
|
||||
'supervisor',
|
||||
1698478134843,
|
||||
NULL,
|
||||
0,
|
||||
'自动备份网元etc目录下的配置文件'
|
||||
'job.backupEtcFromNERemark'
|
||||
);
|
||||
|
||||
-- 调度任务记录日志字段
|
||||
UPDATE `omc_db`.`sys_job`
|
||||
SET
|
||||
`invoke_target` = 'monitor_sys_resource',
|
||||
`job_name` = 'job.monitor_sys_resource',
|
||||
`target_params` = '{\"interval\":5}',
|
||||
`cron_expression` = '0 0/5 * * * ?',
|
||||
`misfire_policy` = '3',
|
||||
`concurrent` = '0',
|
||||
`status` = '1',
|
||||
`save_log` = '0',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698478134839,
|
||||
`update_by` = 'supervisor',
|
||||
`update_time` = 1700566657587,
|
||||
`remark` = 'job.monitor_sys_resource_remark'
|
||||
WHERE
|
||||
`job_id` = 1
|
||||
AND `job_group` = 'SYSTEM';
|
||||
|
||||
UPDATE `omc_db`.`sys_job`
|
||||
SET
|
||||
`invoke_target` = 'delExpiredNeBackup',
|
||||
`job_name` = 'job.delExpiredNeBackup',
|
||||
`target_params` = '{\"duration\":60}',
|
||||
`cron_expression` = '0 20 0 * * ?',
|
||||
`misfire_policy` = '3',
|
||||
`concurrent` = '0',
|
||||
`status` = '1',
|
||||
`save_log` = '1',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698478134840,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'job.delExpiredNeBackupRemark'
|
||||
WHERE
|
||||
`job_id` = 4
|
||||
AND `job_group` = 'SYSTEM';
|
||||
|
||||
UPDATE `omc_db`.`sys_job`
|
||||
SET
|
||||
`invoke_target` = 'deleteExpiredRecord',
|
||||
`job_name` = 'job.deleteExpiredAlarmRecord',
|
||||
`target_params` = '{\"duration\":90,\"tableName\":\"alarm\",\"colName\":\"event_time\",\"extras\":\"alarm_status=\'0\'\"}',
|
||||
`cron_expression` = '0 10 0 * * ?',
|
||||
`misfire_policy` = '3',
|
||||
`concurrent` = '0',
|
||||
`status` = '1',
|
||||
`save_log` = '1',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698478134841,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'job.deleteExpiredAlarmRecordRemark'
|
||||
WHERE
|
||||
`job_id` = 5
|
||||
AND `job_group` = 'SYSTEM';
|
||||
|
||||
UPDATE `omc_db`.`sys_job`
|
||||
SET
|
||||
`invoke_target` = 'deleteExpiredRecord',
|
||||
`job_name` = 'job.deleteExpiredKpiRecord',
|
||||
`target_params` = '{\"duration\":15,\"tableName\":\"gold_kpi\",\"colName\":\"date\"}',
|
||||
`cron_expression` = '0 15 0 * * ?',
|
||||
`misfire_policy` = '3',
|
||||
`concurrent` = '0',
|
||||
`status` = '1',
|
||||
`save_log` = '1',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698478134842,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'job.deleteExpiredKpiRecordRemark'
|
||||
WHERE
|
||||
`job_id` = 6
|
||||
AND `job_group` = 'SYSTEM';
|
||||
|
||||
UPDATE `omc_db`.`sys_job`
|
||||
SET
|
||||
`invoke_target` = 'backupEtcFromNE',
|
||||
`job_name` = 'job.backupEtcFromNE',
|
||||
`target_params` = NULL,
|
||||
`cron_expression` = '0 30 0 * * ?',
|
||||
`misfire_policy` = '3',
|
||||
`concurrent` = '0',
|
||||
`status` = '1',
|
||||
`save_log` = '1',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698478134843,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'job.backupEtcFromNERemark'
|
||||
WHERE
|
||||
`job_id` = 7
|
||||
AND `job_group` = 'SYSTEM';
|
||||
|
||||
-- 调度任务记录日志字段
|
||||
UPDATE `omc_db`.`sys_job` SET `save_log` = '1';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
@@ -119,4 +119,57 @@ VALUES (
|
||||
''
|
||||
);
|
||||
|
||||
-- for cn/en locales
|
||||
UPDATE `omc_db`.`sys_post`
|
||||
SET
|
||||
`post_code` = 'administator',
|
||||
`post_name` = 'post.admin',
|
||||
`post_sort` = 1,
|
||||
`status` = '1',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1697110106499,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = NULL
|
||||
WHERE `post_id` = 1;
|
||||
|
||||
UPDATE `omc_db`.`sys_post`
|
||||
SET
|
||||
`post_code` = 'operator',
|
||||
`post_name` = 'post.operator',
|
||||
`post_sort` = 2,
|
||||
`status` = '1',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1697110106499,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = NULL
|
||||
WHERE `post_id` = 2;
|
||||
|
||||
UPDATE `omc_db`.`sys_post`
|
||||
SET
|
||||
`post_code` = 'monitor',
|
||||
`post_name` = 'post.monitor',
|
||||
`post_sort` = 3,
|
||||
`status` = '1',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1697110106499,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = NULL
|
||||
WHERE `post_id` = 3;
|
||||
|
||||
UPDATE `omc_db`.`sys_post`
|
||||
SET
|
||||
`post_code` = 'visitor',
|
||||
`post_name` = 'post.visitor',
|
||||
`post_sort` = 4,
|
||||
`status` = '1',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1697110106499,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = NULL
|
||||
WHERE `post_id` = 4;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=1;
|
||||
@@ -172,4 +172,90 @@ VALUES (
|
||||
'普通用户 只可看系统相关信息'
|
||||
);
|
||||
|
||||
-- for cn/en locales
|
||||
UPDATE `omc_db`.`sys_role`
|
||||
SET
|
||||
`role_name` = 'role.admin',
|
||||
`role_key` = 'supervisor',
|
||||
`role_sort` = 1,
|
||||
`data_scope` = '1',
|
||||
`menu_check_strictly` = '1',
|
||||
`dept_check_strictly` = '1',
|
||||
`status` = '1',
|
||||
`del_flag` = '0',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1697091437683,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'role.adminRemark'
|
||||
WHERE `role_id` = 1;
|
||||
|
||||
UPDATE `omc_db`.`sys_role`
|
||||
SET
|
||||
`role_name` = 'role.adminAssign',
|
||||
`role_key` = 'administrator',
|
||||
`role_sort` = 2,
|
||||
`data_scope` = '1',
|
||||
`menu_check_strictly` = '1',
|
||||
`dept_check_strictly` = '1',
|
||||
`status` = '1',
|
||||
`del_flag` = '0',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698486915894,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'role.adminAssignRemark'
|
||||
WHERE `role_id` = 2;
|
||||
|
||||
UPDATE `omc_db`.`sys_role`
|
||||
SET
|
||||
`role_name` = 'role.operator',
|
||||
`role_key` = 'operator',
|
||||
`role_sort` = 3,
|
||||
`data_scope` = '1',
|
||||
`menu_check_strictly` = '1',
|
||||
`dept_check_strictly` = '1',
|
||||
`status` = '1',
|
||||
`del_flag` = '0',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698486934900,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'role.operatorRemark'
|
||||
WHERE `role_id` = 3;
|
||||
|
||||
UPDATE `omc_db`.`sys_role`
|
||||
SET
|
||||
`role_name` = 'role.monitor',
|
||||
`role_key` = 'monitor',
|
||||
`role_sort` = 4,
|
||||
`data_scope` = '1',
|
||||
`menu_check_strictly` = '1',
|
||||
`dept_check_strictly` = '1',
|
||||
`status` = '1',
|
||||
`del_flag` = '0',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698486950714,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'role.monitorRemark'
|
||||
WHERE `role_id` = 4;
|
||||
|
||||
UPDATE `omc_db`.`sys_role`
|
||||
SET
|
||||
`role_name` = 'role.vistor',
|
||||
`role_key` = 'vistor',
|
||||
`role_sort` = 5,
|
||||
`data_scope` = '1',
|
||||
`menu_check_strictly` = '1',
|
||||
`dept_check_strictly` = '1',
|
||||
`status` = '1',
|
||||
`del_flag` = '0',
|
||||
`create_by` = 'supervisor',
|
||||
`create_time` = 1698486975779,
|
||||
`update_by` = NULL,
|
||||
`update_time` = 0,
|
||||
`remark` = 'role.vistorRemark'
|
||||
WHERE `role_id` = 5;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=1;
|
||||
@@ -298,7 +298,7 @@ VALUES (2, 2075);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (2, 2076);
|
||||
VALUES (2, 2118);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
@@ -586,7 +586,7 @@ VALUES (3, 2075);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2076);
|
||||
VALUES (3, 2118);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
@@ -816,4 +816,228 @@ INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (5, 2082);
|
||||
|
||||
DELETE FROM
|
||||
`omc_db`.`sys_role_menu`
|
||||
WHERE
|
||||
`role_id` = '2'
|
||||
AND `menu_id` = '2076';
|
||||
|
||||
DELETE FROM `omc_db`.`sys_role_menu` WHERE `role_id` = '3';
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 1);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 4);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 5);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 108);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 112);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 115);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 500);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 501);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 1030);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 1031);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 1032);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 1034);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 1039);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 1042);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 1048);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2009);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2010);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2075);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2078);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2080);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2081);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2082);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2083);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2084);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2085);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2086);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2087);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2088);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2089);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2091);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2092);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2094);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2097);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2098);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2099);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2100);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2101);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2102);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2103);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2104);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2105);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2106);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2107);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2108);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2109);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2111);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2112);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2113);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (3, 2118);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (2, 2119);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (2, 2120);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (2, 2121);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (2, 2122);
|
||||
|
||||
INSERT
|
||||
IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`)
|
||||
VALUES (2, 2123);
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=1;
|
||||
@@ -33,23 +33,15 @@ ADD COLUMN IF NOT EXISTS `updated_at` datetime NULL AFTER `created_at`,
|
||||
ADD COLUMN IF NOT EXISTS `deleted_at` datetime NULL AFTER `updated_at`;
|
||||
|
||||
ALTER TABLE `omc_db`.`permission`
|
||||
DROP INDEX IF EXISTS `permission_name`,
|
||||
ADD UNIQUE INDEX `permission_name`(`permission_name`) USING BTREE;
|
||||
|
||||
ALTER TABLE `omc_db`.`ne_software`
|
||||
DROP COLUMN IF EXISTS `patch_time`,
|
||||
ADD COLUMN IF NOT EXISTS `patch_time` datetime NULL AFTER `update_time`;
|
||||
ADD UNIQUE INDEX IF NOT EXISTS `permission_name`(`permission_name`) USING BTREE;
|
||||
|
||||
ALTER TABLE `omc_db`.`alarm_log`
|
||||
DROP COLUMN IF EXISTS `alarm_seq`,
|
||||
ADD COLUMN IF NOT EXISTS `alarm_seq` int NULL AFTER `ne_id`;
|
||||
|
||||
ALTER TABLE `omc_db`.`ne_software`
|
||||
DROP COLUMN IF EXISTS `patch_time`,
|
||||
ADD COLUMN IF NOT EXISTS `patch_time` datetime NULL AFTER `update_time`;
|
||||
|
||||
ALTER TABLE `omc_db`.`nbi_alarm_log`
|
||||
DROP COLUMN IF EXISTS `alarm_status`,
|
||||
ADD COLUMN IF NOT EXISTS `alarm_status` int NULL COMMENT '0/1: 清除告警/活动告警' AFTER `alarm_code`;
|
||||
|
||||
ALTER TABLE `omc_db`.`cert_info` DROP INDEX IF EXISTS `idx_netype_neid`;
|
||||
@@ -130,4 +122,21 @@ ADD
|
||||
ALTER TABLE
|
||||
`omc_db`.`mml_system`
|
||||
ADD
|
||||
COLUMN IF NOT EXISTS `status` enum('Active', 'Inactive') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'Active' COMMENT '激活: Active 未激活: Inactive' AFTER `param_json`;
|
||||
COLUMN IF NOT EXISTS `status` enum('Active', 'Inactive') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'Active' COMMENT '激活: Active 未激活: Inactive' AFTER `param_json`;
|
||||
|
||||
ALTER TABLE
|
||||
`omc_db`.`system_log`
|
||||
ADD
|
||||
COLUMN IF NOT EXISTS `operation` varchar(16) NULL AFTER `process_id`;
|
||||
|
||||
UPDATE ne_info SET `province` = '-' WHERE `province` = 'GD';
|
||||
|
||||
UPDATE ne_info
|
||||
SET
|
||||
`vendor_name` = "AGrandTech"
|
||||
WHERE `vendor_name` = "AGT";
|
||||
|
||||
UPDATE ne_info SET `dn` = "-" WHERE `dn` = "TN";
|
||||
|
||||
ALTER TABLE
|
||||
`omc_db`.`sys_dept` MODIFY COLUMN `dept_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '部门名称' AFTER `ancestors`;
|
||||
@@ -449,6 +449,17 @@ func ExportCmFromNF(w http.ResponseWriter, r *http.Request) {
|
||||
etcListIMS, config.GetYamlConfig().OMC.Backup, neTypeLower)
|
||||
}
|
||||
|
||||
case "mme":
|
||||
if ipType == global.IsIPv4 {
|
||||
scpCmd = fmt.Sprintf("scp -r %s@%s:%s/%s/*.conf %s/etc/%s", config.GetYamlConfig().NE.User,
|
||||
neInfo.Ip, config.GetYamlConfig().NE.EtcDir,
|
||||
neTypeLower, config.GetYamlConfig().OMC.Backup, neTypeLower)
|
||||
} else {
|
||||
scpCmd = fmt.Sprintf("scp -r %s@[%s]:%s/%s/*.conf %s/etc/%s", config.GetYamlConfig().NE.User,
|
||||
neInfo.Ip, config.GetYamlConfig().NE.EtcDir,
|
||||
neTypeLower, config.GetYamlConfig().OMC.Backup, neTypeLower)
|
||||
}
|
||||
|
||||
default:
|
||||
if ipType == global.IsIPv4 {
|
||||
scpCmd = fmt.Sprintf("scp -r %s@%s:%s/%s/*.yaml %s/etc/%s", config.GetYamlConfig().NE.User,
|
||||
|
||||
@@ -46,7 +46,7 @@ func GetParamConfigFromNF(w http.ResponseWriter, r *http.Request) {
|
||||
restHostPort := fmt.Sprintf("http://127.0.0.1:%d", config.GetYamlConfig().Rest[0].Port)
|
||||
getNeInfoPattern := fmt.Sprintf(config.DefaultUriPrefix+"/databaseManagement/v1/%s/ne_info", config.GetYamlConfig().Database.Name)
|
||||
getNeInfoURI := restHostPort + getNeInfoPattern
|
||||
neId := services.GetUriParamString(r, "ne_id", ",", true, false)
|
||||
neId := services.GetUriParamString(r, "ne_id", ",", true, true)
|
||||
if neId == "" {
|
||||
getNeInfoURI = getNeInfoURI + fmt.Sprintf("?WHERE=status='0'+and+ne_type='%s'", neType)
|
||||
} else {
|
||||
|
||||
@@ -44,8 +44,9 @@ var (
|
||||
|
||||
XormCommonUri = config.DefaultUriPrefix + "/databaseManagement/{apiVersion}/{elementTypeValue}/{objectTypeValue}" // for internal
|
||||
XormDatabaseUri = config.DefaultUriPrefix + "/database/{apiVersion}/{elementTypeValue}/{objectTypeValue}" // for crontask
|
||||
XormExtDataUri = config.DefaultUriPrefix + "/dataManagement/{apiVersion}/{elementTypeValue}/{objectTypeValue}" // for external
|
||||
XormDataSQLUri = config.DefaultUriPrefix + "/dataManagement/{apiVersion}/{elementTypeValue}/{objectTypeValue}" // for external
|
||||
XormDataRestUri = config.DefaultUriPrefix + "/dataManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/{objectTypeValue}"
|
||||
XormExtDataUri = config.DefaultUriPrefix + "/dataManagement/{apiVersion}/{elementTypeValue}/{objectTypeValue}" // for external
|
||||
XormDataSQLUri = config.DefaultUriPrefix + "/dataManagement/{apiVersion}/{elementTypeValue}/{objectTypeValue}" // for external
|
||||
|
||||
CustomXormCommonUri = config.UriPrefix + "/databaseManagement/{apiVersion}/{elementTypeValue}/{objectTypeValue}" // for internal
|
||||
CustomXormExtDataUri = config.UriPrefix + "/dataManagement/{apiVersion}/{elementTypeValue}/{objectTypeValue}" // for external
|
||||
|
||||
@@ -20,11 +20,12 @@ func AlarmEmailForward(alarmData *Alarm) error {
|
||||
<p>Alarm information</p>
|
||||
<p style="text-indent:2.5em">Sequence: %d</p>
|
||||
<p style="text-indent:3em">NE name: %s</p>
|
||||
<p style="text-indent:5em">Title: %s</p>
|
||||
<p style="text-indent:3em">Severity: %s</p>
|
||||
<p style="text-indent:2em">Event Time: %s</p>
|
||||
<p style="text-indent:2em">Automatic send by OMC, don't reply!</p>
|
||||
`, alarmData.AlarmSeq, alarmData.NeName, alarmData.AlarmTitle, alarmData.OrigSeverity, alarmData.EventTime)
|
||||
<p style="text-indent:4em">Title: %s</p>
|
||||
<p style="text-indent:2.5em">Severity: %s</p>
|
||||
<p style="text-indent:1.5em">Event Time: %s</p>
|
||||
<p style="text-indent:0.5em">Alarm Status: %d</p>
|
||||
<p>Automatic sent by OMC, please do not reply!</p>
|
||||
`, alarmData.AlarmSeq, alarmData.NeName, alarmData.AlarmTitle, alarmData.OrigSeverity, alarmData.EventTime, alarmData.AlarmStatus)
|
||||
|
||||
// message := fmt.Sprintf(`
|
||||
// Alarm information
|
||||
@@ -75,10 +76,9 @@ func AlarmEmailForward(alarmData *Alarm) error {
|
||||
EventTime: alarmData.EventTime,
|
||||
ToUser: strings.Join(*emails, ","),
|
||||
}
|
||||
for _, email := range *emails {
|
||||
m.SetHeader("To", email) // 收件人,可以多个收件人,但必须使用相同的 SMTP 连接
|
||||
}
|
||||
|
||||
m.SetHeader("To", *emails...) // 收件人,可以多个收件人,但必须使用相同的 SMTP 连接
|
||||
//m.SetHeader("To", strings.Join(*emails, " ")) // 收件人,可以多个收件人,但必须使用相同的 SMTP 连接
|
||||
//m.SetHeader("To", "zhangshuzhong@agrandtech.com", "simonzhangsz@outlook.com") // 收件人,可以多个收件人,但必须使用相同的 SMTP 连接
|
||||
//m.SetHeader("Cc", "******@qq.com") // 抄送,可以多个
|
||||
//m.SetHeader("Bcc", "******@qq.com") // 暗送,可以多个
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"io"
|
||||
"net"
|
||||
"net/http"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -111,21 +112,8 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
if neInfo != nil {
|
||||
hostMML := fmt.Sprintf("%s:%d", neInfo.Ip, config.GetYamlConfig().MML.Port)
|
||||
conn, err := net.Dial("tcp", hostMML)
|
||||
if err != nil {
|
||||
errMsg := fmt.Sprintf("Failed to dial %s: %v", hostMML, err)
|
||||
log.Error(errMsg)
|
||||
mmlResult = append(mmlResult, errMsg)
|
||||
response := Response{mmlResult}
|
||||
services.ResponseWithJson(w, http.StatusOK, response)
|
||||
return
|
||||
}
|
||||
defer conn.Close()
|
||||
|
||||
conn.SetDeadline(time.Now().Add(10 * time.Second))
|
||||
switch strings.ToLower(neType) {
|
||||
case "upf":
|
||||
case "xxx":
|
||||
body, err := io.ReadAll(io.LimitReader(r.Body, global.RequestBodyMaxLen))
|
||||
if err != nil {
|
||||
log.Error("io.ReadAll is failed:", err)
|
||||
@@ -137,16 +125,29 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
||||
mmlRequest := new(MMLRequest)
|
||||
_ = json.Unmarshal(body, mmlRequest)
|
||||
|
||||
n, err = conn.Read(buf[0:])
|
||||
if err != nil {
|
||||
log.Error("Failed to read:", err)
|
||||
mmlResult = append(mmlResult, err.Error())
|
||||
response := Response{mmlResult}
|
||||
services.ResponseWithJson(w, http.StatusOK, response)
|
||||
return
|
||||
}
|
||||
log.Debug(string(buf[0:n]))
|
||||
// n, err = conn.Read(buf[0:])
|
||||
// if err != nil {
|
||||
// log.Error("Failed to read:", err)
|
||||
// mmlResult = append(mmlResult, err.Error())
|
||||
// response := Response{mmlResult}
|
||||
// services.ResponseWithJson(w, http.StatusOK, response)
|
||||
// return
|
||||
// }
|
||||
// log.Debug(string(buf[0:n]))
|
||||
|
||||
// hostMML := fmt.Sprintf("%s:%d", neInfo.Ip, config.GetYamlConfig().MML.Port)
|
||||
// conn, err := net.Dial("tcp", hostMML)
|
||||
// if err != nil {
|
||||
// errMsg := fmt.Sprintf("Failed to dial %s: %v", hostMML, err)
|
||||
// log.Error(errMsg)
|
||||
// mmlResult = append(mmlResult, errMsg)
|
||||
// response := Response{mmlResult}
|
||||
// services.ResponseWithJson(w, http.StatusOK, response)
|
||||
// return
|
||||
// }
|
||||
// defer conn.Close()
|
||||
|
||||
// conn.SetDeadline(time.Now().Add(10 * time.Second))
|
||||
// loginStr := fmt.Sprintf("%s\n%s\n", config.GetYamlConfig().MML.User, config.GetYamlConfig().MML.Password)
|
||||
// _, err = conn.Write([]byte(loginStr))
|
||||
// if err != nil {
|
||||
@@ -158,16 +159,16 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
||||
// }
|
||||
// time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||
|
||||
n, err = conn.Write([]byte(config.GetYamlConfig().MML.User + "\n"))
|
||||
if err != nil {
|
||||
log.Error("Failed to write:", err)
|
||||
mmlResult = append(mmlResult, err.Error())
|
||||
response := Response{mmlResult}
|
||||
services.ResponseWithJson(w, http.StatusOK, response)
|
||||
return
|
||||
}
|
||||
log.Debug(string(buf[0:n]))
|
||||
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||
// n, err = conn.Write([]byte(config.GetYamlConfig().MML.User + "\n"))
|
||||
// if err != nil {
|
||||
// log.Error("Failed to write:", err)
|
||||
// mmlResult = append(mmlResult, err.Error())
|
||||
// response := Response{mmlResult}
|
||||
// services.ResponseWithJson(w, http.StatusOK, response)
|
||||
// return
|
||||
// }
|
||||
// log.Debug(string(buf[0:n]))
|
||||
// time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||
|
||||
// n, err = conn.Read(buf[0:])
|
||||
// if err != nil {
|
||||
@@ -179,17 +180,17 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
||||
// }
|
||||
// log.Debug(string(buf[0:n]))
|
||||
|
||||
n, err = conn.Write([]byte(config.GetYamlConfig().MML.Password + "\n"))
|
||||
if err != nil {
|
||||
log.Error("Failed to write:", err)
|
||||
mmlResult = append(mmlResult, err.Error())
|
||||
response := Response{mmlResult}
|
||||
services.ResponseWithJson(w, http.StatusOK, response)
|
||||
return
|
||||
}
|
||||
log.Debug(string(buf[0:n]))
|
||||
// n, err = conn.Write([]byte(config.GetYamlConfig().MML.Password + "\n"))
|
||||
// if err != nil {
|
||||
// log.Error("Failed to write:", err)
|
||||
// mmlResult = append(mmlResult, err.Error())
|
||||
// response := Response{mmlResult}
|
||||
// services.ResponseWithJson(w, http.StatusOK, response)
|
||||
// return
|
||||
// }
|
||||
// log.Debug(string(buf[0:n]))
|
||||
|
||||
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||
// time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||
|
||||
// n, err = conn.Read(buf[0:])
|
||||
// if err != nil {
|
||||
@@ -202,6 +203,30 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
||||
// log.Debug(string(buf[0:n]))
|
||||
|
||||
for _, mml := range mmlRequest.MML {
|
||||
hostMML := fmt.Sprintf("%s:%d", neInfo.Ip, config.GetYamlConfig().MML.Port)
|
||||
conn, err := net.Dial("tcp", hostMML)
|
||||
if err != nil {
|
||||
errMsg := fmt.Sprintf("Failed to dial %s: %v", hostMML, err)
|
||||
log.Error(errMsg)
|
||||
mmlResult = append(mmlResult, errMsg)
|
||||
response := Response{mmlResult}
|
||||
services.ResponseWithJson(w, http.StatusOK, response)
|
||||
return
|
||||
}
|
||||
defer conn.Close()
|
||||
|
||||
conn.SetDeadline(time.Now().Add(10 * time.Second))
|
||||
|
||||
loginStr := fmt.Sprintf("%s\n%s\n", config.GetYamlConfig().MML.User, config.GetYamlConfig().MML.Password)
|
||||
_, err = conn.Write([]byte(loginStr))
|
||||
if err != nil {
|
||||
log.Error("Failed to write:", err)
|
||||
mmlResult = append(mmlResult, err.Error())
|
||||
response := Response{mmlResult}
|
||||
services.ResponseWithJson(w, http.StatusOK, response)
|
||||
return
|
||||
}
|
||||
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||
mmlCommand := fmt.Sprintf("%s\n", mml)
|
||||
log.Debug("mml command:", mmlCommand)
|
||||
_, err = conn.Write([]byte(mmlCommand))
|
||||
@@ -214,21 +239,175 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||
|
||||
// n, err = conn.Read(buf[0:])
|
||||
n, err = conn.Read(buf[0:])
|
||||
if err != nil {
|
||||
log.Error("Failed to read:", err)
|
||||
mmlResult = append(mmlResult, err.Error())
|
||||
response := Response{mmlResult}
|
||||
services.ResponseWithJson(w, http.StatusOK, response)
|
||||
return
|
||||
}
|
||||
log.Trace(string(buf[0 : n-len(neType)-2]))
|
||||
|
||||
re1 := regexp.MustCompile(`\x1B\[[0-9;]*[a-zA-Z]`) // 匹配包含␛的控制字符
|
||||
//re2 := regexp.MustCompile(`\x00`) // 匹配空字符
|
||||
re2 := regexp.MustCompile(`[\x00-\x08\x0B\x0C\x0E-\x1F\x7F\x1B]`) // 匹配空字符和包含␛的控制字符
|
||||
//re := regexp.MustCompile(`[\x00-\x1F\x7F]`)
|
||||
// upf telnet buffer只能读取一次,需要去掉前面的多余字符
|
||||
result := re1.ReplaceAllString(string(buf[config.GetYamlConfig().MML.UpfHeaderLength:n-len(neType)-2]), "")
|
||||
result = re2.ReplaceAllString(result, "")
|
||||
mmlResult = append(mmlResult, result)
|
||||
conn.Close()
|
||||
//mmlResult = append(mmlResult, string(buf[0:n-len(neType)-2]))
|
||||
|
||||
// can't read buffer from upf telnet server, so return ok always
|
||||
// mmlResult = append(mmlResult, "COMMAND OK\n")
|
||||
}
|
||||
case "ims":
|
||||
body, err := io.ReadAll(io.LimitReader(r.Body, global.RequestBodyMaxLen))
|
||||
if err != nil {
|
||||
log.Error("io.ReadAll is failed:", err)
|
||||
services.ResponseNotFound404UriNotExist(w, r)
|
||||
return
|
||||
}
|
||||
log.Trace("Body:", string(body))
|
||||
|
||||
mmlRequest := new(MMLRequest)
|
||||
_ = json.Unmarshal(body, mmlRequest)
|
||||
|
||||
for _, mml := range mmlRequest.MML {
|
||||
hostMML := fmt.Sprintf("%s:%d", neInfo.Ip, config.GetYamlConfig().MML.Port)
|
||||
conn, err := net.Dial("tcp", hostMML)
|
||||
if err != nil {
|
||||
errMsg := fmt.Sprintf("Failed to dial %s: %v", hostMML, err)
|
||||
log.Error(errMsg)
|
||||
mmlResult = append(mmlResult, errMsg)
|
||||
response := Response{mmlResult}
|
||||
services.ResponseWithJson(w, http.StatusOK, response)
|
||||
return
|
||||
}
|
||||
defer conn.Close()
|
||||
|
||||
// localAddr := conn.LocalAddr()
|
||||
// remoteAddr := conn.RemoteAddr()
|
||||
// if localAddr == nil || remoteAddr == nil {
|
||||
// errMsg := fmt.Sprintf("connect invalid: localAddr=%v, remoteAddr=%v", localAddr, remoteAddr)
|
||||
// log.Error(errMsg)
|
||||
// mmlResult = append(mmlResult, errMsg)
|
||||
// response := Response{mmlResult}
|
||||
// services.ResponseWithJson(w, http.StatusOK, response)
|
||||
// return
|
||||
// }
|
||||
conn.SetDeadline(time.Now().Add(10 * time.Second))
|
||||
|
||||
_, err = conn.Write([]byte(config.GetYamlConfig().MML.User + "\n"))
|
||||
if err != nil {
|
||||
log.Error("Failed to write:", err)
|
||||
mmlResult = append(mmlResult, err.Error())
|
||||
response := Response{mmlResult}
|
||||
services.ResponseWithJson(w, http.StatusOK, response)
|
||||
return
|
||||
}
|
||||
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||
|
||||
n, err = conn.Read(buf[0:])
|
||||
if err != nil {
|
||||
log.Error("Failed to read:", err)
|
||||
mmlResult = append(mmlResult, err.Error())
|
||||
response := Response{mmlResult}
|
||||
services.ResponseWithJson(w, http.StatusOK, response)
|
||||
return
|
||||
}
|
||||
log.Debug(string(buf[0:n]))
|
||||
|
||||
_, err = conn.Write([]byte(config.GetYamlConfig().MML.Password + "\n"))
|
||||
if err != nil {
|
||||
log.Error("Failed to write:", err)
|
||||
mmlResult = append(mmlResult, err.Error())
|
||||
response := Response{mmlResult}
|
||||
services.ResponseWithJson(w, http.StatusOK, response)
|
||||
return
|
||||
}
|
||||
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||
|
||||
// loginStr := fmt.Sprintf("%s\n%s\n", config.GetYamlConfig().MML.User, config.GetYamlConfig().MML.Password)
|
||||
// _, err = conn.Write([]byte(loginStr))
|
||||
// if err != nil {
|
||||
// log.Error("Failed to read:", err)
|
||||
// log.Error("Failed to write:", err)
|
||||
// mmlResult = append(mmlResult, err.Error())
|
||||
// response := Response{mmlResult}
|
||||
// services.ResponseWithJson(w, http.StatusOK, response)
|
||||
// return
|
||||
// }
|
||||
// log.Trace(string(buf[0 : n-len(neType)-2]))
|
||||
// mmlResult = append(mmlResult, string(buf[0:n-len(neType)-2]))
|
||||
|
||||
// can't read buffer from upf telnet server, so return ok always
|
||||
mmlResult = append(mmlResult, "COMMAND OK\n")
|
||||
n, err = conn.Read(buf[0:])
|
||||
if err != nil {
|
||||
log.Error("Failed to read:", err)
|
||||
mmlResult = append(mmlResult, err.Error())
|
||||
response := Response{mmlResult}
|
||||
services.ResponseWithJson(w, http.StatusOK, response)
|
||||
return
|
||||
}
|
||||
log.Trace(string(buf[0 : n-len(neType)-2]))
|
||||
|
||||
mmlCommand := fmt.Sprintf("%s\n", mml)
|
||||
log.Debug("mml command:", mmlCommand)
|
||||
_, err = conn.Write([]byte(mmlCommand))
|
||||
if err != nil {
|
||||
log.Error("Failed to write:", err)
|
||||
mmlResult = append(mmlResult, err.Error())
|
||||
response := Response{mmlResult}
|
||||
services.ResponseWithJson(w, http.StatusOK, response)
|
||||
return
|
||||
}
|
||||
time.Sleep(time.Millisecond * TIME_DELAY_AFTER_WRITE)
|
||||
|
||||
n, err = conn.Read(buf[0:])
|
||||
if err != nil {
|
||||
log.Error("Failed to read:", err)
|
||||
mmlResult = append(mmlResult, err.Error())
|
||||
response := Response{mmlResult}
|
||||
services.ResponseWithJson(w, http.StatusOK, response)
|
||||
return
|
||||
}
|
||||
log.Trace(string(buf[0 : n-len(neType)-2]))
|
||||
|
||||
re1 := regexp.MustCompile(`\x1B\[[0-9;]*[a-zA-Z]`) // 匹配包含␛的控制字符
|
||||
//re2 := regexp.MustCompile(`\x00`) // 匹配空字符
|
||||
re2 := regexp.MustCompile(`[\x00-\x08\x0B\x0C\x0E-\x1F\x7F\x1B]`) // 匹配空字符和包含␛的控制字符
|
||||
//re := regexp.MustCompile(`[\x00-\x1F\x7F]`)
|
||||
// upf telnet buffer只能读取一次,需要去掉前面的多余字符
|
||||
//result := re1.ReplaceAllString(string(buf[0:n-len(neType)-2]), "")
|
||||
result := re1.ReplaceAllString(string(buf[0:]), "")
|
||||
result = re2.ReplaceAllString(result, "")
|
||||
mmlResult = append(mmlResult, result)
|
||||
conn.Close()
|
||||
}
|
||||
default:
|
||||
hostMML := fmt.Sprintf("%s:%d", neInfo.Ip, config.GetYamlConfig().MML.Port)
|
||||
conn, err := net.Dial("tcp", hostMML)
|
||||
if err != nil {
|
||||
errMsg := fmt.Sprintf("Failed to dial %s: %v", hostMML, err)
|
||||
log.Error(errMsg)
|
||||
mmlResult = append(mmlResult, errMsg)
|
||||
response := Response{mmlResult}
|
||||
services.ResponseWithJson(w, http.StatusOK, response)
|
||||
return
|
||||
}
|
||||
defer conn.Close()
|
||||
|
||||
// localAddr := conn.LocalAddr()
|
||||
// remoteAddr := conn.RemoteAddr()
|
||||
// if localAddr == nil || remoteAddr == nil {
|
||||
// errMsg := fmt.Sprintf("connect invalid: localAddr=%v, remoteAddr=%v", localAddr, remoteAddr)
|
||||
// log.Error(errMsg)
|
||||
// mmlResult = append(mmlResult, errMsg)
|
||||
// response := Response{mmlResult}
|
||||
// services.ResponseWithJson(w, http.StatusOK, response)
|
||||
// return
|
||||
// }
|
||||
|
||||
conn.SetDeadline(time.Now().Add(10 * time.Second))
|
||||
loginStr := fmt.Sprintf("%s\n%s\n", config.GetYamlConfig().MML.User, config.GetYamlConfig().MML.Password)
|
||||
_, err = conn.Write([]byte(loginStr))
|
||||
if err != nil {
|
||||
@@ -283,7 +462,13 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
log.Trace(string(buf[0 : n-len(neType)-2]))
|
||||
mmlResult = append(mmlResult, string(buf[0:n-len(neType)-2]))
|
||||
re1 := regexp.MustCompile(`\x1B\[[0-9;]*[a-zA-Z]`) // 匹配包含␛的控制字符
|
||||
//re2 := regexp.MustCompile(`\x00`) // 匹配空字符
|
||||
re2 := regexp.MustCompile(`[\x00-\x08\x0B\x0C\x0E-\x1F\x7F\x1B]`) // 匹配空字符和包含␛的控制字符
|
||||
//re := regexp.MustCompile(`[\x00-\x1F\x7F]`)
|
||||
result := re1.ReplaceAllString(string(buf[0:n-len(neType)-2]), "")
|
||||
result = re2.ReplaceAllString(result, "")
|
||||
mmlResult = append(mmlResult, result)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -733,7 +733,7 @@ func GetStateFromNF(w http.ResponseWriter, r *http.Request) {
|
||||
getNeInfoPattern := fmt.Sprintf(config.DefaultUriPrefix+"/databaseManagement/v1/elementType/%s/objectType/ne_info",
|
||||
config.GetYamlConfig().Database.Name)
|
||||
getNeInfoURI := restHostPort + getNeInfoPattern
|
||||
neId := services.GetUriParamString(r, "ne_id", ",", true, false)
|
||||
neId := services.GetUriParamString(r, "ne_id", ",", true, true)
|
||||
if neId == "" {
|
||||
getNeInfoURI = getNeInfoURI + fmt.Sprintf("?WHERE=status='0'+and+ne_type='%s'", neType)
|
||||
} else {
|
||||
|
||||
@@ -181,7 +181,11 @@ func (r *RepoSysConfig) SelectConfigValueByKey(configKey string) string {
|
||||
return ""
|
||||
}
|
||||
if len(results) > 0 {
|
||||
return fmt.Sprintf("%v", results[0]["str"])
|
||||
v, ok := results[0]["str"].(string)
|
||||
if ok {
|
||||
return v
|
||||
}
|
||||
return ""
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -226,7 +230,11 @@ func (r *RepoSysConfig) CheckUniqueConfig(sysConfig model.SysConfig) string {
|
||||
return ""
|
||||
}
|
||||
if len(results) > 0 {
|
||||
return fmt.Sprintf("%v", results[0]["str"])
|
||||
v, ok := results[0]["str"].(string)
|
||||
if ok {
|
||||
return v
|
||||
}
|
||||
return ""
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -215,7 +215,11 @@ func (r *RepoSysDictData) CheckUniqueDictData(sysDictData model.SysDictData) str
|
||||
return ""
|
||||
}
|
||||
if len(results) > 0 {
|
||||
return fmt.Sprintf("%v", results[0]["str"])
|
||||
v, ok := results[0]["str"].(string)
|
||||
if ok {
|
||||
return v
|
||||
}
|
||||
return ""
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -227,7 +227,11 @@ func (r *RepoSysDictType) CheckUniqueDictType(sysDictType model.SysDictType) str
|
||||
return ""
|
||||
}
|
||||
if len(results) > 0 {
|
||||
return fmt.Sprintf("%v", results[0]["str"])
|
||||
v, ok := results[0]["str"].(string)
|
||||
if ok {
|
||||
return v
|
||||
}
|
||||
return ""
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -469,7 +469,11 @@ func (r *RepoSysMenu) CheckUniqueMenu(sysMenu model.SysMenu) string {
|
||||
return ""
|
||||
}
|
||||
if len(results) > 0 {
|
||||
return fmt.Sprintf("%v", results[0]["str"])
|
||||
v, ok := results[0]["str"].(string)
|
||||
if ok {
|
||||
return v
|
||||
}
|
||||
return ""
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -356,7 +356,11 @@ func (r *RepoSysRole) CheckUniqueRole(sysRole model.SysRole) string {
|
||||
return ""
|
||||
}
|
||||
if len(results) > 0 {
|
||||
return fmt.Sprintf("%v", results[0]["str"])
|
||||
v, ok := results[0]["str"].(string)
|
||||
if ok {
|
||||
return v
|
||||
}
|
||||
return ""
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -572,7 +572,11 @@ func (r *RepoSysUser) CheckUniqueUser(sysUser sysUserModel.SysUser) string {
|
||||
log.Errorf("query err %v", err)
|
||||
}
|
||||
if len(results) > 0 {
|
||||
return fmt.Sprintf("%v", results[0]["str"])
|
||||
v, ok := results[0]["str"].(string)
|
||||
if ok {
|
||||
return v
|
||||
}
|
||||
return ""
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package ue
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
@@ -71,13 +72,21 @@ type N3iwfUEData struct {
|
||||
}
|
||||
|
||||
var (
|
||||
UriNBInfo = config.DefaultUriPrefix + "/ueManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/nbInfo"
|
||||
UriUEInfo = config.DefaultUriPrefix + "/ueManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/ueInfo"
|
||||
UriUENum = config.DefaultUriPrefix + "/ueManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/ueNum"
|
||||
UriNBInfo = config.DefaultUriPrefix + "/ueManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/nbInfo"
|
||||
UriUEInfo = config.DefaultUriPrefix + "/ueManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/ueInfo"
|
||||
UriUENum = config.DefaultUriPrefix + "/ueManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/ueNum"
|
||||
UriPCFUser = config.DefaultUriPrefix + "/ueManagement/{apiVersion}/elementType/pcf/objectType/ueInfo"
|
||||
UriPCFUserM = config.DefaultUriPrefix + "/ueManagement/{apiVersion}/elementType/pcf/objectType/ueInfo/batch/{number}"
|
||||
UriPCFUserFileImport = config.DefaultUriPrefix + "/ueManagement/{apiVersion}/elementType/pcf/objectType/ueInfo/file/import"
|
||||
UriPCFUserFileExport = config.DefaultUriPrefix + "/ueManagement/{apiVersion}/elementType/pcf/objectType/ueInfo/file/export"
|
||||
|
||||
CustomUriNBInfo = config.UriPrefix + "/ueManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/nbInfo"
|
||||
CustomUriUEInfo = config.UriPrefix + "/ueManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/ueInfo"
|
||||
CustomUriUENum = config.UriPrefix + "/ueManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/ueNum"
|
||||
CustomUriNBInfo = config.UriPrefix + "/ueManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/nbInfo"
|
||||
CustomUriUEInfo = config.UriPrefix + "/ueManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/ueInfo"
|
||||
CustomUriUENum = config.UriPrefix + "/ueManagement/{apiVersion}/elementType/{elementTypeValue}/objectType/ueNum"
|
||||
CustomUriPCFUser = config.UriPrefix + "/ueManagement/{apiVersion}/elementType/pcf/objectType/ueInfo"
|
||||
CustomUriPCFUserM = config.UriPrefix + "/ueManagement/{apiVersion}/elementType/pcf/objectType/ueInfo/batch/{number}"
|
||||
CustomUriPCFUserFileImport = config.UriPrefix + "/ueManagement/{apiVersion}/elementType/pcf/objectType/ueInfo/file/import"
|
||||
CustomUriPCFUserFileExport = config.UriPrefix + "/ueManagement/{apiVersion}/elementType/pcf/objectType/ueInfo/file/export"
|
||||
)
|
||||
|
||||
var client = resty.New()
|
||||
@@ -153,7 +162,216 @@ func GetUEInfoFromNF(w http.ResponseWriter, r *http.Request) {
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
} else {
|
||||
var response services.DataResponse
|
||||
var response services.MapResponse
|
||||
_ = json.Unmarshal(resp.Body(), &response)
|
||||
services.ResponseWithJson(w, resp.StatusCode(), response)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// Get UEInfo from NF/NFs
|
||||
func PostPCFUserInfo(w http.ResponseWriter, r *http.Request) {
|
||||
log.Info("PostPCFUserInfo processing... ")
|
||||
|
||||
// vars := mux.Vars(r)
|
||||
// neType := vars["elementTypeValue"]
|
||||
// if neType == "" {
|
||||
// services.ResponseNotFound404UriNotExist(w, r)
|
||||
// return
|
||||
// }
|
||||
//neTypeLower := strings.ToLower(neType)
|
||||
neType := "PCF"
|
||||
var neId string
|
||||
neIds := services.GetParamsArrByName("neId", r)
|
||||
if len(neIds) == 1 {
|
||||
neId = neIds[0]
|
||||
} else {
|
||||
services.ResponseNotFound404UriNotExist(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
// token, err := services.CheckFrontValidRequest(w, r)
|
||||
// if err != nil {
|
||||
// log.Error("Request error:", err)
|
||||
// return
|
||||
// }
|
||||
// log.Debug("token:", token)
|
||||
|
||||
neInfo, err := dborm.XormGetNeInfo(neType, neId)
|
||||
if err != nil {
|
||||
log.Error("Failed to XormGetNeInfo:", err)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
} else if neInfo == nil {
|
||||
err := global.ErrCMNotFoundTargetNE
|
||||
log.Error(global.ErrCMNotFoundTargetNE)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
}
|
||||
log.Trace("neInfo:", neInfo)
|
||||
|
||||
hostUri := fmt.Sprintf("http://%s:%v", neInfo.Ip, neInfo.Port)
|
||||
requestURI2NF := fmt.Sprintf("%s%s", hostUri, r.RequestURI)
|
||||
|
||||
log.Debug("requestURI2NF:", requestURI2NF)
|
||||
|
||||
body, err := io.ReadAll(io.LimitReader(r.Body, global.RequestBodyMaxLen)) //io.LimitReader限制大小
|
||||
if err != nil {
|
||||
log.Error("io.ReadAll is failed:", err)
|
||||
services.ResponseNotFound404UriNotExist(w, r)
|
||||
return
|
||||
}
|
||||
resp, err := client.R().
|
||||
EnableTrace().
|
||||
SetHeaders(map[string]string{tokenConst.HEADER_KEY: r.Header.Get(tokenConst.HEADER_KEY)}).
|
||||
//SetHeaders(map[string]string{"accessToken": token}).
|
||||
SetHeaders(map[string]string{"User-Agent": config.GetDefaultUserAgent()}).
|
||||
SetHeaders(map[string]string{"Content-Type": "application/json;charset=UTF-8"}).
|
||||
SetBody(body).
|
||||
Post(requestURI2NF)
|
||||
if err != nil {
|
||||
log.Error("Failed to post:", err)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
} else {
|
||||
var response services.MapResponse
|
||||
_ = json.Unmarshal(resp.Body(), &response)
|
||||
services.ResponseWithJson(w, resp.StatusCode(), response)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// Get UEInfo from NF/NFs
|
||||
func PutPCFUserInfo(w http.ResponseWriter, r *http.Request) {
|
||||
log.Info("PutPCFUserInfo processing... ")
|
||||
|
||||
// vars := mux.Vars(r)
|
||||
// neType := vars["elementTypeValue"]
|
||||
// if neType == "" {
|
||||
// services.ResponseNotFound404UriNotExist(w, r)
|
||||
// return
|
||||
// }
|
||||
//neTypeLower := strings.ToLower(neType)
|
||||
neType := "PCF"
|
||||
var neId string
|
||||
neIds := services.GetParamsArrByName("neId", r)
|
||||
if len(neIds) == 1 {
|
||||
neId = neIds[0]
|
||||
} else {
|
||||
services.ResponseNotFound404UriNotExist(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
// token, err := services.CheckFrontValidRequest(w, r)
|
||||
// if err != nil {
|
||||
// log.Error("Request error:", err)
|
||||
// return
|
||||
// }
|
||||
// log.Debug("token:", token)
|
||||
|
||||
neInfo, err := dborm.XormGetNeInfo(neType, neId)
|
||||
if err != nil {
|
||||
log.Error("Failed to XormGetNeInfo:", err)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
} else if neInfo == nil {
|
||||
err := global.ErrCMNotFoundTargetNE
|
||||
log.Error(global.ErrCMNotFoundTargetNE)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
}
|
||||
log.Trace("neInfo:", neInfo)
|
||||
|
||||
hostUri := fmt.Sprintf("http://%s:%v", neInfo.Ip, neInfo.Port)
|
||||
requestURI2NF := fmt.Sprintf("%s%s", hostUri, r.RequestURI)
|
||||
|
||||
log.Debug("requestURI2NF:", requestURI2NF)
|
||||
|
||||
body, err := io.ReadAll(io.LimitReader(r.Body, global.RequestBodyMaxLen)) //io.LimitReader限制大小
|
||||
if err != nil {
|
||||
log.Error("io.ReadAll is failed:", err)
|
||||
services.ResponseNotFound404UriNotExist(w, r)
|
||||
return
|
||||
}
|
||||
resp, err := client.R().
|
||||
EnableTrace().
|
||||
SetHeaders(map[string]string{tokenConst.HEADER_KEY: r.Header.Get(tokenConst.HEADER_KEY)}).
|
||||
//SetHeaders(map[string]string{"accessToken": token}).
|
||||
SetHeaders(map[string]string{"User-Agent": config.GetDefaultUserAgent()}).
|
||||
SetHeaders(map[string]string{"Content-Type": "application/json;charset=UTF-8"}).
|
||||
SetBody(body).
|
||||
Put(requestURI2NF)
|
||||
if err != nil {
|
||||
log.Error("Failed to put:", err)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
} else {
|
||||
var response services.MapResponse
|
||||
_ = json.Unmarshal(resp.Body(), &response)
|
||||
services.ResponseWithJson(w, resp.StatusCode(), response)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// Get UEInfo from NF/NFs
|
||||
func DeletePCFUserInfo(w http.ResponseWriter, r *http.Request) {
|
||||
log.Info("DeletePCFUserInfo processing... ")
|
||||
|
||||
// vars := mux.Vars(r)
|
||||
// neType := vars["elementTypeValue"]
|
||||
// if neType == "" {
|
||||
// services.ResponseNotFound404UriNotExist(w, r)
|
||||
// return
|
||||
// }
|
||||
//neTypeLower := strings.ToLower(neType)
|
||||
neType := "PCF"
|
||||
var neId string
|
||||
neIds := services.GetParamsArrByName("neId", r)
|
||||
if len(neIds) == 1 {
|
||||
neId = neIds[0]
|
||||
} else {
|
||||
services.ResponseNotFound404UriNotExist(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
// token, err := services.CheckFrontValidRequest(w, r)
|
||||
// if err != nil {
|
||||
// log.Error("Request error:", err)
|
||||
// return
|
||||
// }
|
||||
// log.Debug("token:", token)
|
||||
|
||||
neInfo, err := dborm.XormGetNeInfo(neType, neId)
|
||||
if err != nil {
|
||||
log.Error("Failed to XormGetNeInfo:", err)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
} else if neInfo == nil {
|
||||
err := global.ErrCMNotFoundTargetNE
|
||||
log.Error(global.ErrCMNotFoundTargetNE)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
}
|
||||
log.Trace("neInfo:", neInfo)
|
||||
|
||||
hostUri := fmt.Sprintf("http://%s:%v", neInfo.Ip, neInfo.Port)
|
||||
requestURI2NF := fmt.Sprintf("%s%s", hostUri, r.RequestURI)
|
||||
|
||||
log.Debug("requestURI2NF:", requestURI2NF)
|
||||
|
||||
resp, err := client.R().
|
||||
EnableTrace().
|
||||
SetHeaders(map[string]string{tokenConst.HEADER_KEY: r.Header.Get(tokenConst.HEADER_KEY)}).
|
||||
//SetHeaders(map[string]string{"accessToken": token}).
|
||||
SetHeaders(map[string]string{"User-Agent": config.GetDefaultUserAgent()}).
|
||||
SetHeaders(map[string]string{"Content-Type": "application/json;charset=UTF-8"}).
|
||||
Delete(requestURI2NF)
|
||||
if err != nil {
|
||||
log.Error("Failed to delete:", err)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
} else {
|
||||
var response services.MapResponse
|
||||
_ = json.Unmarshal(resp.Body(), &response)
|
||||
services.ResponseWithJson(w, resp.StatusCode(), response)
|
||||
return
|
||||
@@ -217,7 +435,7 @@ func GetUENumFromNF(w http.ResponseWriter, r *http.Request) {
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
} else {
|
||||
var response services.DataResponse
|
||||
var response services.MapResponse
|
||||
_ = json.Unmarshal(resp.Body(), &response)
|
||||
services.ResponseWithJson(w, resp.StatusCode(), response)
|
||||
return
|
||||
@@ -281,9 +499,75 @@ func GetNBInfoFromNF(w http.ResponseWriter, r *http.Request) {
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
} else {
|
||||
var response services.DataResponse
|
||||
var response services.MapResponse
|
||||
_ = json.Unmarshal(resp.Body(), &response)
|
||||
services.ResponseWithJson(w, resp.StatusCode(), response)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// Get GetUEInfoFileExportNF from NF/NFs
|
||||
func GetUEInfoFileExportNF(w http.ResponseWriter, r *http.Request) {
|
||||
log.Info("GetUEInfoFromNF processing... ")
|
||||
|
||||
// vars := mux.Vars(r)
|
||||
// neType := vars["elementTypeValue"]
|
||||
// if neType == "" {
|
||||
// services.ResponseNotFound404UriNotExist(w, r)
|
||||
// return
|
||||
// }
|
||||
//neTypeLower := strings.ToLower(neType)
|
||||
var neId string
|
||||
neIds := services.GetParamsArrByName("neId", r)
|
||||
if len(neIds) == 1 {
|
||||
neId = neIds[0]
|
||||
} else {
|
||||
services.ResponseNotFound404UriNotExist(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
// token, err := services.CheckFrontValidRequest(w, r)
|
||||
// if err != nil {
|
||||
// log.Error("Request error:", err)
|
||||
// return
|
||||
// }
|
||||
// log.Debug("token:", token)
|
||||
|
||||
neInfo, err := dborm.XormGetNeInfo("PCF", neId)
|
||||
if err != nil {
|
||||
log.Error("Failed to XormGetNeInfo:", err)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
} else if neInfo == nil {
|
||||
err := global.ErrCMNotFoundTargetNE
|
||||
log.Error(global.ErrCMNotFoundTargetNE)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
}
|
||||
log.Trace("neInfo:", neInfo)
|
||||
|
||||
hostUri := fmt.Sprintf("http://%s:%v", neInfo.Ip, neInfo.Port)
|
||||
requestURI2NF := fmt.Sprintf("%s%s", hostUri, r.RequestURI)
|
||||
|
||||
log.Debug("requestURI2NF:", requestURI2NF)
|
||||
|
||||
resp, err := client.R().
|
||||
EnableTrace().
|
||||
SetHeaders(map[string]string{tokenConst.HEADER_KEY: r.Header.Get(tokenConst.HEADER_KEY)}).
|
||||
// SetHeaders(map[string]string{"accessToken": token}).
|
||||
SetHeaders(map[string]string{"User-Agent": config.GetDefaultUserAgent()}).
|
||||
SetHeaders(map[string]string{"Content-Type": "application/json;charset=UTF-8"}).
|
||||
Get(requestURI2NF)
|
||||
if err != nil {
|
||||
log.Error("Get system state from NF is failed:", err)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
} else {
|
||||
w.WriteHeader(resp.StatusCode())
|
||||
w.Write(resp.Body())
|
||||
// var response services.MapResponse
|
||||
// _ = json.Unmarshal(resp.Body(), &response)
|
||||
// services.ResponseWithJson(w, resp.StatusCode(), response)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
35
go.mod
35
go.mod
@@ -1,6 +1,8 @@
|
||||
module ems.agt
|
||||
|
||||
go 1.20
|
||||
go 1.21
|
||||
|
||||
toolchain go1.21.0
|
||||
|
||||
require (
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible
|
||||
@@ -31,8 +33,8 @@ require (
|
||||
github.com/xuri/excelize/v2 v2.7.1
|
||||
github.com/xuri/xgen v0.0.0-20230702070049-db840e1a4605
|
||||
github.com/ziutek/telnet v0.0.0-20180329124119-c3b780dc415b
|
||||
golang.org/x/crypto v0.12.0
|
||||
golang.org/x/term v0.11.0
|
||||
golang.org/x/crypto v0.16.0
|
||||
golang.org/x/term v0.15.0
|
||||
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
gorm.io/driver/mysql v1.5.1
|
||||
@@ -41,7 +43,20 @@ require (
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/KyleBanks/depth v1.2.1 // indirect
|
||||
github.com/PuerkitoBio/purell v1.2.1 // indirect
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
|
||||
github.com/go-admin-team/go-admin-core v1.3.12-0.20221121065133-27b7dbe27a8f // indirect
|
||||
github.com/go-openapi/jsonpointer v0.20.0 // indirect
|
||||
github.com/go-openapi/jsonreference v0.20.2 // indirect
|
||||
github.com/go-openapi/spec v0.20.11 // indirect
|
||||
github.com/go-openapi/swag v0.22.4 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/swaggo/swag v1.16.2 // indirect
|
||||
github.com/urfave/cli/v2 v2.26.0 // indirect
|
||||
github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e // indirect
|
||||
sigs.k8s.io/yaml v1.4.0 // indirect
|
||||
xorm.io/core v0.7.2-0.20190928055935-90aeac8d08eb // indirect
|
||||
)
|
||||
|
||||
@@ -55,7 +70,7 @@ require (
|
||||
github.com/chanxuehong/rand v0.0.0-20201110082127-2f19a1bdd973 // indirect
|
||||
github.com/chanxuehong/wechat v0.0.0-20201110083048-0180211b69fd // indirect
|
||||
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239 // indirect
|
||||
github.com/fatih/color v1.13.0 // indirect
|
||||
@@ -108,7 +123,7 @@ require (
|
||||
github.com/reiver/go-oi v1.0.0 // indirect
|
||||
github.com/richardlehane/mscfb v1.0.4 // indirect
|
||||
github.com/richardlehane/msoleps v1.0.3 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.0.1 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/shoenig/go-m1cpu v0.1.6 // indirect
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
|
||||
github.com/spf13/cast v1.5.1 // indirect
|
||||
@@ -128,14 +143,14 @@ require (
|
||||
github.com/yusufpapurcu/wmi v1.2.3 // indirect
|
||||
golang.org/x/arch v0.3.0 // indirect
|
||||
golang.org/x/image v0.5.0 // indirect
|
||||
golang.org/x/net v0.10.0
|
||||
golang.org/x/sys v0.11.0 // indirect
|
||||
golang.org/x/text v0.12.0 // indirect
|
||||
golang.org/x/tools v0.6.0 // indirect
|
||||
golang.org/x/net v0.19.0
|
||||
golang.org/x/sys v0.15.0 // indirect
|
||||
golang.org/x/text v0.14.0 // indirect
|
||||
golang.org/x/tools v0.16.1 // indirect
|
||||
google.golang.org/protobuf v1.30.0 // indirect
|
||||
gopkg.in/AlecAivazis/survey.v1 v1.8.5 // indirect
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/kyokomi/emoji.v1 v1.5.1 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
|
||||
59
go.sum
59
go.sum
@@ -44,9 +44,15 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw=
|
||||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
|
||||
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
|
||||
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
|
||||
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
|
||||
github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8 h1:xzYJEypr/85nBpB11F9br+3HUrpgb+fcm5iADzXXYEw=
|
||||
github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc=
|
||||
github.com/PuerkitoBio/purell v1.2.1 h1:QsZ4TjvwiMpat6gBCBxEQI0rcS9ehtkKtSpiUnd9N28=
|
||||
github.com/PuerkitoBio/purell v1.2.1/go.mod h1:ZwHcC/82TOaovDi//J/804umJFFmbOHPngi8iYYv/Eo=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
|
||||
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
|
||||
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
|
||||
@@ -112,8 +118,11 @@ github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7
|
||||
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/creack/pty v1.1.7 h1:6pwm8kMQKCmgUg0ZHTm5+/YvRK0s3THD/28+T6/kk4A=
|
||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
@@ -179,6 +188,21 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V
|
||||
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
|
||||
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
|
||||
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
||||
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
||||
github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs=
|
||||
github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ=
|
||||
github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA=
|
||||
github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo=
|
||||
github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE=
|
||||
github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k=
|
||||
github.com/go-openapi/spec v0.20.11 h1:J/TzFDLTt4Rcl/l1PmyErvkqlJDncGvPTMnCI39I4gY=
|
||||
github.com/go-openapi/spec v0.20.11/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA=
|
||||
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||
github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
|
||||
github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
|
||||
github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU=
|
||||
github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
|
||||
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
|
||||
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
|
||||
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
|
||||
@@ -407,6 +431,8 @@ github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=
|
||||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
||||
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
@@ -430,12 +456,14 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxv
|
||||
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/pty v1.1.8 h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI=
|
||||
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
|
||||
github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
|
||||
github.com/lestrrat/go-envload v0.0.0-20180220120943-6ed08b54a570 h1:0iQektZGS248WXmGIYOwRXSQhD4qn3icjMpuxwO7qlo=
|
||||
@@ -457,6 +485,11 @@ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2
|
||||
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
|
||||
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
|
||||
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
|
||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
|
||||
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
|
||||
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
|
||||
github.com/matoous/go-nanoid v1.5.0/go.mod h1:zyD2a71IubI24efhpvkJz+ZwfwagzgSO6UNiFsZKN7U=
|
||||
github.com/matoous/go-nanoid/v2 v2.0.0 h1:d19kur2QuLeHmJBkvYkFdhFBzLoo1XVm2GgTpL+9Tj0=
|
||||
github.com/matoous/go-nanoid/v2 v2.0.0/go.mod h1:FtS4aGPVfEkxKxhdWPAspZpZSh1cOjtM7Ej/So3hR0g=
|
||||
@@ -521,6 +554,7 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE
|
||||
github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
||||
github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
||||
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||
github.com/nsqio/go-nsq v1.0.8 h1:3L2F8tNLlwXXlp2slDUrUWSBn2O3nMh8R1/KEDFTHPk=
|
||||
github.com/nsqio/go-nsq v1.0.8/go.mod h1:vKq36oyeVXgsS5Q8YEO7WghqidAVXQlcFxzQbQTuDEY=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
@@ -617,6 +651,8 @@ github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OK
|
||||
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
|
||||
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
|
||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
|
||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
@@ -679,6 +715,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8=
|
||||
github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
|
||||
github.com/swaggo/swag v1.16.2 h1:28Pp+8DkQoV+HLzLx8RGJZXNGKbFqnuvSbAAtoxiY04=
|
||||
github.com/swaggo/swag v1.16.2/go.mod h1:6YzXnDcpr0767iOejs318CwYkCQqyGer6BizOg03f+E=
|
||||
github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE=
|
||||
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
|
||||
github.com/tebeka/strftime v0.1.5 h1:1NQKN1NiQgkqd/2moD6ySP/5CoZQsKa1d3ZhJ44Jpmg=
|
||||
@@ -700,7 +738,11 @@ github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZ
|
||||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||
github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY=
|
||||
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||
github.com/urfave/cli/v2 v2.26.0 h1:3f3AMg3HpThFNT4I++TKOejZO8yU55t3JnnSr4S4QEI=
|
||||
github.com/urfave/cli/v2 v2.26.0/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ=
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||
github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e h1:+SOyEddqYF09QP7vr7CgJ1eti3pY9Fn3LHO1M1r/0sI=
|
||||
github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
|
||||
github.com/xuri/efp v0.0.0-20220603152613-6918739fd470 h1:6932x8ltq1w4utjmfMPVj09jdMlkY0aiA6+Skbtl3/c=
|
||||
github.com/xuri/efp v0.0.0-20220603152613-6918739fd470/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
|
||||
github.com/xuri/excelize/v2 v2.7.1 h1:gm8q0UCAyaTt3MEF5wWMjVdmthm2EHAWesGSKS9tdVI=
|
||||
@@ -768,6 +810,8 @@ golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0
|
||||
golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE=
|
||||
golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk=
|
||||
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
|
||||
golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY=
|
||||
golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
@@ -856,6 +900,8 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
|
||||
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
|
||||
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
@@ -951,6 +997,8 @@ golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
|
||||
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
|
||||
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
@@ -958,6 +1006,8 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
|
||||
golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0=
|
||||
golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=
|
||||
golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4=
|
||||
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
@@ -970,6 +1020,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc=
|
||||
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
@@ -1035,6 +1087,8 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA=
|
||||
golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0=
|
||||
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
@@ -1152,6 +1206,8 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
@@ -1175,6 +1231,7 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
@@ -1305,6 +1362,8 @@ rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
|
||||
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
|
||||
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
|
||||
xorm.io/builder v0.3.6/go.mod h1:LEFAPISnRzG+zxaxj2vPicRwz67BdhFreKg8yv8/TgU=
|
||||
xorm.io/builder v0.3.11-0.20220531020008-1bd24a7dc978 h1:bvLlAPW1ZMTWA32LuZMBEGHAUOcATZjzHcotf3SWweM=
|
||||
|
||||
@@ -13,9 +13,6 @@ func PageNumSize(pageNum, pageSize any) (int, int) {
|
||||
pageNumStr := fmt.Sprintf("%v", pageNum)
|
||||
num := 1
|
||||
if v, err := strconv.Atoi(pageNumStr); err == nil && v > 0 {
|
||||
if num > 5000 {
|
||||
num = 5000
|
||||
}
|
||||
num = v
|
||||
}
|
||||
|
||||
@@ -23,13 +20,7 @@ func PageNumSize(pageNum, pageSize any) (int, int) {
|
||||
pageSizeStr := fmt.Sprintf("%v", pageSize)
|
||||
size := 10
|
||||
if v, err := strconv.Atoi(pageSizeStr); err == nil && v > 0 {
|
||||
if size < 0 {
|
||||
size = 10
|
||||
} else if size > 1000 {
|
||||
size = 1000
|
||||
} else {
|
||||
size = v
|
||||
}
|
||||
size = v
|
||||
}
|
||||
return num - 1, size
|
||||
}
|
||||
|
||||
@@ -99,6 +99,11 @@ func init() {
|
||||
Register("PUT", dbrest.CustomXormCommonUri, dbrest.DatabaseUpdateData, nil)
|
||||
Register("DELETE", dbrest.CustomXormCommonUri, dbrest.DatabaseDeleteData, nil)
|
||||
|
||||
Register("GET", dbrest.XormDataRestUri, dbrest.ExtDatabaseGetData, nil)
|
||||
Register("POST", dbrest.XormDataRestUri, dbrest.ExtDatabaseInsertData, nil)
|
||||
Register("PUT", dbrest.XormDataRestUri, dbrest.ExtDatabaseUpdateData, nil)
|
||||
Register("DELETE", dbrest.XormDataRestUri, dbrest.ExtDatabaseDeleteData, nil)
|
||||
|
||||
Register("GET", dbrest.XormExtDataUri, dbrest.ExtDatabaseGetData, nil)
|
||||
Register("POST", dbrest.XormExtDataUri, dbrest.ExtDatabaseInsertData, nil)
|
||||
Register("PUT", dbrest.XormExtDataUri, dbrest.ExtDatabaseUpdateData, nil)
|
||||
@@ -247,11 +252,34 @@ func init() {
|
||||
// AAAA
|
||||
Register("GET", aaaa.CustomUriAAAASSO, aaaa.GetSSOFromAAAA, nil)
|
||||
|
||||
// UEInfo
|
||||
// UEInfo: SMF
|
||||
Register("GET", ue.UriUEInfo, ue.GetUEInfoFromNF, nil)
|
||||
Register("GET", ue.CustomUriUEInfo, ue.GetUEInfoFromNF, nil)
|
||||
|
||||
// UEInfo
|
||||
// UEInfo: PCF
|
||||
Register("GET", ue.UriPCFUser, ue.GetUEInfoFromNF, nil)
|
||||
Register("GET", ue.CustomUriPCFUser, ue.GetUEInfoFromNF, nil)
|
||||
Register("POST", ue.UriPCFUser, ue.PostPCFUserInfo, nil)
|
||||
Register("POST", ue.CustomUriPCFUser, ue.PostPCFUserInfo, nil)
|
||||
Register("PUT", ue.UriPCFUser, ue.PutPCFUserInfo, nil)
|
||||
Register("PUT", ue.CustomUriPCFUser, ue.PutPCFUserInfo, nil)
|
||||
Register("DELETE", ue.UriPCFUser, ue.DeletePCFUserInfo, nil)
|
||||
Register("DELETE", ue.CustomUriPCFUser, ue.DeletePCFUserInfo, nil)
|
||||
|
||||
// PCFUEInfo: batch add/modify/delete
|
||||
Register("POST", ue.UriPCFUserM, ue.PostPCFUserInfo, nil)
|
||||
Register("POST", ue.CustomUriPCFUserM, ue.PostPCFUserInfo, nil)
|
||||
Register("PUT", ue.UriPCFUserM, ue.PutPCFUserInfo, nil)
|
||||
Register("PUT", ue.CustomUriPCFUserM, ue.PutPCFUserInfo, nil)
|
||||
Register("DELETE", ue.UriPCFUserM, ue.DeletePCFUserInfo, nil)
|
||||
Register("DELETE", ue.CustomUriPCFUserM, ue.DeletePCFUserInfo, nil)
|
||||
//PCF User file
|
||||
Register("GET", ue.UriPCFUserFileExport, ue.GetUEInfoFileExportNF, nil)
|
||||
Register("GET", ue.CustomUriPCFUserFileExport, ue.GetUEInfoFromNF, nil)
|
||||
Register("PUT", ue.UriPCFUserFileImport, ue.PutPCFUserInfo, nil)
|
||||
Register("PUT", ue.CustomUriPCFUserFileImport, ue.PutPCFUserInfo, nil)
|
||||
|
||||
// UE Number
|
||||
Register("GET", ue.UriUENum, ue.GetUENumFromNF, nil)
|
||||
Register("GET", ue.CustomUriUENum, ue.GetUENumFromNF, nil)
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@ type DataResponse struct {
|
||||
Data interface{} `json:"data"`
|
||||
}
|
||||
|
||||
type MapResponse map[string]any
|
||||
|
||||
type NullResponse struct {
|
||||
nil interface{}
|
||||
}
|
||||
|
||||
4
makefile
4
makefile
@@ -3,7 +3,7 @@
|
||||
ProjectL = omc
|
||||
ProjectU = OMC
|
||||
PROJECT = $(ProjectL)
|
||||
VERSION = 2.2311.8
|
||||
VERSION = 2.2312.8
|
||||
RelDate = `date +%Y%m%d`
|
||||
Release = $(RelDate)
|
||||
RelVer = $(VERSION)-$(RelDate)
|
||||
@@ -122,7 +122,7 @@ deb: $(BINNAME)
|
||||
chmod +x $(DebBuildDir)/usr/local/omc/bin/*
|
||||
#sed -i.bak 's/YYYYMMDD/$(shell date +"%Y%m%d")/g' $(DebBuildDir)/DEBIAN/control
|
||||
sed -i 's/YYYYMMDD/$(shell date +"%Y%m%d")/g' $(DebBuildDir)/DEBIAN/control
|
||||
sed -i '74 s/user: root/user: agtuser/g' $(DebBuildDir)/usr/local/omc/etc/default/restconf.yaml
|
||||
perl -0777 -i -pe 's/ne:\n user: root/ne:\n user: agtuser/g' $(DebBuildDir)/usr/local/omc/etc/default/restconf.yaml
|
||||
dpkg -b $(DebBuildDir) $(ReleaseDebs)/$(DebPkgFile)
|
||||
|
||||
rpm: $(BINNAME)
|
||||
|
||||
191
misc/installOMC.sh
Normal file
191
misc/installOMC.sh
Normal file
@@ -0,0 +1,191 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "-------------------please input-------------------"
|
||||
#please input the new nf ip
|
||||
read -p "please input your OMC IP: " OMCIP
|
||||
|
||||
echo "-----------------please continue to enter-----------------"
|
||||
read -p "please input your IMS IP: " IMSIP
|
||||
|
||||
echo "-----------------please continue to enter-----------------"
|
||||
read -p "please input your AMF IP: " AMFIP
|
||||
|
||||
echo "-----------------please continue to enter-----------------"
|
||||
read -p "please input your AUSF IP: " AUSFIP
|
||||
|
||||
echo "-----------------please continue to enter-----------------"
|
||||
read -p "please input your UDM IP: " UDMIP
|
||||
|
||||
echo "-----------------please continue to enter-----------------"
|
||||
read -p "please input your SMF IP: " SMFIP
|
||||
|
||||
echo "-----------------please continue to enter-----------------"
|
||||
read -p "please input your PCF IP: " PCFIP
|
||||
|
||||
echo "-----------------please continue to enter-----------------"
|
||||
read -p "please input your NSSF IP: " NSSFIP
|
||||
|
||||
echo "-----------------please continue to enter-----------------"
|
||||
read -p "please input your NRF IP: " NRFIP
|
||||
|
||||
echo "-----------------please continue to enter-----------------"
|
||||
read -p "please input your UPF IP: " UPFIP
|
||||
|
||||
echo "-----------------please continue to enter-----------------"
|
||||
read -p "please input your MME IP: " MMEIP
|
||||
|
||||
echo "------------please continue to enter Vm account-------------"
|
||||
read -p "please input your username: " username
|
||||
|
||||
echo "------------please continue to enter Vm password-------------"
|
||||
read -p "please input your passwd: " passwd
|
||||
|
||||
cd /home/agtuser
|
||||
|
||||
#Creating a local source
|
||||
tar -xzvf omcpkg*.tar.gz
|
||||
|
||||
mv /etc/apt/sources.list /etc/apt/sources.list-bak
|
||||
|
||||
echo "deb [trusted=yes] file:/home/agtuser/omcpkg archives/" > /etc/apt/sources.list
|
||||
|
||||
sleep 1
|
||||
|
||||
apt update
|
||||
|
||||
sleep 1
|
||||
|
||||
#Database installation
|
||||
apt install -y net-tools software-properties-common
|
||||
|
||||
sleep 1
|
||||
|
||||
apt-key add mariadb_release_signing_key.asc
|
||||
|
||||
apt install -y mariadb-server
|
||||
|
||||
systemctl start mariadb
|
||||
|
||||
mysql --version
|
||||
|
||||
sudo mysql_secure_installation <<-EOF
|
||||
1000omc@kp!
|
||||
y
|
||||
n
|
||||
y
|
||||
y
|
||||
y
|
||||
y
|
||||
EOF
|
||||
|
||||
#You need to enter the password manually:1000omc@kp!
|
||||
|
||||
systemctl enable mariadb
|
||||
|
||||
systemctl restart mariadb
|
||||
|
||||
#Modify mysql datebase root password
|
||||
|
||||
#You need to run the following command
|
||||
mysql -u root <<-EOF
|
||||
use mysql
|
||||
ALTER USER root@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD("1000omc@kp!");
|
||||
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '1000omc@kp!';
|
||||
flush privileges;
|
||||
quit
|
||||
EOF
|
||||
|
||||
sleep 5
|
||||
|
||||
|
||||
echo "port=33066" >> /etc/mysql/mariadb.conf.d/50-server.cnf
|
||||
|
||||
sed -i "s/127.0.0.1/0.0.0.0/g" /etc/mysql/mariadb.conf.d/50-server.cnf
|
||||
|
||||
systemctl restart mariadb
|
||||
|
||||
#Install WEB server
|
||||
apt update
|
||||
|
||||
apt install -y nginx
|
||||
|
||||
systemctl enable nginx
|
||||
systemctl daemon-reload
|
||||
systemctl start nginx
|
||||
|
||||
#Install and config OMC
|
||||
dpkg -i omc*.deb
|
||||
|
||||
cp /usr/local/omc/htdocs/front/default/config.js /usr/local/omc/htdocs/front/
|
||||
|
||||
sed -i "s/192.168.8.100/${OMCIP}/g" /usr/local/omc/htdocs/front/config.js
|
||||
|
||||
cp /usr/local/omc/etc/default/* /usr/local/omc/etc
|
||||
|
||||
sed -i "76s/user: root/user: ${username}/" /usr/local/omc/etc/restconf.yaml
|
||||
|
||||
#Database configuration
|
||||
/usr/local/omc/bin/importdb.sh <<-EOF
|
||||
Install
|
||||
EOF
|
||||
|
||||
#Configure the trusted gateway of the managed NE
|
||||
apt install -y expect
|
||||
|
||||
echo "${OMCIP} ${username} ${passwd}" > /usr/local/omc/bin/nehosts
|
||||
echo "${IMSIP} ${username} ${passwd}" >> /usr/local/omc/bin/nehosts
|
||||
echo "${AMFIP} ${username} ${passwd}" >> /usr/local/omc/bin/nehosts
|
||||
echo "${AUSFIP} ${username} ${passwd}" >> /usr/local/omc/bin/nehosts
|
||||
echo "${UDMIP} ${username} ${passwd}" >> /usr/local/omc/bin/nehosts
|
||||
echo "${SMFIP} ${username} ${passwd}" >> /usr/local/omc/bin/nehosts
|
||||
echo "${PCFIP} ${username} ${passwd}" >> /usr/local/omc/bin/nehosts
|
||||
echo "${NSSFIP} ${username} ${passwd}" >> /usr/local/omc/bin/nehosts
|
||||
echo "${NRFIP} ${username} ${passwd}" >> /usr/local/omc/bin/nehosts
|
||||
echo "${UPFIP} ${username} ${passwd}" >> /usr/local/omc/bin/nehosts
|
||||
echo "${MMEIP} ${username} ${passwd}" >> /usr/local/omc/bin/nehosts
|
||||
|
||||
sleep 1
|
||||
|
||||
cd /usr/local/omc/bin
|
||||
/usr/local/omc/bin/cpsshkey.sh
|
||||
|
||||
cd /home/agtuser
|
||||
|
||||
sleep 5
|
||||
|
||||
#adb server configuration
|
||||
cp /usr/local/db/bin/conf/default/redis.conf /usr/local/db/bin/conf/redis.conf
|
||||
|
||||
sed -i "s/172.16.5.140/${UDMIP}/g" /usr/local/db/bin/conf/redis.conf
|
||||
|
||||
#Modifying User Rights
|
||||
sudo echo "agtuser ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||
sudo echo "agtuser ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||
|
||||
sudo scp /etc/sudoers ${username}@${IMSIP}:/home/agtuser
|
||||
sudo scp /etc/sudoers ${username}@${AMFIP}:/home/agtuser
|
||||
sudo scp /etc/sudoers ${username}@${AUSFIP}:/home/agtuser
|
||||
sudo scp /etc/sudoers ${username}@${UDMIP}:/home/agtuser
|
||||
sudo scp /etc/sudoers ${username}@${SMFIP}:/home/agtuser
|
||||
sudo scp /etc/sudoers ${username}@${PCFIP}:/home/agtuser
|
||||
sudo scp /etc/sudoers ${username}@${NSSFIP}:/home/agtuser
|
||||
sudo scp /etc/sudoers ${username}@${NRFIP}:/home/agtuser
|
||||
sudo scp /etc/sudoers ${username}@${UPFIP}:/home/agtuser
|
||||
sudo scp /etc/sudoers ${username}@${MMEIP}:/home/agtuser
|
||||
|
||||
#Run the following commands on each NE VM:
|
||||
#cp sudoers /etc/sudoers
|
||||
|
||||
sleep 5
|
||||
|
||||
#Service initiation
|
||||
systemctl enable restagent.service
|
||||
systemctl enable crontask.service
|
||||
systemctl daemon-reload
|
||||
|
||||
/usr/local/omc/bin//omcsvc.sh restart
|
||||
|
||||
systemctl restart nginx
|
||||
|
||||
|
||||
echo "-----------------config complete------------"
|
||||
15
misc/nehosts
15
misc/nehosts
@@ -1,3 +1,16 @@
|
||||
# host user password
|
||||
# Example: 192.168.4.133 root password
|
||||
192.168.4.233 root Admin123@pl
|
||||
172.16.5.100 agtuser admin123
|
||||
172.16.5.110 agtuser admin123
|
||||
172.16.5.120 agtuser admin123
|
||||
172.16.5.130 agtuser admin123
|
||||
172.16.5.140 agtuser admin123
|
||||
172.16.5.150 agtuser admin123
|
||||
172.16.5.160 agtuser admin123
|
||||
172.16.5.170 agtuser admin123
|
||||
172.16.5.180 agtuser admin123
|
||||
172.16.5.190 agtuser admin123
|
||||
172.16.5.220 agtuser admin123
|
||||
172.16.5.230 agtuser admin123
|
||||
172.16.5.210 agtuser admin123
|
||||
172.16.5.200 agtuser admin123
|
||||
|
||||
24
mkpkg.sh
24
mkpkg.sh
@@ -2,23 +2,23 @@
|
||||
|
||||
ProcList="restagent crontask sshsvc captrace data2html"
|
||||
ProjectL=omc
|
||||
VERSION=2.2311.8
|
||||
VERSION=2.2312.8
|
||||
RelDate=`date +%Y%m%d`
|
||||
Release=$RelDate
|
||||
RelVer=$VERSION-$RelDate
|
||||
Release=${RelDate}
|
||||
RelVer=${VERSION}-${RelDate}
|
||||
Ky10Arch=ky10.aarch64
|
||||
RpmPkgName=$ProjectL-$RelVer.ky10.aarch64.rpm
|
||||
RpmPkgRename=$ProjectL-r$RelVer.ky10.rpm
|
||||
DebPkgName=$ProjectL-r$RelVer_u*.deb
|
||||
GitLocalRoot=$HOME/local.git
|
||||
EmsBEDir=$GitLocalRoot/ems.agt
|
||||
EmsBuildRoot=$GitLocalRoot/build.ems
|
||||
RpmPkgName=${ProjectL}-${RelVer}.ky10.aarch64.rpm
|
||||
RpmPkgRename=${ProjectL}-r${RelVer}_ky10.rpm
|
||||
DebPkgName=${ProjectL}-r${RelVer}_u*.deb
|
||||
GitLocalRoot=${HOME}/local.git
|
||||
EmsBEDir=${GitLocalRoot}/ems.agt
|
||||
EmsBuildRoot=${GitLocalRoot}/build.ems
|
||||
RpmArch=`arch`
|
||||
RpmsDir=$EmsBuildRoot/rpmbuild/RPMS/
|
||||
ReleaseDir=$EmsBuildRoot/release
|
||||
RpmsDir=${EmsBuildRoot}/rpmbuild/RPMS/
|
||||
ReleaseDir=${EmsBuildRoot}/release
|
||||
DumpToolDir=${EmsBEDir}/tools/misc
|
||||
|
||||
if [[ $RpmArch =~ "x86_64" ]];then
|
||||
if [[ ${RpmArch} =~ "x86_64" ]];then
|
||||
RelArch=amd64
|
||||
elif [[ $RpmArch =~ "aarch64" ]];then
|
||||
RelArch=arm64
|
||||
|
||||
@@ -100,24 +100,26 @@ type YamlConfig struct {
|
||||
} `yaml:"alarm"`
|
||||
|
||||
MML struct {
|
||||
Port int `yaml:"port"`
|
||||
Sleep int64 `yaml:"sleep"`
|
||||
User string `yaml:"user"`
|
||||
Password string `ymal:"password"`
|
||||
MmlHome string `yaml:"mmlHome"`
|
||||
Upload string `yaml:"upload"`
|
||||
Port int `yaml:"port"`
|
||||
Sleep int64 `yaml:"sleep"`
|
||||
User string `yaml:"user"`
|
||||
Password string `ymal:"password"`
|
||||
MmlHome string `yaml:"mmlHome"`
|
||||
Upload string `yaml:"upload"`
|
||||
UpfHeaderLength int `yaml:"upfHeaderLength"`
|
||||
} `yaml:"mml"`
|
||||
|
||||
NE struct {
|
||||
Addr string `yaml:"addr"`
|
||||
Port uint16 `yaml:"port"`
|
||||
User string `yaml:"user"`
|
||||
EtcDir string `yaml:"etcdir"`
|
||||
BinDir string `yaml:"bindir"`
|
||||
OmcDir string `yaml:"omcdir"`
|
||||
ScpDir string `yaml:"scpdir"`
|
||||
LicenseDir string `yaml:"licensedir"`
|
||||
EtcListIMS string `yaml:"etcListIMS"`
|
||||
Addr string `yaml:"addr"`
|
||||
Port uint16 `yaml:"port"`
|
||||
User string `yaml:"user"`
|
||||
EtcDir string `yaml:"etcdir"`
|
||||
BinDir string `yaml:"bindir"`
|
||||
OmcDir string `yaml:"omcdir"`
|
||||
ScpDir string `yaml:"scpdir"`
|
||||
LicenseDir string `yaml:"licensedir"`
|
||||
EtcListIMS string `yaml:"etcListIMS"`
|
||||
EtcListDefault string `yaml:"etcListDefault"`
|
||||
} `yaml:"ne"`
|
||||
|
||||
Auth struct {
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIC4jCCAcqgAwIBAgICB+cwDQYJKoZIhvcNAQELBQAwEjEQMA4GA1UEAxMHUm9v
|
||||
dCBDQTAeFw0yMzA4MTIxODA5MzZaFw0zMzA4MTIxODA5MzZaMBIxEDAOBgNVBAMT
|
||||
B1Jvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCUTcFiT1GT
|
||||
Zq9ROKTuWm6IfFthO6ysthEKevwkgJGDRCwF+K6rx3j7izTDfLkXum5OPbcd/yiE
|
||||
B40Yrq9X2ckX260xG9PjDmGUaq8q5sza85Gg2hrW6wiLF9y8yYK3/v7716d0y6st
|
||||
jt71pH554R98m0zHkbkmrFEagWR5cEoVM6MPZp2wdDnOFBBRiB1BrbHMpAFiKJ6s
|
||||
oqm1yhUwCeeR/Hs09JF8KfOFhV4qAEVvE1cviHucCEvLBaG6xBzbKvYV2iOPu6u2
|
||||
o818wphqmSZYoj3/O4/EyVgvj1VdSqmkTSudiiIhLAa8/2JKrW1v7wFQjRkwNwdf
|
||||
h6UR5liIUwk7AgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTAD
|
||||
AQH/MB0GA1UdDgQWBBRtEF/Jyw6Zz3v0K5uA6aMOr9LXRTANBgkqhkiG9w0BAQsF
|
||||
AAOCAQEAErmFo6JjEoFZv8R2gwNUq7ln+YEh2hX4myLlNDfTpYeGnn2Ge70Kmb0o
|
||||
dkSyanDd9tGImcbEOttWAYve3vetvN3g+GONbf5pV7ClIbVV5MsjN/aGwj/TQWhu
|
||||
ttmfu9IV2b5HyFEM61eoHVrNoWiNpbNHTu5D/XF8sg5JkseTnJF06foykzAx28i6
|
||||
JcttunYn5SoWTIS9Ydu07X7uBcTeFBcKfH0xg4QlsNppiM5lIxBbp0WjQ8jyWw+b
|
||||
Lyef4N6hmiaOf6P6qwaVZkEBhK6MVf1zadURuUSWAkhwGFjA7IbjbJ7OfYLXkYp3
|
||||
mIrXQzjxz6AfyOcY/FsgcaDLf5xbYw==
|
||||
-----END CERTIFICATE-----
|
||||
@@ -1,27 +0,0 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEpAIBAAKCAQEAlE3BYk9Rk2avUTik7lpuiHxbYTusrLYRCnr8JICRg0QsBfiu
|
||||
q8d4+4s0w3y5F7puTj23Hf8ohAeNGK6vV9nJF9utMRvT4w5hlGqvKubM2vORoNoa
|
||||
1usIixfcvMmCt/7++9endMurLY7e9aR+eeEffJtMx5G5JqxRGoFkeXBKFTOjD2ad
|
||||
sHQ5zhQQUYgdQa2xzKQBYiierKKptcoVMAnnkfx7NPSRfCnzhYVeKgBFbxNXL4h7
|
||||
nAhLywWhusQc2yr2Fdojj7urtqPNfMKYapkmWKI9/zuPxMlYL49VXUqppE0rnYoi
|
||||
ISwGvP9iSq1tb+8BUI0ZMDcHX4elEeZYiFMJOwIDAQABAoIBAFVJVhIsXVRwdBg4
|
||||
hBkS5ogVRBPp1obIeYpWadSwH36m4M5aUlE1eKzoRGK7wlIUA8V5FmroxysOkKUG
|
||||
KI5UD6Jp0fLw9uyX46QPqkb4zgyIkFI5u7+nEJW1Flt3Y3Ze7dJ1FbdEPWAIzs3j
|
||||
WFzNC2eEhCYs9pZ3+HhOuzJfUitYU6ts83tazSms+7E027e/v2ubtYOzluEoj4YK
|
||||
MM+ocqJOlXUOhyTATDaLs4fM567bwwFeriODQqmMIhXLf3HiBPfPYhoAlwPUV51L
|
||||
bAjIPwG2/jy0yXPenYOUqSMP1i+XkyTL4eVqOLLQUI+BsEaToS8M7Lf4KRQE0vQm
|
||||
uAkEA9ECgYEAxCsKXtkYXrma8UziSJgQBj88TfACyuYZBPkpBFJhffPVOreYzqmn
|
||||
gsE38oHlLhCrezsxvScivS/Cwt7kgBTE9r6xmH8y2f0P3PNmtazQCqovG1gsNZ1t
|
||||
9PZQmxbVUfx/7KRJ1Q5zX3x5C0P2c6XYv/1h/SQQ8PYXDhRxWZFVSikCgYEAwYlt
|
||||
AoP8j6yHDMk10vJd0fKT1lztcHcQLvH3HQn2kHci2GCxySvcac49hpXTDeNdUzcQ
|
||||
I9UWo1MggNojME3WHUTiZD5DYUzuNUBTkc0kMHWy79/YNAzvF9312MSyJ0NlytBQ
|
||||
ISh0z0sPSxDjW+XCi/8LGu1rrremBqvh0rNIrMMCgYEAt+C8VNHcZRZHpX3y8icP
|
||||
hjuKFGgwxe3Pb/j5uKJb3ktMCUEFjFo8uXTSM5AMuhRIGTgQVIS1rG5zemSh/Wj6
|
||||
g2uWXyKEEQ+D6hGBqjP1wrlpdJE+x3btFdw5DFbn2HT9mF0bFAn6nXu4npWzEw5X
|
||||
UQd67WT8OFIEpF8HLPTs5JkCgYBQlL6dmITU8Vm9mh1d+mnT23NwgnqeJATJ9xcT
|
||||
sS1HE0Of4grEHw4Dw8pcOg+JLcyStE91C+kEEb1ryOdz2kS3JRI5+K6nWZeo9mKV
|
||||
R1u1DZx2QbZMXcJDJriRC7y9mlNMsZVbaPPRx4fTknGHts9c6NEf4hC+y1pGVtSM
|
||||
nPc6bwKBgQCrtb6srow9o0acH7mMmieDuqvT8DQ6rHWoizgneZTuvIo6SPO6nRnR
|
||||
jfgfQkqr9IiLh9awSblQEN9fnddog7a1yS4cUZueiP5dmtFvp4B9Scnt+BoHpOLk
|
||||
rrU2i7grAye4Cd003+pqhSERGCKSzb3fTSYiMypKsxeH2bs8nrRu2A==
|
||||
-----END RSA PRIVATE KEY-----
|
||||
@@ -1,8 +0,0 @@
|
||||
-----BEGIN RSA PUBLIC KEY-----
|
||||
MIIBCgKCAQEAlE3BYk9Rk2avUTik7lpuiHxbYTusrLYRCnr8JICRg0QsBfiuq8d4
|
||||
+4s0w3y5F7puTj23Hf8ohAeNGK6vV9nJF9utMRvT4w5hlGqvKubM2vORoNoa1usI
|
||||
ixfcvMmCt/7++9endMurLY7e9aR+eeEffJtMx5G5JqxRGoFkeXBKFTOjD2adsHQ5
|
||||
zhQQUYgdQa2xzKQBYiierKKptcoVMAnnkfx7NPSRfCnzhYVeKgBFbxNXL4h7nAhL
|
||||
ywWhusQc2yr2Fdojj7urtqPNfMKYapkmWKI9/zuPxMlYL49VXUqppE0rnYoiISwG
|
||||
vP9iSq1tb+8BUI0ZMDcHX4elEeZYiFMJOwIDAQAB
|
||||
-----END RSA PUBLIC KEY-----
|
||||
@@ -16,7 +16,7 @@ rest:
|
||||
port: 3040
|
||||
- ipv4: 0.0.0.0
|
||||
ipv6:
|
||||
port: 4443
|
||||
port: 3443
|
||||
scheme: https
|
||||
caFile: ./etc/certs/rootca.crt
|
||||
certFile: ./etc/certs/tsa-omc.crt
|
||||
@@ -28,7 +28,7 @@ webServer:
|
||||
listen:
|
||||
- addr: :80
|
||||
schema: http
|
||||
- addr: :8443
|
||||
- addr: :443
|
||||
scheme: https
|
||||
caFile: ./etc/certs/rootca.crt
|
||||
certFile: ./etc/certs/tsa-omc.crt
|
||||
@@ -61,6 +61,7 @@ redis:
|
||||
# 多个数据源时可以用这个指定默认的数据源
|
||||
defaultDataSourceName: "default"
|
||||
|
||||
# upfHeaderLength: spare upf buffer, must destroy
|
||||
mml:
|
||||
port: 4100
|
||||
sleep: 200
|
||||
@@ -68,6 +69,7 @@ mml:
|
||||
password: admin
|
||||
mmlHome: ./mmlhome
|
||||
upload: /home/agtuser
|
||||
upfHeaderLength: 2335
|
||||
|
||||
# NE config
|
||||
ne:
|
||||
@@ -77,8 +79,9 @@ ne:
|
||||
omcdir: /usr/local/omc
|
||||
scpdir: /tmp
|
||||
licensedir: /usr/local/etc/{neType}/license
|
||||
# backup etc list of IMS
|
||||
# backup etc list of IMS,no space
|
||||
etcListIMS: '{*.yaml,mmtel,vars.cfg}'
|
||||
etcListDefault: '{*.yaml,*.conf,*.cfg}'
|
||||
|
||||
# chk2ne: true/false, if put OmcNeConfig parameters to NE
|
||||
omc:
|
||||
@@ -111,7 +114,7 @@ omc:
|
||||
# Forward interface:
|
||||
# email/sms
|
||||
alarm:
|
||||
forwardAlarm: true
|
||||
forwardAlarm: false
|
||||
email:
|
||||
smtp: mail.agrandtech.com
|
||||
port: 25
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Makefile for rest agent project
|
||||
|
||||
PROJECT = OMC
|
||||
VERSION = 2.2311.8
|
||||
VERSION = 2.2312.8
|
||||
PLATFORM = amd64
|
||||
ARMPLATFORM = aarch64
|
||||
BUILDDIR = ../../build
|
||||
|
||||
@@ -19,6 +19,7 @@ import (
|
||||
"ems.agt/lib/routes"
|
||||
"ems.agt/restagent/config"
|
||||
"ems.agt/src"
|
||||
"ems.agt/src/framework/middleware"
|
||||
libSession "ems.agt/src/lib_features/session"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -73,7 +74,8 @@ func HttpListen(addr string, router http.Handler) {
|
||||
}
|
||||
}
|
||||
|
||||
func HttpListenTLS(addr, certFile, keyFile string, router http.Handler) {
|
||||
func HttpListenTLS(addr, caFile, certFile, keyFile string, router http.Handler) {
|
||||
HttpListenConfigTLS(addr, caFile, certFile, keyFile, router)
|
||||
err := http.ListenAndServeTLS(addr, certFile, keyFile, router)
|
||||
if err != nil {
|
||||
fmt.Println("ListenAndServeTLS err:", err)
|
||||
@@ -92,6 +94,7 @@ func HttpListenConfigTLS(addr, caFile, certFile, keyFile string, router http.Han
|
||||
|
||||
// 创建自定义的TLS配置
|
||||
tlsConfig := &tls.Config{
|
||||
MinVersion: 1,
|
||||
ClientCAs: caCertPool,
|
||||
ClientAuth: tls.RequireAndVerifyClientCert,
|
||||
}
|
||||
@@ -110,7 +113,8 @@ func HttpListenConfigTLS(addr, caFile, certFile, keyFile string, router http.Han
|
||||
}
|
||||
}
|
||||
|
||||
func HttpListenWebServerTLS(addr, certFile, keyFile string) {
|
||||
func HttpListenWebServerTLS(addr, caFile, certFile, keyFile string) {
|
||||
HttpListenConfigTLS(addr, caFile, certFile, keyFile, nil)
|
||||
err := http.ListenAndServeTLS(addr, certFile, keyFile, nil)
|
||||
if err != nil {
|
||||
fmt.Println("ListenAndServeTLS err:", err)
|
||||
@@ -173,6 +177,7 @@ func main() {
|
||||
|
||||
// 默认路由组
|
||||
defaultUriGroup := app.Group(config.DefaultUriPrefix)
|
||||
defaultUriGroup.Use(middleware.PreAuthorize(nil))
|
||||
defaultUriGroup.Use(libSession.SessionHeader())
|
||||
defaultUriGroup.Any("/*any", gin.WrapH(routes.NewRouter()))
|
||||
// 可配置前缀路由组
|
||||
@@ -188,7 +193,7 @@ func main() {
|
||||
if rest.IPv4 != "" {
|
||||
listen := rest.IPv4 + ":" + strconv.Itoa(int(rest.Port))
|
||||
if strings.ToLower(rest.Scheme) == "https" {
|
||||
go HttpListenTLS(listen, rest.CertFile, rest.KeyFile, app)
|
||||
go HttpListenTLS(listen, rest.CaFile, rest.CertFile, rest.KeyFile, app)
|
||||
} else {
|
||||
go HttpListen(listen, app)
|
||||
}
|
||||
@@ -198,7 +203,7 @@ func main() {
|
||||
if rest.IPv6 != "" {
|
||||
listenv6 := "[" + rest.IPv6 + "]" + ":" + strconv.Itoa(int(rest.Port))
|
||||
if strings.ToLower(rest.Scheme) == "https" {
|
||||
go HttpListenTLS(listenv6, rest.CertFile, rest.KeyFile, app)
|
||||
go HttpListenTLS(listenv6, rest.CaFile, rest.CertFile, rest.KeyFile, app)
|
||||
} else {
|
||||
go HttpListen(listenv6, app)
|
||||
}
|
||||
@@ -210,7 +215,7 @@ func main() {
|
||||
http.Handle("/", fs)
|
||||
for _, listen := range conf.WebServer.Listen {
|
||||
if strings.ToLower(listen.Scheme) == "https" {
|
||||
go HttpListenWebServerTLS(listen.Addr, listen.CertFile, listen.KeyFile)
|
||||
go HttpListenWebServerTLS(listen.Addr, listen.CaFile, listen.CertFile, listen.KeyFile)
|
||||
} else {
|
||||
go HttpListenWebServer(listen.Addr)
|
||||
}
|
||||
|
||||
BIN
restagent/static/helpDoc/zh_doc.pdf
Normal file
BIN
restagent/static/helpDoc/zh_doc.pdf
Normal file
Binary file not shown.
BIN
restagent/static/logo/en_brand.png
Normal file
BIN
restagent/static/logo/en_brand.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
BIN
restagent/static/logo/en_icon.png
Normal file
BIN
restagent/static/logo/en_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
restagent/static/logo/zh_brand.png
Normal file
BIN
restagent/static/logo/zh_brand.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
BIN
restagent/static/logo/zh_icon.png
Normal file
BIN
restagent/static/logo/zh_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
@@ -11,7 +11,7 @@ import (
|
||||
"ems.agt/src/modules/common"
|
||||
"ems.agt/src/modules/crontask"
|
||||
"ems.agt/src/modules/monitor"
|
||||
netelement "ems.agt/src/modules/net_element"
|
||||
networkelement "ems.agt/src/modules/network_element"
|
||||
"ems.agt/src/modules/system"
|
||||
"ems.agt/src/modules/trace"
|
||||
|
||||
@@ -117,7 +117,7 @@ func initModulesRoute(app *gin.Engine) {
|
||||
// 系统模块
|
||||
system.Setup(app)
|
||||
// 网元模块
|
||||
netelement.Setup(app)
|
||||
networkelement.Setup(app)
|
||||
// 跟踪模块
|
||||
trace.Setup(app)
|
||||
// 调度任务模块--暂无接口
|
||||
|
||||
Binary file not shown.
BIN
src/assets/template/excel/user_import_template_zh.xlsx
Normal file
BIN
src/assets/template/excel/user_import_template_zh.xlsx
Normal file
Binary file not shown.
@@ -1,19 +1,19 @@
|
||||
# 项目信息
|
||||
framework:
|
||||
name: "ems_agt"
|
||||
version: "0.0.1"
|
||||
name: "CN EMS"
|
||||
version: "2.2312.9"
|
||||
|
||||
# 应用服务配置
|
||||
server:
|
||||
# 服务端口
|
||||
port: 3040
|
||||
port: 3030
|
||||
# 是否开启代理
|
||||
proxy: false
|
||||
|
||||
# 日志
|
||||
logger:
|
||||
fileDir: "/usr/local/omc/log"
|
||||
fileName: "restagent.log"
|
||||
fileDir: "/var/log"
|
||||
fileName: "omc.log"
|
||||
level: 2 # 日志记录的等级 0:silent<1:info<2:warn<3:error
|
||||
maxDay: 180 # 日志会保留 180 天
|
||||
maxSize: 10 # 调整按 10MB 大小的切割
|
||||
@@ -112,7 +112,7 @@ security:
|
||||
refererWhiteList:
|
||||
- "127.0.0.1:3030"
|
||||
xframe:
|
||||
enable: true
|
||||
enable: false
|
||||
value: "SAMEORIGIN"
|
||||
csp:
|
||||
enable: true
|
||||
|
||||
@@ -18,12 +18,3 @@ const (
|
||||
// 仅本人数据权限
|
||||
SELF = "5"
|
||||
)
|
||||
|
||||
// 系统角色数据范围映射
|
||||
var RoleDataScope = map[string]string{
|
||||
ALL: "全部数据权限",
|
||||
CUSTOM: "自定数据权限",
|
||||
DEPT: "部门数据权限",
|
||||
DEPT_AND_CHILD: "部门及以下数据权限",
|
||||
SELF: "仅本人数据权限",
|
||||
}
|
||||
|
||||
@@ -36,6 +36,26 @@ func LoadLocaleData(language string) []localeItem {
|
||||
return localeData
|
||||
}
|
||||
|
||||
// ValueKey 值转换键
|
||||
func ValueKey(language, value string) string {
|
||||
key := value
|
||||
if value == "" {
|
||||
return key
|
||||
}
|
||||
arr, ok := localeMap[language]
|
||||
if !ok || len(arr) == 0 {
|
||||
arr = LoadLocaleData(language)
|
||||
}
|
||||
|
||||
for _, v := range arr {
|
||||
if v.Value == value {
|
||||
key = v.Key
|
||||
break
|
||||
}
|
||||
}
|
||||
return key
|
||||
}
|
||||
|
||||
// TKey 翻译键
|
||||
func TKey(language, key string) string {
|
||||
value := key
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"time"
|
||||
|
||||
"ems.agt/src/framework/constants/common"
|
||||
"ems.agt/src/framework/i18n"
|
||||
"ems.agt/src/framework/utils/ctx"
|
||||
"ems.agt/src/framework/utils/parse"
|
||||
"ems.agt/src/framework/vo/result"
|
||||
@@ -96,6 +97,7 @@ var maskProperties []string = []string{
|
||||
func OperateLog(options Options) gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
c.Set("startTime", time.Now())
|
||||
language := ctx.AcceptLanguage(c)
|
||||
|
||||
// 函数名
|
||||
funcName := c.HandlerName()
|
||||
@@ -108,7 +110,7 @@ func OperateLog(options Options) gin.HandlerFunc {
|
||||
// 获取登录用户信息
|
||||
loginUser, err := ctx.LoginUser(c)
|
||||
if err != nil {
|
||||
c.JSON(401, result.CodeMsg(401, "无效身份授权"))
|
||||
c.JSON(401, result.CodeMsg(401, i18n.TKey(language, err.Error())))
|
||||
c.Abort() // 停止执行后续的处理函数
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
AdminConstants "ems.agt/src/framework/constants/admin"
|
||||
commonConstants "ems.agt/src/framework/constants/common"
|
||||
"ems.agt/src/framework/i18n"
|
||||
ctxUtils "ems.agt/src/framework/utils/ctx"
|
||||
tokenUtils "ems.agt/src/framework/utils/token"
|
||||
"ems.agt/src/framework/vo/result"
|
||||
@@ -12,6 +13,9 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
/**无Token可访问白名单 */
|
||||
var URL_WHITE_LIST = []string{"/performanceManagement", "/faultManagement"}
|
||||
|
||||
// PreAuthorize 用户身份授权认证校验
|
||||
//
|
||||
// 只需含有其中角色 "hasRoles": {"xxx"},
|
||||
@@ -23,10 +27,27 @@ import (
|
||||
// 同时匹配其中权限 "matchPerms": {"xxx"},
|
||||
func PreAuthorize(options map[string][]string) gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
language := ctxUtils.AcceptLanguage(c)
|
||||
|
||||
requestURI := c.Request.RequestURI
|
||||
|
||||
// 判断白名单
|
||||
isWhite := false
|
||||
for _, w := range URL_WHITE_LIST {
|
||||
if strings.Contains(requestURI, w) {
|
||||
isWhite = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if isWhite {
|
||||
c.Next()
|
||||
return
|
||||
}
|
||||
|
||||
// 获取请求头标识信息
|
||||
tokenStr := ctxUtils.Authorization(c)
|
||||
if tokenStr == "" {
|
||||
c.JSON(401, result.CodeMsg(401, "无效身份授权"))
|
||||
c.JSON(401, result.CodeMsg(401, i18n.TKey(language, "app.common.err401")))
|
||||
c.Abort() // 停止执行后续的处理函数
|
||||
return
|
||||
}
|
||||
@@ -42,7 +63,7 @@ func PreAuthorize(options map[string][]string) gin.HandlerFunc {
|
||||
// 获取缓存的用户信息
|
||||
loginUser := tokenUtils.LoginUser(claims)
|
||||
if loginUser.UserID == "" {
|
||||
c.JSON(401, result.CodeMsg(401, "无效身份授权"))
|
||||
c.JSON(401, result.CodeMsg(401, i18n.TKey(language, "app.common.err401")))
|
||||
c.Abort() // 停止执行后续的处理函数
|
||||
return
|
||||
}
|
||||
@@ -60,7 +81,7 @@ func PreAuthorize(options map[string][]string) gin.HandlerFunc {
|
||||
perms := loginUser.Permissions
|
||||
verifyOk := verifyRolePermission(roles, perms, options)
|
||||
if !verifyOk {
|
||||
msg := fmt.Sprintf("无权访问 %s %s", c.Request.Method, c.Request.RequestURI)
|
||||
msg := i18n.TTemplate(language, "app.common.err403", map[string]any{"method": c.Request.Method, "requestURI": requestURI})
|
||||
c.JSON(403, result.CodeMsg(403, msg))
|
||||
c.Abort() // 停止执行后续的处理函数
|
||||
return
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
"ems.agt/src/framework/constants/cachekey"
|
||||
"ems.agt/src/framework/i18n"
|
||||
"ems.agt/src/framework/redis"
|
||||
"ems.agt/src/framework/utils/ctx"
|
||||
"ems.agt/src/framework/utils/ip2region"
|
||||
@@ -42,6 +43,8 @@ type LimitOption struct {
|
||||
// 以便获取登录用户信息,无用户信息时默认为 GLOBAL
|
||||
func RateLimit(option LimitOption) gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
|
||||
// 初始可选参数数据
|
||||
if option.Time < 5 {
|
||||
option.Time = 5
|
||||
@@ -66,7 +69,7 @@ func RateLimit(option LimitOption) gin.HandlerFunc {
|
||||
if err != nil {
|
||||
c.JSON(401, result.Err(map[string]any{
|
||||
"code": 401,
|
||||
"msg": err.Error(),
|
||||
"msg": i18n.TKey(language, err.Error()),
|
||||
}))
|
||||
c.Abort() // 停止执行后续的处理函数
|
||||
return
|
||||
@@ -91,7 +94,7 @@ func RateLimit(option LimitOption) gin.HandlerFunc {
|
||||
|
||||
if rateCount >= option.Count {
|
||||
// 访问过于频繁,请稍候再试
|
||||
c.JSON(200, result.ErrMsg("Visits are too frequent. Please try again later"))
|
||||
c.JSON(200, i18n.TKey(language, "app.common.rateLimitTip"))
|
||||
c.Abort() // 停止执行后续的处理函数
|
||||
return
|
||||
}
|
||||
|
||||
@@ -82,13 +82,13 @@ func UaOsBrowser(c *gin.Context) (string, string) {
|
||||
userAgent := c.GetHeader("user-agent")
|
||||
uaInfo := ua.Info(userAgent)
|
||||
|
||||
browser := "Unknown Unknown"
|
||||
browser := "app.common.noUaOsBrowser"
|
||||
bName, bVersion := uaInfo.Browser()
|
||||
if bName != "" && bVersion != "" {
|
||||
browser = bName + " " + bVersion
|
||||
}
|
||||
|
||||
os := "Unknown Unknown"
|
||||
os := "app.common.noUaOsBrowser"
|
||||
bos := uaInfo.OS()
|
||||
if bos != "" {
|
||||
os = bos
|
||||
@@ -116,7 +116,8 @@ func LoginUser(c *gin.Context) (vo.LoginUser, error) {
|
||||
if exists {
|
||||
return value.(vo.LoginUser), nil
|
||||
}
|
||||
return vo.LoginUser{}, fmt.Errorf("invalid login user information")
|
||||
// 登录用户信息无效
|
||||
return vo.LoginUser{}, fmt.Errorf("app.common.noLoginUser")
|
||||
}
|
||||
|
||||
// LoginUserToUserID 登录用户信息-用户ID
|
||||
|
||||
@@ -2,7 +2,9 @@ package file
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"mime/multipart"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
@@ -294,3 +296,57 @@ func ChunkMergeFile(identifier, originalFileName, subPath string) (string, error
|
||||
urlPath := filepath.Join(prefix, filePath, fileName)
|
||||
return filepath.ToSlash(urlPath), nil
|
||||
}
|
||||
|
||||
// CopyUploadFile 将上传文件资源转移新目录
|
||||
//
|
||||
// filePath 上传得到的文件路径 /upload....
|
||||
// dst 新文件路径 /a/xx.pdf
|
||||
func CopyUploadFile(filePath, dst string) error {
|
||||
srcPath := ParseUploadFilePath(filePath)
|
||||
src, err := os.Open(srcPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer src.Close()
|
||||
|
||||
if err := os.MkdirAll(filepath.Dir(dst), 0750); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// 如果目标文件已经存在,先将目标文件重命名
|
||||
if _, err := os.Stat(dst); err == nil {
|
||||
ext := filepath.Ext(dst)
|
||||
name := dst[0 : len(dst)-len(ext)]
|
||||
newName := fmt.Sprintf("%s-%s%s", name, time.Now().Format("20060102_150405"), ext)
|
||||
err := os.Rename(dst, newName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
out, err := os.Create(dst)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer out.Close()
|
||||
|
||||
_, err = io.Copy(out, src)
|
||||
return err
|
||||
}
|
||||
|
||||
// ParseUploadFileDir 得到上传资源目录
|
||||
//
|
||||
// subPath 子路径,默认 UploadSubPath.DEFAULT
|
||||
func ParseUploadFileDir(subPath string) string {
|
||||
_, dir := resourceUpload()
|
||||
filePath := filepath.Join(subPath, date.ParseDatePath(time.Now()))
|
||||
return filepath.Join(dir, filePath)
|
||||
}
|
||||
|
||||
// ParseUploadFilePath 上传资源本地绝对资源路径
|
||||
//
|
||||
// filePath 上传文件路径
|
||||
func ParseUploadFilePath(filePath string) string {
|
||||
prefix, dir := resourceUpload()
|
||||
return strings.Replace(filePath, prefix, dir, 1)
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ func RegionSearchByIp(ip string) (string, int, int64) {
|
||||
ip = ClientIP(ip)
|
||||
if ip == LOCAT_HOST {
|
||||
// "0|0|0|内网IP|内网IP"
|
||||
return "0|0|0|Intranet IP|Intranet IP", 0, 0
|
||||
return "0|0|0|app.common.noIPregion|app.common.noIPregion", 0, 0
|
||||
}
|
||||
tStart := time.Now()
|
||||
region, err := searcher.SearchByStr(ip)
|
||||
@@ -60,19 +60,19 @@ func RegionSearchByIp(ip string) (string, int, int64) {
|
||||
func RealAddressByIp(ip string) string {
|
||||
ip = ClientIP(ip)
|
||||
if ip == LOCAT_HOST {
|
||||
return "Intranet IP" // 内网IP
|
||||
return "app.common.noIPregion" // 内网IP
|
||||
}
|
||||
region, err := searcher.SearchByStr(ip)
|
||||
if err != nil {
|
||||
logger.Errorf("failed to SearchIP(%s): %s\n", ip, err)
|
||||
return "unknown" // 未知
|
||||
return "app.common.unknown" // 未知
|
||||
}
|
||||
parts := strings.Split(region, "|")
|
||||
province := parts[2]
|
||||
city := parts[3]
|
||||
if province == "0" && city != "0" {
|
||||
if city == "内网IP" {
|
||||
return "Intranet IP" // 内网IP
|
||||
return "app.common.noIPregion" // 内网IP
|
||||
}
|
||||
return city
|
||||
}
|
||||
|
||||
@@ -13,18 +13,12 @@ import (
|
||||
func PageNumSize(pageNum, pageSize any) (int64, int64) {
|
||||
// 记录起始索引
|
||||
num := parse.Number(pageNum)
|
||||
if num > 5000 {
|
||||
num = 5000
|
||||
}
|
||||
if num < 1 {
|
||||
num = 1
|
||||
}
|
||||
|
||||
// 显示记录数
|
||||
size := parse.Number(pageSize)
|
||||
if size > 50000 {
|
||||
size = 50000
|
||||
}
|
||||
if size < 0 {
|
||||
size = 10
|
||||
}
|
||||
|
||||
104
src/framework/utils/ssh/files.go
Normal file
104
src/framework/utils/ssh/files.go
Normal file
@@ -0,0 +1,104 @@
|
||||
package ssh
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"ems.agt/src/framework/cmd"
|
||||
"ems.agt/src/framework/config"
|
||||
"ems.agt/src/framework/logger"
|
||||
"ems.agt/src/framework/utils/parse"
|
||||
)
|
||||
|
||||
// FileListRow 文件列表行数据
|
||||
type FileListRow struct {
|
||||
FileType string `json:"fileType"` // 文件类型
|
||||
FileMode string `json:"fileMode"` // 文件的权限
|
||||
LinkCount int64 `json:"linkCount"` // 硬链接数目
|
||||
Owner string `json:"owner"` // 所属用户
|
||||
Group string `json:"group"` // 所属组
|
||||
Size string `json:"size"` // 文件的大小
|
||||
ModifiedTime int64 `json:"modifiedTime"` // 最后修改时间,单位为秒
|
||||
FileName string `json:"fileName"` // 文件的名称
|
||||
}
|
||||
|
||||
// 文件列表
|
||||
// neIp 网元IP空字符串为本地
|
||||
// search 文件名后模糊*
|
||||
//
|
||||
// return 目录大小,行记录,异常
|
||||
func FileList(path, neIp, search string) (string, []FileListRow, error) {
|
||||
totalSize := ""
|
||||
var rows []FileListRow
|
||||
rowStr := ""
|
||||
|
||||
// 发送命令
|
||||
searchStr := ""
|
||||
if search != "" {
|
||||
searchStr = search + "*"
|
||||
}
|
||||
pathStr := fmt.Sprintf("cd %s \n", path)
|
||||
cmdStr := fmt.Sprintf("ls -lht --time-style=+%%s %s \n", searchStr)
|
||||
|
||||
// 是否远程读取
|
||||
if neIp != "" {
|
||||
usernameNe := config.Get("ne.user").(string) // 网元统一用户
|
||||
sshHost := fmt.Sprintf("%s@%s", usernameNe, neIp)
|
||||
resultStr, err := cmd.ExecWithCheck("ssh", sshHost, pathStr, cmdStr)
|
||||
if err != nil {
|
||||
logger.Errorf("Ne FileList Path: %s, Search: %s, Error:%s", path, search, err.Error())
|
||||
return totalSize, rows, err
|
||||
}
|
||||
rowStr = resultStr
|
||||
} else {
|
||||
resultStr, err := cmd.Execf(pathStr, cmdStr)
|
||||
if err != nil {
|
||||
logger.Errorf("Ne FileList Path: %s, Search: %s, Error:%s", path, search, err.Error())
|
||||
return totalSize, rows, err
|
||||
}
|
||||
rowStr = resultStr
|
||||
}
|
||||
|
||||
// 遍历组装
|
||||
rowStrList := strings.Split(rowStr, "\n")
|
||||
for i, rowStr := range rowStrList {
|
||||
if rowStr == "" {
|
||||
continue
|
||||
}
|
||||
// 使用空格对字符串进行切割
|
||||
fields := strings.Fields(rowStr)
|
||||
|
||||
// 无查询过滤会有total总计
|
||||
if i == 0 && searchStr == "" {
|
||||
totalSize = fields[1]
|
||||
continue
|
||||
}
|
||||
|
||||
// 拆分不足7位跳过
|
||||
if len(fields) != 7 {
|
||||
continue
|
||||
}
|
||||
|
||||
// 文件类型
|
||||
fileMode := fields[0]
|
||||
fileType := "file"
|
||||
if fileMode[0] == 'd' {
|
||||
fileType = "dir"
|
||||
} else if fileMode[0] == 'l' {
|
||||
fileType = "symlink"
|
||||
}
|
||||
|
||||
// 提取各个字段的值
|
||||
rows = append(rows, FileListRow{
|
||||
FileMode: fileMode,
|
||||
FileType: fileType,
|
||||
LinkCount: parse.Number(fields[1]),
|
||||
Owner: fields[2],
|
||||
Group: fields[3],
|
||||
Size: fields[4],
|
||||
ModifiedTime: parse.Number(fields[5]),
|
||||
FileName: fields[6],
|
||||
})
|
||||
}
|
||||
return totalSize, rows, nil
|
||||
}
|
||||
@@ -6,44 +6,39 @@ import (
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
|
||||
"ems.agt/lib/core/conf"
|
||||
"ems.agt/lib/log"
|
||||
"ems.agt/src/framework/config"
|
||||
"ems.agt/src/framework/logger"
|
||||
)
|
||||
|
||||
// 网元NE 文件复制到远程文件
|
||||
func FileSCPLocalToNe(neIp, localPath, nePath string) error {
|
||||
usernameNe := conf.Get("ne.user").(string)
|
||||
usernameNe := config.Get("ne.user").(string)
|
||||
// scp /path/to/local/file.txt user@remote-server:/path/to/remote/directory/
|
||||
neDir := fmt.Sprintf("%s@%s:%s", usernameNe, neIp, nePath)
|
||||
cmd := exec.Command("scp", "-r", localPath, neDir)
|
||||
out, err := cmd.CombinedOutput()
|
||||
_, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
logger.Errorf("FileSCPLocalToNe %s", err.Error())
|
||||
return err
|
||||
}
|
||||
log.Infof("FileSCPLocalToNe %s", string(out))
|
||||
return nil
|
||||
}
|
||||
|
||||
// 网元NE 远程文件复制到本地文件
|
||||
func FileSCPNeToLocal(neIp, nePath, localPath string) error {
|
||||
// 获取文件所在的目录路径
|
||||
dirPath := filepath.Dir(localPath)
|
||||
|
||||
// 确保文件夹路径存在
|
||||
err := os.MkdirAll(dirPath, os.ModePerm)
|
||||
if err != nil {
|
||||
log.Errorf("FileSCPNeToLocal MkdirAll err %v", err)
|
||||
if err := os.MkdirAll(filepath.Dir(localPath), 0750); err != nil {
|
||||
logger.Errorf("FileSCPNeToLocal MkdirAll err %v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
usernameNe := conf.Get("ne.user").(string)
|
||||
usernameNe := config.Get("ne.user").(string)
|
||||
// scp user@remote-server:/path/to/remote/directory/ /path/to/local/file.txt
|
||||
neDir := fmt.Sprintf("%s@%s:%s", usernameNe, neIp, nePath)
|
||||
cmd := exec.Command("scp", "-r", neDir, localPath)
|
||||
out, err := cmd.CombinedOutput()
|
||||
_, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
logger.Errorf("FileSCPNeToLocal %s", err.Error())
|
||||
return err
|
||||
}
|
||||
log.Infof("FileSCPNeToLocal %s", string(out))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -49,11 +49,11 @@ func Setup(router *gin.Engine) {
|
||||
indexGroup.GET("/getInfo", middleware.PreAuthorize(nil), controller.NewAccount.Info)
|
||||
indexGroup.GET("/getRouters", middleware.PreAuthorize(nil), controller.NewAccount.Router)
|
||||
indexGroup.POST("/logout",
|
||||
// middleware.RateLimit(middleware.LimitOption{
|
||||
// Time: 300,
|
||||
// Count: 5,
|
||||
// Type: middleware.LIMIT_IP,
|
||||
// }),
|
||||
middleware.RateLimit(middleware.LimitOption{
|
||||
Time: 300,
|
||||
Count: 5,
|
||||
Type: middleware.LIMIT_IP,
|
||||
}),
|
||||
controller.NewAccount.Logout,
|
||||
)
|
||||
}
|
||||
@@ -85,5 +85,6 @@ func Setup(router *gin.Engine) {
|
||||
fileGroup.POST("/chunkCheck", middleware.PreAuthorize(nil), controller.NewFile.ChunkCheck)
|
||||
fileGroup.POST("/chunkUpload", middleware.PreAuthorize(nil), controller.NewFile.ChunkUpload)
|
||||
fileGroup.POST("/chunkMerge", middleware.PreAuthorize(nil), controller.NewFile.ChunkMerge)
|
||||
fileGroup.POST("/transferStaticFile", middleware.PreAuthorize(nil), controller.NewCommont.TransferStaticFile)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,10 @@ import (
|
||||
"ems.agt/src/framework/config"
|
||||
commonConstants "ems.agt/src/framework/constants/common"
|
||||
tokenConstants "ems.agt/src/framework/constants/token"
|
||||
ctxUtils "ems.agt/src/framework/utils/ctx"
|
||||
"ems.agt/src/framework/i18n"
|
||||
"ems.agt/src/framework/utils/ctx"
|
||||
tokenUtils "ems.agt/src/framework/utils/token"
|
||||
"ems.agt/src/framework/vo"
|
||||
"ems.agt/src/framework/vo/result"
|
||||
libAccount "ems.agt/src/lib_features/account"
|
||||
commonModel "ems.agt/src/modules/common/model"
|
||||
@@ -34,15 +36,16 @@ type AccountController struct {
|
||||
//
|
||||
// POST /login
|
||||
func (s *AccountController) Login(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var loginBody commonModel.LoginBody
|
||||
if err := c.ShouldBindJSON(&loginBody); err != nil {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
// 当前请求信息
|
||||
ipaddr, location := ctxUtils.IPAddrLocation(c)
|
||||
os, browser := ctxUtils.UaOsBrowser(c)
|
||||
ipaddr, location := ctx.IPAddrLocation(c)
|
||||
os, browser := ctx.UaOsBrowser(c)
|
||||
|
||||
// 校验验证码
|
||||
err := s.accountService.ValidateCaptcha(
|
||||
@@ -51,19 +54,18 @@ func (s *AccountController) Login(c *gin.Context) {
|
||||
)
|
||||
// 根据错误信息,创建系统访问记录
|
||||
if err != nil {
|
||||
msg := err.Error() + " " + loginBody.Code
|
||||
s.sysLogLoginService.CreateSysLogLogin(
|
||||
loginBody.Username, commonConstants.STATUS_NO, msg,
|
||||
loginBody.Username, commonConstants.STATUS_NO, err.Error(),
|
||||
ipaddr, location, os, browser,
|
||||
)
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, err.Error())))
|
||||
return
|
||||
}
|
||||
|
||||
// 登录用户信息
|
||||
loginUser, err := s.accountService.LoginByUsername(loginBody.Username, loginBody.Password)
|
||||
if err != nil {
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, err.Error())))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -76,7 +78,7 @@ func (s *AccountController) Login(c *gin.Context) {
|
||||
s.accountService.UpdateLoginDateAndIP(&loginUser)
|
||||
// 登录成功
|
||||
s.sysLogLoginService.CreateSysLogLogin(
|
||||
loginBody.Username, commonConstants.STATUS_YES, "Login Successful",
|
||||
loginBody.Username, commonConstants.STATUS_YES, "app.common.loginSuccess",
|
||||
ipaddr, location, os, browser,
|
||||
)
|
||||
}
|
||||
@@ -93,9 +95,10 @@ func (s *AccountController) Login(c *gin.Context) {
|
||||
//
|
||||
// GET /getInfo
|
||||
func (s *AccountController) Info(c *gin.Context) {
|
||||
loginUser, err := ctxUtils.LoginUser(c)
|
||||
language := ctx.AcceptLanguage(c)
|
||||
loginUser, err := ctx.LoginUser(c)
|
||||
if err != nil {
|
||||
c.JSON(401, result.CodeMsg(401, err.Error()))
|
||||
c.JSON(401, result.CodeMsg(401, i18n.TKey(language, err.Error())))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -103,6 +106,12 @@ func (s *AccountController) Info(c *gin.Context) {
|
||||
isAdmin := config.IsAdmin(loginUser.UserID)
|
||||
roles, perms := s.accountService.RoleAndMenuPerms(loginUser.UserID, isAdmin)
|
||||
|
||||
loginUser.User.NickName = i18n.TKey(language, loginUser.User.NickName)
|
||||
loginUser.User.Remark = i18n.TKey(language, loginUser.User.Remark)
|
||||
loginUser.User.Dept.DeptName = i18n.TKey(language, loginUser.User.Dept.DeptName)
|
||||
for ri := range loginUser.User.Roles {
|
||||
loginUser.User.Roles[ri].RoleName = i18n.TKey(language, loginUser.User.Roles[ri].RoleName)
|
||||
}
|
||||
c.JSON(200, result.OkData(map[string]any{
|
||||
"user": loginUser.User,
|
||||
"roles": roles,
|
||||
@@ -114,11 +123,25 @@ func (s *AccountController) Info(c *gin.Context) {
|
||||
//
|
||||
// GET /getRouters
|
||||
func (s *AccountController) Router(c *gin.Context) {
|
||||
userID := ctxUtils.LoginUserToUserID(c)
|
||||
userID := ctx.LoginUserToUserID(c)
|
||||
|
||||
// 前端路由,管理员拥有所有
|
||||
isAdmin := config.IsAdmin(userID)
|
||||
buildMenus := s.accountService.RouteMenus(userID, isAdmin)
|
||||
|
||||
// 闭包函数处理多语言
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var converI18n func(language string, arr *[]vo.Router)
|
||||
converI18n = func(language string, arr *[]vo.Router) {
|
||||
for i := range *arr {
|
||||
(*arr)[i].Meta.Title = i18n.TKey(language, (*arr)[i].Meta.Title)
|
||||
if len((*arr)[i].Children) > 0 {
|
||||
converI18n(language, &(*arr)[i].Children)
|
||||
}
|
||||
}
|
||||
}
|
||||
converI18n(language, &buildMenus)
|
||||
|
||||
c.JSON(200, result.OkData(buildMenus))
|
||||
}
|
||||
|
||||
@@ -126,21 +149,24 @@ func (s *AccountController) Router(c *gin.Context) {
|
||||
//
|
||||
// POST /logout
|
||||
func (s *AccountController) Logout(c *gin.Context) {
|
||||
tokenStr := ctxUtils.Authorization(c)
|
||||
language := ctx.AcceptLanguage(c)
|
||||
tokenStr := ctx.Authorization(c)
|
||||
if tokenStr != "" {
|
||||
// 存在token时记录退出信息
|
||||
userName := tokenUtils.Remove(tokenStr)
|
||||
if userName != "" {
|
||||
// 当前请求信息
|
||||
ipaddr, location := ctxUtils.IPAddrLocation(c)
|
||||
os, browser := ctxUtils.UaOsBrowser(c)
|
||||
ipaddr, location := ctx.IPAddrLocation(c)
|
||||
os, browser := ctx.UaOsBrowser(c)
|
||||
|
||||
// 创建系统访问记录 退出成功
|
||||
|
||||
s.sysLogLoginService.CreateSysLogLogin(
|
||||
userName, commonConstants.STATUS_YES, "Exit successful",
|
||||
userName, commonConstants.STATUS_YES, "app.common.logoutSuccess",
|
||||
ipaddr, location, os, browser,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
c.JSON(200, result.OkMsg("Exit successful"))
|
||||
c.JSON(200, result.OkMsg(i18n.TKey(language, "app.common.logoutSuccess")))
|
||||
}
|
||||
|
||||
@@ -57,5 +57,15 @@ func (s *CommontController) I18n(c *gin.Context) {
|
||||
// GET /sys-conf
|
||||
func (s *CommontController) SysConfig(c *gin.Context) {
|
||||
data := s.commontService.SystemConfigInfo()
|
||||
|
||||
// 闭包函数处理多语言
|
||||
language := ctx.AcceptLanguage(c)
|
||||
converI18n := func(language string, arr *map[string]string) {
|
||||
for k, v := range *arr {
|
||||
(*arr)[k] = i18n.TKey(language, v)
|
||||
}
|
||||
}
|
||||
converI18n(language, &data)
|
||||
|
||||
c.JSON(200, result.OkData(data))
|
||||
}
|
||||
|
||||
@@ -4,13 +4,18 @@ import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"ems.agt/src/framework/config"
|
||||
"ems.agt/src/framework/constants/uploadsubpath"
|
||||
"ems.agt/src/framework/i18n"
|
||||
"ems.agt/src/framework/utils/ctx"
|
||||
"ems.agt/src/framework/utils/file"
|
||||
"ems.agt/src/framework/vo/result"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gin-gonic/gin/binding"
|
||||
)
|
||||
|
||||
// 实例化控制层 FileController 结构体
|
||||
@@ -25,9 +30,10 @@ type FileController struct{}
|
||||
//
|
||||
// GET /download/:filePath
|
||||
func (s *FileController) Download(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
filePath := c.Param("filePath")
|
||||
if len(filePath) < 8 {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
// base64解析出地址
|
||||
@@ -68,16 +74,17 @@ func (s *FileController) Download(c *gin.Context) {
|
||||
//
|
||||
// POST /upload
|
||||
func (s *FileController) Upload(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
// 上传的文件
|
||||
formFile, err := c.FormFile("file")
|
||||
if err != nil {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
// 子路径
|
||||
subPath := c.PostForm("subPath")
|
||||
if _, ok := uploadsubpath.UploadSubpath[subPath]; !ok {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -101,6 +108,7 @@ func (s *FileController) Upload(c *gin.Context) {
|
||||
//
|
||||
// POST /chunkCheck
|
||||
func (s *FileController) ChunkCheck(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var body struct {
|
||||
// 唯一标识
|
||||
Identifier string `json:"identifier" binding:"required"`
|
||||
@@ -109,7 +117,7 @@ func (s *FileController) ChunkCheck(c *gin.Context) {
|
||||
}
|
||||
err := c.ShouldBindJSON(&body)
|
||||
if err != nil {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -126,6 +134,7 @@ func (s *FileController) ChunkCheck(c *gin.Context) {
|
||||
//
|
||||
// POST /chunkMerge
|
||||
func (s *FileController) ChunkMerge(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var body struct {
|
||||
// 唯一标识
|
||||
Identifier string `json:"identifier" binding:"required"`
|
||||
@@ -136,11 +145,11 @@ func (s *FileController) ChunkMerge(c *gin.Context) {
|
||||
}
|
||||
err := c.ShouldBindJSON(&body)
|
||||
if err != nil {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
if _, ok := uploadsubpath.UploadSubpath[body.SubPath]; !ok {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -164,6 +173,7 @@ func (s *FileController) ChunkMerge(c *gin.Context) {
|
||||
//
|
||||
// POST /chunkUpload
|
||||
func (s *FileController) ChunkUpload(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
// 切片编号
|
||||
index := c.PostForm("index")
|
||||
// 切片唯一标识
|
||||
@@ -171,7 +181,7 @@ func (s *FileController) ChunkUpload(c *gin.Context) {
|
||||
// 上传的文件
|
||||
formFile, err := c.FormFile("file")
|
||||
if index == "" || identifier == "" || err != nil {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -183,3 +193,43 @@ func (s *FileController) ChunkUpload(c *gin.Context) {
|
||||
}
|
||||
c.JSON(206, result.OkData(chunkFilePath))
|
||||
}
|
||||
|
||||
// 转存指定对应文件到静态目录
|
||||
//
|
||||
// POST /transferStaticFile
|
||||
func (s *CommontController) TransferStaticFile(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var body struct {
|
||||
UploadPath string `json:"uploadPath" binding:"required"`
|
||||
StaticPath string `json:"staticPath" binding:"required"`
|
||||
Language string `json:"language" binding:"required"`
|
||||
}
|
||||
if err := c.ShouldBindBodyWith(&body, binding.JSON); err != nil {
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
// 取语言前缀
|
||||
lang := strings.SplitN(body.Language, "_", 2)[0]
|
||||
|
||||
// 默认静态资源
|
||||
static := config.Get("staticFile.default").(map[string]any)
|
||||
dir, err := filepath.Abs(static["dir"].(string))
|
||||
if err != nil {
|
||||
c.JSON(400, result.CodeMsg(400, err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
delPrefix := strings.Replace(body.StaticPath, static["prefix"].(string), "", 1)
|
||||
staticPath := strings.Replace(delPrefix, "{language}", lang, 1)
|
||||
newFile := fmt.Sprintf("%s%s", dir, staticPath)
|
||||
|
||||
err = file.CopyUploadFile(body.UploadPath, newFile)
|
||||
if err != nil {
|
||||
c.JSON(400, result.CodeMsg(400, err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
urlPath := strings.Replace(newFile, dir, static["prefix"].(string), 1)
|
||||
c.JSON(200, result.OkData(filepath.ToSlash(urlPath)))
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@ package controller
|
||||
|
||||
import (
|
||||
commonConstants "ems.agt/src/framework/constants/common"
|
||||
ctxUtils "ems.agt/src/framework/utils/ctx"
|
||||
"ems.agt/src/framework/i18n"
|
||||
"ems.agt/src/framework/utils/ctx"
|
||||
"ems.agt/src/framework/utils/regular"
|
||||
"ems.agt/src/framework/vo/result"
|
||||
commonModel "ems.agt/src/modules/common/model"
|
||||
@@ -32,32 +33,33 @@ type RegisterController struct {
|
||||
//
|
||||
// GET /register
|
||||
func (s *RegisterController) Register(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var registerBody commonModel.RegisterBody
|
||||
if err := c.ShouldBindJSON(®isterBody); err != nil {
|
||||
c.JSON(400, result.ErrMsg("parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
// 判断必传参数
|
||||
if !regular.ValidUsername(registerBody.Username) {
|
||||
// 账号不能以数字开头,可包含大写小写字母,数字,且不少于5位
|
||||
c.JSON(200, result.ErrMsg("The account cannot start with a number and can contain uppercase and lowercase letters, numbers, and no less than 5 digits"))
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "register.errUsername")))
|
||||
return
|
||||
}
|
||||
if !regular.ValidPassword(registerBody.Password) {
|
||||
// 登录密码至少包含大小写字母、数字、特殊符号,且不少于6位
|
||||
c.JSON(200, result.ErrMsg("The login password should contain at least uppercase and lowercase letters, numbers, special symbols, and no less than 6 digits"))
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "register.errPasswd")))
|
||||
return
|
||||
}
|
||||
if registerBody.Password != registerBody.ConfirmPassword {
|
||||
// 用户确认输入密码不一致
|
||||
c.JSON(200, result.ErrMsg("The user confirmed that the input password is inconsistent"))
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "register.errPasswdNotEq")))
|
||||
return
|
||||
}
|
||||
|
||||
// 当前请求信息
|
||||
ipaddr, location := ctxUtils.IPAddrLocation(c)
|
||||
os, browser := ctxUtils.UaOsBrowser(c)
|
||||
ipaddr, location := ctx.IPAddrLocation(c)
|
||||
os, browser := ctx.UaOsBrowser(c)
|
||||
|
||||
// 校验验证码
|
||||
err := s.registerService.ValidateCaptcha(
|
||||
@@ -66,9 +68,8 @@ func (s *RegisterController) Register(c *gin.Context) {
|
||||
)
|
||||
// 根据错误信息,创建系统访问记录
|
||||
if err != nil {
|
||||
msg := err.Error() + " " + registerBody.Code
|
||||
s.sysLogLoginService.CreateSysLogLogin(
|
||||
registerBody.Username, commonConstants.STATUS_NO, msg,
|
||||
registerBody.Username, commonConstants.STATUS_NO, err.Error(),
|
||||
ipaddr, location, os, browser,
|
||||
)
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
@@ -77,13 +78,13 @@ func (s *RegisterController) Register(c *gin.Context) {
|
||||
|
||||
userID, err := s.registerService.ByUserName(registerBody.Username, registerBody.Password, registerBody.UserType)
|
||||
if err == nil {
|
||||
msg := registerBody.Username + " registered success " + userID
|
||||
msg := i18n.TTemplate(language, "register.successMsg", map[string]any{"name": registerBody.Username, "id": userID})
|
||||
s.sysLogLoginService.CreateSysLogLogin(
|
||||
registerBody.Username, commonConstants.STATUS_YES, msg,
|
||||
ipaddr, location, os, browser,
|
||||
)
|
||||
// 注册成功
|
||||
c.JSON(200, result.OkMsg("registered success"))
|
||||
c.JSON(200, result.OkMsg(i18n.TKey(language, "register.success")))
|
||||
return
|
||||
}
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
|
||||
@@ -45,18 +45,18 @@ func (s *AccountImpl) ValidateCaptcha(code, uuid string) error {
|
||||
}
|
||||
if code == "" || uuid == "" {
|
||||
// 验证码信息错误
|
||||
return fmt.Errorf("captcha message error")
|
||||
return fmt.Errorf("captcha.err")
|
||||
}
|
||||
verifyKey := cachekey.CAPTCHA_CODE_KEY + uuid
|
||||
captcha, _ := redis.Get("", verifyKey)
|
||||
if captcha == "" {
|
||||
// 验证码已失效
|
||||
return fmt.Errorf("captcha is no longer valid")
|
||||
return fmt.Errorf("captcha.errValid")
|
||||
}
|
||||
redis.Del("", verifyKey)
|
||||
if captcha != code {
|
||||
// 验证码错误
|
||||
return fmt.Errorf("captcha error")
|
||||
return fmt.Errorf("captcha.err")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -74,14 +74,14 @@ func (s *AccountImpl) LoginByUsername(username, password string) (vo.LoginUser,
|
||||
// 查询用户登录账号
|
||||
sysUser := s.sysUserService.SelectUserByUserName(username)
|
||||
if sysUser.UserName != username {
|
||||
return loginUser, fmt.Errorf("user does not exist or wrong password")
|
||||
return loginUser, fmt.Errorf("login.errNameOrPasswd")
|
||||
}
|
||||
if sysUser.DelFlag == common.STATUS_YES {
|
||||
// 对不起,您的账号已被删除
|
||||
return loginUser, fmt.Errorf("sorry, your account has been deleted")
|
||||
return loginUser, fmt.Errorf("login.errDelFlag")
|
||||
}
|
||||
if sysUser.Status == common.STATUS_NO {
|
||||
return loginUser, fmt.Errorf("sorry, your account has been disabled")
|
||||
return loginUser, fmt.Errorf("login.errStatus")
|
||||
}
|
||||
|
||||
// 检验用户密码
|
||||
@@ -89,7 +89,7 @@ func (s *AccountImpl) LoginByUsername(username, password string) (vo.LoginUser,
|
||||
if !compareBool {
|
||||
redis.SetByExpire("", retrykey, retryCount+1, lockTime)
|
||||
// 用户不存在或密码错误
|
||||
return loginUser, fmt.Errorf("user does not exist or wrong password")
|
||||
return loginUser, fmt.Errorf("login.errNameOrPasswd")
|
||||
} else {
|
||||
// 清除错误记录次数
|
||||
s.ClearLoginRecordCache(username)
|
||||
@@ -136,9 +136,13 @@ func (s *AccountImpl) ClearLoginRecordCache(username string) bool {
|
||||
|
||||
// passwordRetryCount 密码重试次数
|
||||
func (s *AccountImpl) passwordRetryCount(username string) (string, int64, time.Duration, error) {
|
||||
// 从数据库配置获取登录次数和错误锁定时间
|
||||
maxRetryCountStr := s.sysConfigService.SelectConfigValueByKey("sys.user.maxRetryCount")
|
||||
lockTimeStr := s.sysConfigService.SelectConfigValueByKey("sys.user.lockTime")
|
||||
|
||||
// 验证登录次数和错误锁定时间
|
||||
maxRetryCount := config.Get("user.password.maxRetryCount").(int)
|
||||
lockTime := config.Get("user.password.lockTime").(int)
|
||||
maxRetryCount := parse.Number(maxRetryCountStr)
|
||||
lockTime := parse.Number(lockTimeStr)
|
||||
// 验证缓存记录次数
|
||||
retrykey := cachekey.PWD_ERR_CNT_KEY + username
|
||||
retryCount, err := redis.Get("", retrykey)
|
||||
@@ -147,9 +151,9 @@ func (s *AccountImpl) passwordRetryCount(username string) (string, int64, time.D
|
||||
}
|
||||
// 是否超过错误值
|
||||
retryCountInt64 := parse.Number(retryCount)
|
||||
if retryCountInt64 >= int64(maxRetryCount) {
|
||||
// 密码输入错误 %d 次,帐户锁定 %d 分钟
|
||||
errorMsg := fmt.Errorf("password entered incorrectly %d times, account locked for %d minutes", maxRetryCount, lockTime)
|
||||
if retryCountInt64 >= maxRetryCount {
|
||||
// 密码输入错误多次,帐户已被锁定
|
||||
errorMsg := fmt.Errorf("login.errRetryPasswd")
|
||||
return retrykey, retryCountInt64, time.Duration(lockTime) * time.Minute, errorMsg
|
||||
}
|
||||
return retrykey, retryCountInt64, time.Duration(lockTime) * time.Minute, nil
|
||||
|
||||
@@ -41,5 +41,17 @@ func (s *CommontImpl) SystemConfigInfo() map[string]string {
|
||||
// 获取登录界面背景
|
||||
loginBackground := s.sysConfigService.SelectConfigValueByKey("sys.loginBackground")
|
||||
infoMap["loginBackground"] = loginBackground
|
||||
// 系统设置-官网网址
|
||||
officialUrl := s.sysConfigService.SelectConfigValueByKey("sys.officialUrl")
|
||||
infoMap["officialUrl"] = officialUrl
|
||||
// 系统设置-系统使用文档
|
||||
helpDoc := s.sysConfigService.SelectConfigValueByKey("sys.helpDoc")
|
||||
infoMap["helpDoc"] = helpDoc
|
||||
// 国际化切换
|
||||
i18nOpen := s.sysConfigService.SelectConfigValueByKey("sys.i18n.open")
|
||||
infoMap["i18nOpen"] = i18nOpen
|
||||
// 国际化默认语言
|
||||
i18nDefault := s.sysConfigService.SelectConfigValueByKey("sys.i18n.default")
|
||||
infoMap["i18nDefault"] = i18nDefault
|
||||
return infoMap
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user