Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
40d39f8a
Commit
40d39f8a
authored
Jan 25, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(): renaming alerting hide ui option, #7318
parent
fee48464
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
8 deletions
+10
-8
conf/defaults.ini
+3
-2
pkg/api/frontendsettings.go
+1
-1
pkg/api/index.go
+1
-1
pkg/cmd/grafana-server/server.go
+1
-1
pkg/setting/setting.go
+2
-2
public/app/plugins/panel/graph/module.ts
+2
-1
No files found.
conf/defaults.ini
View file @
40d39f8a
...
@@ -402,9 +402,10 @@ global_session = -1
...
@@ -402,9 +402,10 @@ global_session = -1
#################################### Alerting ############################
#################################### Alerting ############################
[alerting]
[alerting]
# Makes it possible to turn off alert rule execution.
# Disable alerting engine & UI features
enabled
=
true
# Makes it possible to turn off alert rule execution but alerting UI is visible
execute_alerts
=
true
execute_alerts
=
true
show_alerting_ui
=
true
#################################### Internal Grafana Metrics ############
#################################### Internal Grafana Metrics ############
# Metrics available at HTTP API Url /api/metrics
# Metrics available at HTTP API Url /api/metrics
...
...
pkg/api/frontendsettings.go
View file @
40d39f8a
...
@@ -140,7 +140,7 @@ func getFrontendSettingsMap(c *middleware.Context) (map[string]interface{}, erro
...
@@ -140,7 +140,7 @@ func getFrontendSettingsMap(c *middleware.Context) (map[string]interface{}, erro
"allowOrgCreate"
:
(
setting
.
AllowUserOrgCreate
&&
c
.
IsSignedIn
)
||
c
.
IsGrafanaAdmin
,
"allowOrgCreate"
:
(
setting
.
AllowUserOrgCreate
&&
c
.
IsSignedIn
)
||
c
.
IsGrafanaAdmin
,
"authProxyEnabled"
:
setting
.
AuthProxyEnabled
,
"authProxyEnabled"
:
setting
.
AuthProxyEnabled
,
"ldapEnabled"
:
setting
.
LdapEnabled
,
"ldapEnabled"
:
setting
.
LdapEnabled
,
"
showAlertingUI"
:
setting
.
ShowAlertingUI
,
"
alertingEnabled"
:
setting
.
AlertingEnabled
,
"buildInfo"
:
map
[
string
]
interface
{}{
"buildInfo"
:
map
[
string
]
interface
{}{
"version"
:
setting
.
BuildVersion
,
"version"
:
setting
.
BuildVersion
,
"commit"
:
setting
.
BuildCommit
,
"commit"
:
setting
.
BuildCommit
,
...
...
pkg/api/index.go
View file @
40d39f8a
...
@@ -103,7 +103,7 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
...
@@ -103,7 +103,7 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
Children
:
dashboardChildNavs
,
Children
:
dashboardChildNavs
,
})
})
if
setting
.
ShowAlertingUI
&&
(
c
.
OrgRole
==
m
.
ROLE_ADMIN
||
c
.
OrgRole
==
m
.
ROLE_EDITOR
)
{
if
setting
.
AlertingEnabled
&&
(
c
.
OrgRole
==
m
.
ROLE_ADMIN
||
c
.
OrgRole
==
m
.
ROLE_EDITOR
)
{
alertChildNavs
:=
[]
*
dtos
.
NavLink
{
alertChildNavs
:=
[]
*
dtos
.
NavLink
{
{
Text
:
"Alert List"
,
Url
:
setting
.
AppSubUrl
+
"/alerting/list"
},
{
Text
:
"Alert List"
,
Url
:
setting
.
AppSubUrl
+
"/alerting/list"
},
{
Text
:
"Notification channels"
,
Url
:
setting
.
AppSubUrl
+
"/alerting/notifications"
},
{
Text
:
"Notification channels"
,
Url
:
setting
.
AppSubUrl
+
"/alerting/notifications"
},
...
...
pkg/cmd/grafana-server/server.go
View file @
40d39f8a
...
@@ -59,7 +59,7 @@ func (g *GrafanaServerImpl) Start() {
...
@@ -59,7 +59,7 @@ func (g *GrafanaServerImpl) Start() {
plugins
.
Init
()
plugins
.
Init
()
// init alerting
// init alerting
if
setting
.
ExecuteAlerts
{
if
setting
.
AlertingEnabled
&&
setting
.
ExecuteAlerts
{
engine
:=
alerting
.
NewEngine
()
engine
:=
alerting
.
NewEngine
()
g
.
childRoutines
.
Go
(
func
()
error
{
return
engine
.
Run
(
g
.
context
)
})
g
.
childRoutines
.
Go
(
func
()
error
{
return
engine
.
Run
(
g
.
context
)
})
}
}
...
...
pkg/setting/setting.go
View file @
40d39f8a
...
@@ -150,8 +150,8 @@ var (
...
@@ -150,8 +150,8 @@ var (
Quota
QuotaSettings
Quota
QuotaSettings
// Alerting
// Alerting
AlertingEnabled
bool
ExecuteAlerts
bool
ExecuteAlerts
bool
ShowAlertingUI
bool
// logger
// logger
logger
log
.
Logger
logger
log
.
Logger
...
@@ -579,8 +579,8 @@ func NewConfigContext(args *CommandLineArgs) error {
...
@@ -579,8 +579,8 @@ func NewConfigContext(args *CommandLineArgs) error {
LdapAllowSignup
=
ldapSec
.
Key
(
"allow_sign_up"
)
.
MustBool
(
true
)
LdapAllowSignup
=
ldapSec
.
Key
(
"allow_sign_up"
)
.
MustBool
(
true
)
alerting
:=
Cfg
.
Section
(
"alerting"
)
alerting
:=
Cfg
.
Section
(
"alerting"
)
AlertingEnabled
=
alerting
.
Key
(
"enabled"
)
.
MustBool
(
true
)
ExecuteAlerts
=
alerting
.
Key
(
"execute_alerts"
)
.
MustBool
(
true
)
ExecuteAlerts
=
alerting
.
Key
(
"execute_alerts"
)
.
MustBool
(
true
)
ShowAlertingUI
=
alerting
.
Key
(
"show_alerting_ui"
)
.
MustBool
(
true
)
readSessionConfig
()
readSessionConfig
()
readSmtpSettings
()
readSmtpSettings
()
...
...
public/app/plugins/panel/graph/module.ts
View file @
40d39f8a
...
@@ -132,7 +132,8 @@ class GraphCtrl extends MetricsPanelCtrl {
...
@@ -132,7 +132,8 @@ class GraphCtrl extends MetricsPanelCtrl {
this
.
addEditorTab
(
'Axes'
,
axesEditorComponent
,
2
);
this
.
addEditorTab
(
'Axes'
,
axesEditorComponent
,
2
);
this
.
addEditorTab
(
'Legend'
,
'public/app/plugins/panel/graph/tab_legend.html'
,
3
);
this
.
addEditorTab
(
'Legend'
,
'public/app/plugins/panel/graph/tab_legend.html'
,
3
);
this
.
addEditorTab
(
'Display'
,
'public/app/plugins/panel/graph/tab_display.html'
,
4
);
this
.
addEditorTab
(
'Display'
,
'public/app/plugins/panel/graph/tab_display.html'
,
4
);
if
(
config
.
showAlertingUI
)
{
if
(
config
.
alertingEnabled
)
{
this
.
addEditorTab
(
'Alert'
,
alertTab
,
5
);
this
.
addEditorTab
(
'Alert'
,
alertTab
,
5
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment