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
f3a66ecb
Commit
f3a66ecb
authored
Jan 11, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: alert list pause/start toggle was not working properly
parent
6a73205b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
public/app/stores/AlertListStore/AlertRule.ts
+2
-2
public/app/stores/AlertListStore/helpers.ts
+1
-1
No files found.
public/app/stores/AlertListStore/AlertRule.ts
View file @
f3a66ecb
import
{
types
,
getEnv
,
flow
}
from
'mobx-state-tree'
;
import
{
types
,
getEnv
,
flow
}
from
'mobx-state-tree'
;
import
{
setStateFields
}
from
'./helpers'
;
export
const
AlertRule
=
types
...
...
@@ -26,7 +26,7 @@ export const AlertRule = types
*/
togglePaused
:
flow
(
function
*
togglePaused
()
{
const
backendSrv
=
getEnv
(
self
).
backendSrv
;
const
payload
=
{
paused
:
self
.
isPaused
};
const
payload
=
{
paused
:
!
self
.
isPaused
};
const
res
=
yield
backendSrv
.
post
(
`/api/alerts/
${
self
.
id
}
/pause`
,
payload
);
setStateFields
(
self
,
res
.
state
);
self
.
info
=
''
;
...
...
public/app/stores/AlertListStore/helpers.ts
View file @
f3a66ecb
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
alertDef
from
'app/features/alerting/alert_def'
;
export
function
setStateFields
(
rule
,
state
)
{
...
...
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