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
4bbc2108
Commit
4bbc2108
authored
Oct 11, 2016
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(alerting): add pause button to alert list
parent
80479724
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
pkg/api/alerting.go
+3
-0
public/app/features/alerting/partials/alert_list.html
+4
-4
No files found.
pkg/api/alerting.go
View file @
4bbc2108
...
@@ -270,13 +270,16 @@ func PauseAlert(c *middleware.Context, dto dtos.PauseAlertCommand) Response {
...
@@ -270,13 +270,16 @@ func PauseAlert(c *middleware.Context, dto dtos.PauseAlertCommand) Response {
}
}
var
response
models
.
AlertStateType
=
models
.
AlertStateNoData
var
response
models
.
AlertStateType
=
models
.
AlertStateNoData
pausedState
:=
"un paused"
if
cmd
.
Paused
{
if
cmd
.
Paused
{
response
=
models
.
AlertStatePaused
response
=
models
.
AlertStatePaused
pausedState
=
"paused"
}
}
result
:=
map
[
string
]
interface
{}{
result
:=
map
[
string
]
interface
{}{
"alertId"
:
cmd
.
AlertId
,
"alertId"
:
cmd
.
AlertId
,
"state"
:
response
,
"state"
:
response
,
"message"
:
"alert "
+
pausedState
,
}
}
return
Json
(
200
,
result
)
return
Json
(
200
,
result
)
...
...
public/app/features/alerting/partials/alert_list.html
View file @
4bbc2108
...
@@ -29,13 +29,13 @@
...
@@ -29,13 +29,13 @@
<div
class=
"card-item card-item--alert"
>
<div
class=
"card-item card-item--alert"
>
<div
class=
"card-item-header"
>
<div
class=
"card-item-header"
>
<div
class=
"card-item-type"
>
<div
class=
"card-item-type"
>
<a
class=
"card-item-cog"
href=
"dashboard/{{alert.dashboardUri}}?panelId={{alert.panelId}}&fullscreen&edit&tab=alert"
bs-tooltip=
"'Edit alert rule'"
>
<a
class=
"card-item-cog"
bs-tooltip=
"'Pausing an alert rule prevents it from executing'"
ng-click=
"ctrl.pauseAlertRule(alert.id)"
>
<i
class=
"fa fa-pause"
></i>
</a>
<a
class=
"card-item-cog"
href=
"dashboard/{{alert.dashboardUri}}?panelId={{alert.panelId}}&fullscreen&edit&tab=alert"
bs-tooltip=
"'Edit alert rule'"
>
<i
class=
"icon-gf icon-gf-settings"
></i>
<i
class=
"icon-gf icon-gf-settings"
></i>
</a>
</a>
</div>
</div>
<div
class=
"card-item-header"
>
<a
class=
"card-item-cog"
ng-click=
"ctrl.pauseAlertRule(alert.id)"
>
pause
</a>
</div>
</div>
</div>
<div
class=
"card-item-body"
>
<div
class=
"card-item-body"
>
<div
class=
"card-item-details"
>
<div
class=
"card-item-details"
>
...
...
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