summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/eventsource/manager_run.go3
-rw-r--r--modules/templates/helper.go4
2 files changed, 5 insertions, 2 deletions
diff --git a/modules/eventsource/manager_run.go b/modules/eventsource/manager_run.go
index 75d3ee5b01..ccfe2e0709 100644
--- a/modules/eventsource/manager_run.go
+++ b/modules/eventsource/manager_run.go
@@ -17,6 +17,9 @@ import (
// Init starts this eventsource
func (m *Manager) Init() {
+ if setting.UI.Notification.EventSourceUpdateTime <= 0 {
+ return
+ }
go graceful.GetManager().RunWithShutdownContext(m.Run)
}
diff --git a/modules/templates/helper.go b/modules/templates/helper.go
index 53354a0d3d..5001963e90 100644
--- a/modules/templates/helper.go
+++ b/modules/templates/helper.go
@@ -289,8 +289,8 @@ func NewFuncMap() []template.FuncMap {
return ""
}
},
- "NotificationSettings": func() map[string]int {
- return map[string]int{
+ "NotificationSettings": func() map[string]interface{} {
+ return map[string]interface{}{
"MinTimeout": int(setting.UI.Notification.MinTimeout / time.Millisecond),
"TimeoutStep": int(setting.UI.Notification.TimeoutStep / time.Millisecond),
"MaxTimeout": int(setting.UI.Notification.MaxTimeout / time.Millisecond),