feat: support ticket settings in OMC

This commit is contained in:
zhangsz
2025-07-08 14:45:46 +08:00
parent 39ae16cf42
commit 8d76d68b96
11 changed files with 306 additions and 72 deletions

View File

@@ -1,20 +1,17 @@
ticket:
notifcation:
smtp:
enabled: true
host: mail.smtp.com
port: 25
username: smtpext@smtp.com
# 注意:密码中如果包含特殊字符(如@、#、$等),
# 需要使用双引号括起来,避免解析错误
# 例如password: "1000smtp@omc!"
password: 123456
tlsSkipVerify: true
from: omc@psap
to: # 可以是多个收件人
- admin@psap.com
- user1@psap.com
timeout: # 超时设置
ticketNotification:
enabled: true
host: mail.smtp.com
port: 25
username: smtpext@smtp.com
# 注意:密码中如果包含特殊字符(如@、#、$等),
# 需要使用双引号括起来,避免解析错误
# 例如password: "1000smtp@omc!"
password: 123456
tlsSkipVerify: true
from: omc@psap
to: "admin@psap.com,user1@psap.com" # 注意:可以是多个收件人,使用逗号分隔
ticketTimeout: # 超时设置
# 这些时间单位是分钟
# 注意:这些时间是相对于工单创建时间的
# 例如new: 60分钟inProgress: 60分钟

View File

@@ -56,12 +56,12 @@ omc:
display: "Alarm SMS Forward Interface"
sort: 4
list:
- name: "enable"
- name: "enabled"
type: "bool"
value: "true"
access: "rw"
filter: "true;false"
display: "Enable"
display: "Enabled"
comment: "Is it enabled forward alarm with SMS interface"
- name: "mobileList"
type: "string"
@@ -111,4 +111,103 @@ omc:
access: "rw"
filter: "3~20"
display: "Service Number"
comment: "It is the source address, the length is between 3 and 20"
comment: "It is the source address, the length is between 3 and 20"
ticketNotification:
display: "Ticket Notification Settings"
sort: 5
list:
- name: "enabled"
type: "bool"
value: "true"
access: "rw"
filter: "true;false"
display: "Enabled"
comment: "Is it enabled notifcation ticket with Email interface"
- name: "host"
type: "string"
value: ""
access: "rw"
filter: ""
display: "SMTP Host Server"
comment: "Email SMTP server"
- name: "port"
type: "int"
value: ""
access: "rw"
filter: "0~65535"
display: "Port"
comment: ""
- name: "username"
type: "string"
value: ""
access: "rw"
filter: ""
display: "Username"
comment: ""
- name: "password"
type: "string"
value: ""
access: "rw"
filter: ""
display: "Password"
comment: ""
- name: "tlsSkipVerify"
type: "bool"
value: "true"
access: "rw"
filter: "true;false"
display: "TLS Skip Verify"
comment: "If skip TLS verify (true/false)"
- name: "from"
type: "string"
value: "omc@psap"
access: "rw"
filter: ""
display: "From"
comment: "The sender email address, default is omc@psap"
- name: "to"
type: "string"
value: ""
access: "rw"
filter: ""
display: "To"
comment: "The addition receiver email address, multiple addresses separated by commas"
ticketTimeout:
display: "Ticket Timeout Settings"
sort: 7
list:
- name: "new"
type: int
value: 60
access: "rw"
filter: "0~1440"
display: "New Ticket Timeout (min)"
comment: "New ticket timeout in minutes, default is 60 minutes"
- name: "inProgress"
type: int
value: 60
access: "rw"
filter: "0~1440"
display: "In Progress Timeout (min)"
comment: "In progress ticket timeout in minutes, default is 60 minutes"
- name: "noAnswer1"
type: int
value: 240
access: "rw"
filter: "0~1440"
display: "No Answer 1 Timeout (min)"
comment: "No answer 1 ticket timeout in minutes, default is 240 minutes"
- name: "noAnswer2"
type: int
value: 480
access: "rw"
filter: "0~1440"
display: "No Answer 2 Timeout (min)"
comment: "No answer 2 ticket timeout in minutes, default is 480 minutes"
- name: "nearlyTimeout"
type: int
value: 20
access: "rw"
filter: "0~1440"
display: "Nearly Timeout (min)"
comment: "Nearly timeout in minutes, default is 20 minutes"