Compare commits
107 Commits
2.231120.8
...
2.231207.9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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,6 +69,7 @@ mml:
|
||||
password: admin
|
||||
mmlHome: ./mmlhome
|
||||
upload: /home/agtuser
|
||||
upfHeaderLength: 2335
|
||||
|
||||
# NE config
|
||||
ne:
|
||||
|
||||
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"
|
||||
@@ -157,57 +157,105 @@ udm:
|
||||
comment: ""
|
||||
- name: "msisdn"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
optional: "true"
|
||||
filter: ""
|
||||
display: "MSISDN"
|
||||
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"
|
||||
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 +276,7 @@ udm:
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "IMSI"
|
||||
c1omment: ""
|
||||
comment: ""
|
||||
- name: "msisdn"
|
||||
type: "string"
|
||||
optional: "true"
|
||||
@@ -239,48 +287,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 +387,115 @@ 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"
|
||||
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 +505,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,40 +521,50 @@ 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: "sm_data"
|
||||
type: "string"
|
||||
optional: "false"
|
||||
filter: ""
|
||||
display: "SM_data"
|
||||
display: "5G SM 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"
|
||||
display: "Path File"
|
||||
comment: ""
|
||||
- operation: "sync"
|
||||
object: "start"
|
||||
|
||||
@@ -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,68 +97,16 @@ INSERT
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
105,
|
||||
'系统设置-版权声明',
|
||||
'sys.copyright',
|
||||
'Copyright ©2023 for AGrandTech',
|
||||
4,
|
||||
'config.sys.user.maxRetryCount',
|
||||
'sys.user.maxRetryCount',
|
||||
'5',
|
||||
'Y',
|
||||
'admin',
|
||||
1698113158157,
|
||||
'admin',
|
||||
1698220040192,
|
||||
'底脚固定条,左侧放置版权声明'
|
||||
);
|
||||
|
||||
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,
|
||||
'文件支持网络地址图片和内部上传的文件路径'
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'config.sys.user.maxRetryCountRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
@@ -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,220 @@ 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);
|
||||
|
||||
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`;
|
||||
@@ -131,3 +123,20 @@ 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`;
|
||||
|
||||
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,68 +97,16 @@ INSERT
|
||||
`remark`
|
||||
)
|
||||
VALUES (
|
||||
105,
|
||||
'系统设置-版权声明',
|
||||
'sys.copyright',
|
||||
'Copyright ©2023 for AGrandTech',
|
||||
4,
|
||||
'config.sys.user.maxRetryCount',
|
||||
'sys.user.maxRetryCount',
|
||||
'5',
|
||||
'Y',
|
||||
'admin',
|
||||
1698113158157,
|
||||
'admin',
|
||||
1698220040192,
|
||||
'底脚固定条,左侧放置版权声明'
|
||||
);
|
||||
|
||||
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,
|
||||
'文件支持网络地址图片和内部上传的文件路径'
|
||||
'supervisor',
|
||||
1698110000000,
|
||||
NULL,
|
||||
0,
|
||||
'config.sys.user.maxRetryCountRemark'
|
||||
);
|
||||
|
||||
INSERT
|
||||
@@ -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,220 @@ 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);
|
||||
|
||||
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`;
|
||||
@@ -131,3 +123,20 @@ 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`;
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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{}
|
||||
}
|
||||
|
||||
2
makefile
2
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)
|
||||
|
||||
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)
|
||||
// 调度任务模块--暂无接口
|
||||
|
||||
BIN
src/assets/template/excel/user_import_template_en.xlsx
Normal file
BIN
src/assets/template/excel/user_import_template_en.xlsx
Normal file
Binary file not shown.
Binary file not shown.
@@ -13,7 +13,7 @@ server:
|
||||
# 日志
|
||||
logger:
|
||||
fileDir: "/usr/local/omc/log"
|
||||
fileName: "restagent.log"
|
||||
fileName: "ems_agt.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
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package common
|
||||
import (
|
||||
"ems.agt/src/framework/logger"
|
||||
"ems.agt/src/framework/middleware"
|
||||
"ems.agt/src/framework/middleware/collectlogs"
|
||||
"ems.agt/src/modules/common/controller"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -25,6 +26,12 @@ func Setup(router *gin.Engine) {
|
||||
|
||||
// 系统可暴露的配置信息
|
||||
indexGroup.GET("/sys-conf", controller.NewCommont.SysConfig)
|
||||
// 转存上传文件到静态资源
|
||||
indexGroup.POST("/transferStaticFile",
|
||||
middleware.PreAuthorize(nil),
|
||||
collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.helpDoc", collectlogs.BUSINESS_TYPE_UPDATE)),
|
||||
controller.NewCommont.TransferStaticFile,
|
||||
)
|
||||
|
||||
// 验证码操作处理
|
||||
indexGroup.GET("/captchaImage",
|
||||
@@ -49,11 +56,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,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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")))
|
||||
}
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"ems.agt/src/framework/config"
|
||||
"ems.agt/src/framework/i18n"
|
||||
"ems.agt/src/framework/utils/ctx"
|
||||
"ems.agt/src/framework/utils/file"
|
||||
"ems.agt/src/framework/vo/result"
|
||||
commonService "ems.agt/src/modules/common/service"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gin-gonic/gin/binding"
|
||||
)
|
||||
|
||||
// 实例化控制层 CommontController 结构体
|
||||
@@ -57,5 +64,55 @@ 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))
|
||||
}
|
||||
|
||||
// 转存指定对应文件
|
||||
//
|
||||
// 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)))
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"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"
|
||||
|
||||
@@ -25,9 +27,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 +71,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 +105,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 +114,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 +131,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 +142,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 +170,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 +178,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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -108,6 +108,17 @@ func (s *BarProcessor) Execute(data any) (any, error) {
|
||||
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,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"ems.agt/src/framework/i18n"
|
||||
"ems.agt/src/framework/utils/ctx"
|
||||
"ems.agt/src/framework/vo/result"
|
||||
"ems.agt/src/modules/monitor/service"
|
||||
|
||||
@@ -24,6 +26,7 @@ type MonitorController struct {
|
||||
//
|
||||
// GET /load
|
||||
func (s *MonitorController) Load(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var querys struct {
|
||||
// 数据类型all/load/cpu/memory/io/network
|
||||
Type string `form:"type" binding:"required,oneof=all load cpu memory io network"`
|
||||
@@ -40,7 +43,7 @@ func (s *MonitorController) Load(c *gin.Context) {
|
||||
}
|
||||
err := c.ShouldBindQuery(&querys)
|
||||
if err != nil {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,9 @@ package controller
|
||||
|
||||
import (
|
||||
"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/vo/result"
|
||||
"ems.agt/src/modules/monitor/model"
|
||||
|
||||
@@ -48,9 +50,10 @@ func (s *SysCacheController) Names(c *gin.Context) {
|
||||
//
|
||||
// GET /getKeys/:cacheName
|
||||
func (s *SysCacheController) Keys(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
cacheName := c.Param("cacheName")
|
||||
if cacheName == "" {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
caches := []model.SysCache{}
|
||||
@@ -68,10 +71,11 @@ func (s *SysCacheController) Keys(c *gin.Context) {
|
||||
//
|
||||
// GET /getValue/:cacheName/:cacheKey
|
||||
func (s *SysCacheController) Value(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
cacheName := c.Param("cacheName")
|
||||
cacheKey := c.Param("cacheKey")
|
||||
if cacheName == "" || cacheKey == "" {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -88,9 +92,10 @@ func (s *SysCacheController) Value(c *gin.Context) {
|
||||
//
|
||||
// DELETE /clearCacheName/:cacheName
|
||||
func (s *SysCacheController) ClearCacheName(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
cacheName := c.Param("cacheName")
|
||||
if cacheName == "" {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -111,10 +116,11 @@ func (s *SysCacheController) ClearCacheName(c *gin.Context) {
|
||||
//
|
||||
// DELETE /clearCacheKey/:cacheName/:cacheKey
|
||||
func (s *SysCacheController) ClearCacheKey(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
cacheName := c.Param("cacheName")
|
||||
cacheKey := c.Param("cacheKey")
|
||||
if cacheName == "" || cacheKey == "" {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"ems.agt/src/framework/i18n"
|
||||
"ems.agt/src/framework/utils/ctx"
|
||||
"ems.agt/src/framework/utils/file"
|
||||
"ems.agt/src/framework/utils/parse"
|
||||
@@ -41,6 +42,18 @@ type SysJobController struct {
|
||||
func (s *SysJobController) List(c *gin.Context) {
|
||||
querys := ctx.QueryMap(c)
|
||||
data := s.sysJobService.SelectJobPage(querys)
|
||||
|
||||
rows := data["rows"].([]model.SysJob)
|
||||
// 闭包函数处理多语言
|
||||
language := ctx.AcceptLanguage(c)
|
||||
converI18n := func(language string, arr *[]model.SysJob) {
|
||||
for i := range *arr {
|
||||
(*arr)[i].JobName = i18n.TKey(language, (*arr)[i].JobName)
|
||||
(*arr)[i].Remark = i18n.TKey(language, (*arr)[i].Remark)
|
||||
}
|
||||
}
|
||||
converI18n(language, &rows)
|
||||
|
||||
c.JSON(200, result.Ok(data))
|
||||
}
|
||||
|
||||
@@ -48,14 +61,18 @@ func (s *SysJobController) List(c *gin.Context) {
|
||||
//
|
||||
// GET /:jobId
|
||||
func (s *SysJobController) Info(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
jobId := c.Param("jobId")
|
||||
if jobId == "" {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
data := s.sysJobService.SelectJobById(jobId)
|
||||
if data.JobID == jobId {
|
||||
// 处理多语言
|
||||
data.JobName = i18n.TKey(language, data.JobName)
|
||||
data.Remark = i18n.TKey(language, data.Remark)
|
||||
c.JSON(200, result.OkData(data))
|
||||
return
|
||||
}
|
||||
@@ -66,17 +83,18 @@ func (s *SysJobController) Info(c *gin.Context) {
|
||||
//
|
||||
// POST /
|
||||
func (s *SysJobController) Add(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var body model.SysJob
|
||||
err := c.ShouldBindBodyWith(&body, binding.JSON)
|
||||
if err != nil || body.JobID != "" {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
// 检查cron表达式格式
|
||||
if parse.CronExpression(body.CronExpression) == 0 {
|
||||
// 调度任务新增【%s】失败,Cron表达式不正确
|
||||
msg := fmt.Sprintf("Scheduling task add [%s] fails with incorrect Cron expression", body.JobName)
|
||||
msg := i18n.TTemplate(language, "job.errCronExpression", map[string]any{"name": body.JobName})
|
||||
c.JSON(200, result.ErrMsg(msg))
|
||||
return
|
||||
}
|
||||
@@ -84,7 +102,7 @@ func (s *SysJobController) Add(c *gin.Context) {
|
||||
// 检查任务调用传入参数是否json格式
|
||||
if body.TargetParams != "" {
|
||||
// 调度任务新增【%s】失败,任务传入参数json字符串不正确
|
||||
msg := fmt.Sprintf("Scheduling task add [%s] failed, task incoming parameter json string is incorrect", body.JobName)
|
||||
msg := i18n.TTemplate(language, "job.errTargetParams", map[string]any{"name": body.JobName})
|
||||
if len(body.TargetParams) < 7 {
|
||||
c.JSON(200, result.ErrMsg(msg))
|
||||
return
|
||||
@@ -99,7 +117,7 @@ func (s *SysJobController) Add(c *gin.Context) {
|
||||
uniqueJob := s.sysJobService.CheckUniqueJobName(body.JobName, body.JobGroup, "")
|
||||
if !uniqueJob {
|
||||
// 调度任务新增【%s】失败,同任务组内有相同任务名称
|
||||
msg := fmt.Sprintf("Scheduling tasks with new [%s] failures, with the same task name in the same task group", body.JobName)
|
||||
msg := i18n.TTemplate(language, "job.errJobExists", map[string]any{"name": body.JobName})
|
||||
c.JSON(200, result.ErrMsg(msg))
|
||||
return
|
||||
}
|
||||
@@ -117,17 +135,18 @@ func (s *SysJobController) Add(c *gin.Context) {
|
||||
//
|
||||
// PUT /
|
||||
func (s *SysJobController) Edit(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var body model.SysJob
|
||||
err := c.ShouldBindBodyWith(&body, binding.JSON)
|
||||
if err != nil || body.JobID == "" {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
// 检查cron表达式格式
|
||||
if parse.CronExpression(body.CronExpression) == 0 {
|
||||
// 调度任务修改【%s】失败,Cron表达式不正确
|
||||
msg := fmt.Sprintf("Scheduling task modification [%s] fails with incorrect Cron expression", body.JobName)
|
||||
msg := i18n.TTemplate(language, "job.errCronExpression", map[string]any{"name": body.JobName})
|
||||
c.JSON(200, result.ErrMsg(msg))
|
||||
return
|
||||
}
|
||||
@@ -135,7 +154,7 @@ func (s *SysJobController) Edit(c *gin.Context) {
|
||||
// 检查任务调用传入参数是否json格式
|
||||
if body.TargetParams != "" {
|
||||
// 调度任务修改【%s】失败,任务传入参数json字符串不正确
|
||||
msg := fmt.Sprintf("Scheduling task modification [%s] failed, task incoming parameter json string is not correct", body.JobName)
|
||||
msg := i18n.TTemplate(language, "job.errTargetParams", map[string]any{"name": body.JobName})
|
||||
if len(body.TargetParams) < 7 {
|
||||
c.JSON(200, result.ErrMsg(msg))
|
||||
return
|
||||
@@ -150,7 +169,7 @@ func (s *SysJobController) Edit(c *gin.Context) {
|
||||
uniqueJob := s.sysJobService.CheckUniqueJobName(body.JobName, body.JobGroup, body.JobID)
|
||||
if !uniqueJob {
|
||||
// 调度任务修改【%s】失败,同任务组内有相同任务名称
|
||||
msg := fmt.Sprintf("Scheduling task modification [%s] failed with the same task name in the same task group", body.JobName)
|
||||
msg := i18n.TTemplate(language, "job.errJobExists", map[string]any{"name": body.JobName})
|
||||
c.JSON(200, result.ErrMsg(msg))
|
||||
return
|
||||
}
|
||||
@@ -168,9 +187,10 @@ func (s *SysJobController) Edit(c *gin.Context) {
|
||||
//
|
||||
// DELETE /:jobIds
|
||||
func (s *SysJobController) Remove(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
jobIds := c.Param("jobIds")
|
||||
if jobIds == "" {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
// 处理字符转id数组后去重
|
||||
@@ -185,7 +205,7 @@ func (s *SysJobController) Remove(c *gin.Context) {
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
return
|
||||
}
|
||||
msg := fmt.Sprintf("Deleted successfully: %d", rows)
|
||||
msg := i18n.TTemplate(language, "app.common.deleteSuccess", map[string]any{"num": rows})
|
||||
c.JSON(200, result.OkMsg(msg))
|
||||
}
|
||||
|
||||
@@ -193,6 +213,7 @@ func (s *SysJobController) Remove(c *gin.Context) {
|
||||
//
|
||||
// PUT /changeStatus
|
||||
func (s *SysJobController) Status(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var body struct {
|
||||
// 任务ID
|
||||
JobId string `json:"jobId" binding:"required"`
|
||||
@@ -201,7 +222,7 @@ func (s *SysJobController) Status(c *gin.Context) {
|
||||
}
|
||||
err := c.ShouldBindBodyWith(&body, binding.JSON)
|
||||
if err != nil {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -209,14 +230,14 @@ func (s *SysJobController) Status(c *gin.Context) {
|
||||
job := s.sysJobService.SelectJobById(body.JobId)
|
||||
if job.JobID != body.JobId {
|
||||
// 没有可访问调度任务数据!
|
||||
c.JSON(200, result.ErrMsg("No accessible scheduling task data!"))
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "job.noData")))
|
||||
return
|
||||
}
|
||||
|
||||
// 与旧值相等不变更
|
||||
if job.Status == body.Status {
|
||||
// 变更状态与旧值相等!
|
||||
c.JSON(200, result.ErrMsg("Change status equals old value!"))
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "job.statusEq")))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -235,9 +256,10 @@ func (s *SysJobController) Status(c *gin.Context) {
|
||||
//
|
||||
// PUT /run/:jobId
|
||||
func (s *SysJobController) Run(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
jobId := c.Param("jobId")
|
||||
if jobId == "" {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -245,7 +267,7 @@ func (s *SysJobController) Run(c *gin.Context) {
|
||||
job := s.sysJobService.SelectJobById(jobId)
|
||||
if job.JobID != jobId {
|
||||
// 没有可访问调度任务数据!
|
||||
c.JSON(200, result.ErrMsg("No accessible scheduling task data!"))
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "job.noData")))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -269,30 +291,38 @@ func (s *SysJobController) ResetQueueJob(c *gin.Context) {
|
||||
//
|
||||
// POST /export
|
||||
func (s *SysJobController) Export(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
// 查询结果,根据查询条件结果,单页最大值限制
|
||||
querys := ctx.BodyJSONMap(c)
|
||||
data := s.sysJobService.SelectJobPage(querys)
|
||||
if data["total"].(int64) == 0 {
|
||||
// 导出数据记录为空
|
||||
c.JSON(200, result.ErrMsg("Export data record is empty"))
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.exportEmpty")))
|
||||
return
|
||||
}
|
||||
rows := data["rows"].([]model.SysJob)
|
||||
|
||||
// 闭包函数处理多语言
|
||||
converI18n := func(language string, arr *[]model.SysJob) {
|
||||
for i := range *arr {
|
||||
(*arr)[i].JobName = i18n.TKey(language, (*arr)[i].JobName)
|
||||
(*arr)[i].Remark = i18n.TKey(language, (*arr)[i].Remark)
|
||||
}
|
||||
}
|
||||
converI18n(language, &rows)
|
||||
|
||||
// 导出文件名称
|
||||
fileName := fmt.Sprintf("job_export_%d_%d.xlsx", len(rows), time.Now().UnixMilli())
|
||||
// 第一行表头标题
|
||||
headerCells := map[string]string{
|
||||
"A1": "JobID",
|
||||
"B1": "JobName",
|
||||
"C1": "JobGroupName",
|
||||
"D1": "InvokeTarget",
|
||||
"E1": "TargetParams",
|
||||
"F1": "CronExpression",
|
||||
"G1": "MisfirePolicy",
|
||||
"H1": "Concurrent",
|
||||
"I1": "Status",
|
||||
"J1": "Remark",
|
||||
"A1": i18n.TKey(language, "job.export.jobID"),
|
||||
"B1": i18n.TKey(language, "job.export.jobName"),
|
||||
"C1": i18n.TKey(language, "job.export.jobGroupName"),
|
||||
"D1": i18n.TKey(language, "job.export.invokeTarget"),
|
||||
"E1": i18n.TKey(language, "job.export.targetParams"),
|
||||
"F1": i18n.TKey(language, "job.export.cronExpression"),
|
||||
"G1": i18n.TKey(language, "job.export.status"),
|
||||
"H1": i18n.TKey(language, "job.export.remark"),
|
||||
}
|
||||
// 读取任务组名字典数据
|
||||
dictSysJobGroup := s.sysDictDataService.SelectDictDataByType("sys_job_group")
|
||||
@@ -304,24 +334,15 @@ func (s *SysJobController) Export(c *gin.Context) {
|
||||
sysJobGroup := ""
|
||||
for _, v := range dictSysJobGroup {
|
||||
if row.JobGroup == v.DictValue {
|
||||
sysJobGroup = v.DictLabel
|
||||
sysJobGroup = i18n.TKey(language, v.DictLabel)
|
||||
break
|
||||
}
|
||||
}
|
||||
misfirePolicy := "Abandon execution"
|
||||
if row.MisfirePolicy == "1" {
|
||||
misfirePolicy = "Execute immediately"
|
||||
} else if row.MisfirePolicy == "2" {
|
||||
misfirePolicy = "Execute once"
|
||||
}
|
||||
concurrent := "prohibit"
|
||||
if row.Concurrent == "1" {
|
||||
concurrent = "allow"
|
||||
}
|
||||
|
||||
// 状态
|
||||
statusValue := "fail"
|
||||
statusValue := i18n.TKey(language, "dictData.fail")
|
||||
if row.Status == "1" {
|
||||
statusValue = "successes"
|
||||
statusValue = i18n.TKey(language, "dictData.success")
|
||||
}
|
||||
dataCells = append(dataCells, map[string]any{
|
||||
"A" + idx: row.JobID,
|
||||
@@ -330,10 +351,8 @@ func (s *SysJobController) Export(c *gin.Context) {
|
||||
"D" + idx: row.InvokeTarget,
|
||||
"E" + idx: row.TargetParams,
|
||||
"F" + idx: row.CronExpression,
|
||||
"G" + idx: misfirePolicy,
|
||||
"H" + idx: concurrent,
|
||||
"I" + idx: statusValue,
|
||||
"J" + idx: row.Remark,
|
||||
"G" + idx: statusValue,
|
||||
"H" + idx: row.Remark,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"ems.agt/src/framework/i18n"
|
||||
"ems.agt/src/framework/utils/ctx"
|
||||
"ems.agt/src/framework/utils/date"
|
||||
"ems.agt/src/framework/utils/file"
|
||||
@@ -40,17 +41,42 @@ type SysJobLogController struct {
|
||||
func (s *SysJobLogController) List(c *gin.Context) {
|
||||
// 查询参数转换map
|
||||
querys := ctx.QueryMap(c)
|
||||
list := s.sysJobLogService.SelectJobLogPage(querys)
|
||||
c.JSON(200, result.Ok(list))
|
||||
data := s.sysJobLogService.SelectJobLogPage(querys)
|
||||
|
||||
language := ctx.AcceptLanguage(c)
|
||||
|
||||
// 反查多语言key
|
||||
querys["jobName"] = i18n.ValueKey(language, querys["jobName"].(string))
|
||||
dataI18n := s.sysJobLogService.SelectJobLogPage(querys)
|
||||
totalI18n := parse.Number(dataI18n["total"])
|
||||
if totalI18n != 0 {
|
||||
rows := data["rows"].([]model.SysJobLog)
|
||||
total := parse.Number(data["total"])
|
||||
rowsI18n := dataI18n["rows"].([]model.SysJobLog)
|
||||
data["rows"] = append(rows, rowsI18n...)
|
||||
data["total"] = total + totalI18n
|
||||
}
|
||||
|
||||
rows := data["rows"].([]model.SysJobLog)
|
||||
// 闭包函数处理多语言
|
||||
converI18n := func(language string, arr *[]model.SysJobLog) {
|
||||
for i := range *arr {
|
||||
(*arr)[i].JobName = i18n.TKey(language, (*arr)[i].JobName)
|
||||
}
|
||||
}
|
||||
converI18n(language, &rows)
|
||||
|
||||
c.JSON(200, result.Ok(data))
|
||||
}
|
||||
|
||||
// 调度任务日志信息
|
||||
//
|
||||
// GET /:jobLogId
|
||||
func (s *SysJobLogController) Info(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
jobLogId := c.Param("jobLogId")
|
||||
if jobLogId == "" {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
data := s.sysJobLogService.SelectJobLogById(jobLogId)
|
||||
@@ -65,9 +91,10 @@ func (s *SysJobLogController) Info(c *gin.Context) {
|
||||
//
|
||||
// DELETE /:jobLogIds
|
||||
func (s *SysJobLogController) Remove(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
jobLogIds := c.Param("jobLogIds")
|
||||
if jobLogIds == "" {
|
||||
c.JSON(400, result.CodeMsg(400, "parameter error"))
|
||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -81,7 +108,7 @@ func (s *SysJobLogController) Remove(c *gin.Context) {
|
||||
rows := s.sysJobLogService.DeleteJobLogByIds(uniqueIDs)
|
||||
if rows > 0 {
|
||||
// 删除成功:%d
|
||||
msg := fmt.Sprintf("Deleted successfully: %d", rows)
|
||||
msg := i18n.TTemplate(language, "app.common.deleteSuccess", map[string]any{"num": rows})
|
||||
c.JSON(200, result.OkMsg(msg))
|
||||
return
|
||||
}
|
||||
@@ -113,18 +140,27 @@ func (s *SysJobLogController) Export(c *gin.Context) {
|
||||
}
|
||||
rows := data["rows"].([]model.SysJobLog)
|
||||
|
||||
// 闭包函数处理多语言
|
||||
language := ctx.AcceptLanguage(c)
|
||||
converI18n := func(language string, arr *[]model.SysJobLog) {
|
||||
for i := range *arr {
|
||||
(*arr)[i].JobName = i18n.TKey(language, (*arr)[i].JobName)
|
||||
}
|
||||
}
|
||||
converI18n(language, &rows)
|
||||
|
||||
// 导出文件名称
|
||||
fileName := fmt.Sprintf("jobLog_export_%d_%d.xlsx", len(rows), time.Now().UnixMilli())
|
||||
// 第一行表头标题
|
||||
headerCells := map[string]string{
|
||||
"A1": "JobLogID",
|
||||
"B1": "JobName",
|
||||
"C1": "JobGroupName",
|
||||
"D1": "InvokeTarget",
|
||||
"E1": "TargetParams",
|
||||
"F1": "JobMsg",
|
||||
"G1": "Status",
|
||||
"H1": "Time",
|
||||
"A1": i18n.TKey(language, "job.export.jobLogID"),
|
||||
"B1": i18n.TKey(language, "job.export.jobName"),
|
||||
"C1": i18n.TKey(language, "job.export.jobGroupName"),
|
||||
"D1": i18n.TKey(language, "job.export.invokeTarget"),
|
||||
"E1": i18n.TKey(language, "job.export.targetParams"),
|
||||
"F1": i18n.TKey(language, "job.export.jobID"),
|
||||
"G1": i18n.TKey(language, "job.export.jobLogStatus"),
|
||||
"H1": i18n.TKey(language, "job.export.jobLogTime"),
|
||||
}
|
||||
// 读取任务组名字典数据
|
||||
dictSysJobGroup := s.sysDictDataService.SelectDictDataByType("sys_job_group")
|
||||
@@ -136,14 +172,14 @@ func (s *SysJobLogController) Export(c *gin.Context) {
|
||||
sysJobGroup := ""
|
||||
for _, v := range dictSysJobGroup {
|
||||
if row.JobGroup == v.DictValue {
|
||||
sysJobGroup = v.DictLabel
|
||||
sysJobGroup = i18n.TKey(language, v.DictLabel)
|
||||
break
|
||||
}
|
||||
}
|
||||
// 状态
|
||||
statusValue := "Fail"
|
||||
statusValue := i18n.TKey(language, "dictData.fail")
|
||||
if row.Status == "1" {
|
||||
statusValue = "Success"
|
||||
statusValue = i18n.TKey(language, "dictData.success")
|
||||
}
|
||||
dataCells = append(dataCells, map[string]any{
|
||||
"A" + idx: row.JobLogID,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user