Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
Nightingale
提交
d49d4076
N
Nightingale
项目概览
jobily
/
Nightingale
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
Nightingale
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d49d4076
编写于
4月 19, 2021
作者:
7
710leo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
organize configuration
上级
c71264ab
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
5 addition
and
6 deletion
+5
-6
etc/dict.json
etc/dict.json
+0
-1
etc/tpl/login-code-email.tpl
etc/tpl/login-code-email.tpl
+0
-0
etc/tpl/login-code-sms.tpl
etc/tpl/login-code-sms.tpl
+0
-0
etc/tpl/mail.tpl
etc/tpl/mail.tpl
+0
-0
etc/tpl/password-changed-email.tpl
etc/tpl/password-changed-email.tpl
+0
-0
etc/tpl/sms.tpl
etc/tpl/sms.tpl
+0
-0
src/modules/server/http/router_auth.go
src/modules/server/http/router_auth.go
+3
-3
src/modules/server/notify/notify.go
src/modules/server/notify/notify.go
+2
-2
未找到文件。
etc/dict.json
已删除
100644 → 0
浏览文件 @
c71264ab
{}
\ No newline at end of file
etc/login-code-email.tpl
→
etc/
tpl/
login-code-email.tpl
浏览文件 @
d49d4076
文件已移动
etc/login-code-sms.tpl
→
etc/
tpl/
login-code-sms.tpl
浏览文件 @
d49d4076
文件已移动
etc/mail.tpl
→
etc/
tpl/
mail.tpl
浏览文件 @
d49d4076
文件已移动
etc/password-changed-email.tpl
→
etc/
tpl/
password-changed-email.tpl
浏览文件 @
d49d4076
文件已移动
etc/sms.tpl
→
etc/
tpl/
sms.tpl
浏览文件 @
d49d4076
文件已移动
src/modules/server/http/router_auth.go
浏览文件 @
d49d4076
...
...
@@ -58,7 +58,7 @@ func getConfigFile(name, ext string) (string, error) {
}
func
init
()
{
filename
,
err
:=
getConfigFile
(
"login-code-sms"
,
"tpl"
)
filename
,
err
:=
getConfigFile
(
"
tpl/
login-code-sms"
,
"tpl"
)
if
err
!=
nil
{
log
.
Fatal
(
err
)
}
...
...
@@ -68,7 +68,7 @@ func init() {
log
.
Fatalf
(
"open %s err: %s"
,
filename
,
err
)
}
filename
,
err
=
getConfigFile
(
"login-code-email"
,
"tpl"
)
filename
,
err
=
getConfigFile
(
"
tpl/
login-code-email"
,
"tpl"
)
if
err
!=
nil
{
log
.
Fatal
(
err
)
}
...
...
@@ -77,7 +77,7 @@ func init() {
log
.
Fatalf
(
"open %s err: %s"
,
filename
,
err
)
}
filename
,
err
=
getConfigFile
(
"password-changed-email"
,
"tpl"
)
filename
,
err
=
getConfigFile
(
"
tpl/
password-changed-email"
,
"tpl"
)
if
err
!=
nil
{
log
.
Fatal
(
err
)
}
...
...
src/modules/server/notify/notify.go
浏览文件 @
d49d4076
...
...
@@ -182,7 +182,7 @@ func genContent(isUpgrade bool, events []*models.Event) (string, string) {
}
// 生成告警邮件
fp
:=
path
.
Join
(
file
.
SelfDir
(),
"etc"
,
"mail.tpl"
)
fp
:=
path
.
Join
(
file
.
SelfDir
(),
"etc"
,
"
tpl"
,
"
mail.tpl"
)
t
,
err
:=
template
.
ParseFiles
(
fp
)
if
err
!=
nil
{
logger
.
Errorf
(
"InternalServerError: cannot parse %s %v"
,
fp
,
err
)
...
...
@@ -199,7 +199,7 @@ func genContent(isUpgrade bool, events []*models.Event) (string, string) {
}
// 生成告警短信,短信和IM复用一个内容模板
fp
=
path
.
Join
(
file
.
SelfDir
(),
"etc"
,
"sms.tpl"
)
fp
=
path
.
Join
(
file
.
SelfDir
(),
"etc"
,
"
tpl"
,
"
sms.tpl"
)
t
,
err
=
template
.
New
(
"sms.tpl"
)
.
Funcs
(
template
.
FuncMap
{
"unescaped"
:
func
(
str
string
)
interface
{}
{
return
template
.
HTML
(
str
)
},
"urlconvert"
:
func
(
str
string
)
interface
{}
{
return
template
.
URL
(
str
)
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录