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
d412aafb
Unverified
Commit
d412aafb
authored
Sep 30, 2018
by
Marcus Efraimsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unused code
parent
d313ffa8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
30 deletions
+0
-30
pkg/models/alert_notifications.go
+0
-7
pkg/services/sqlstore/alert_notification.go
+0
-23
No files found.
pkg/models/alert_notifications.go
View file @
d412aafb
...
@@ -111,10 +111,3 @@ type GetNotificationStateQuery struct {
...
@@ -111,10 +111,3 @@ type GetNotificationStateQuery struct {
Result
*
AlertNotificationState
Result
*
AlertNotificationState
}
}
type
InsertAlertNotificationCommand
struct
{
OrgId
int64
AlertId
int64
NotifierId
int64
SentAt
int64
State
AlertNotificationStateType
}
pkg/services/sqlstore/alert_notification.go
View file @
d412aafb
...
@@ -19,7 +19,6 @@ func init() {
...
@@ -19,7 +19,6 @@ func init() {
bus
.
AddHandler
(
"sql"
,
DeleteAlertNotification
)
bus
.
AddHandler
(
"sql"
,
DeleteAlertNotification
)
bus
.
AddHandler
(
"sql"
,
GetAlertNotificationsToSend
)
bus
.
AddHandler
(
"sql"
,
GetAlertNotificationsToSend
)
bus
.
AddHandler
(
"sql"
,
GetAllAlertNotifications
)
bus
.
AddHandler
(
"sql"
,
GetAllAlertNotifications
)
bus
.
AddHandlerCtx
(
"sql"
,
InsertAlertNotificationState
)
bus
.
AddHandlerCtx
(
"sql"
,
GetAlertNotificationState
)
bus
.
AddHandlerCtx
(
"sql"
,
GetAlertNotificationState
)
bus
.
AddHandlerCtx
(
"sql"
,
SetAlertNotificationStateToCompleteCommand
)
bus
.
AddHandlerCtx
(
"sql"
,
SetAlertNotificationStateToCompleteCommand
)
bus
.
AddHandlerCtx
(
"sql"
,
SetAlertNotificationStateToPendingCommand
)
bus
.
AddHandlerCtx
(
"sql"
,
SetAlertNotificationStateToPendingCommand
)
...
@@ -231,28 +230,6 @@ func UpdateAlertNotification(cmd *m.UpdateAlertNotificationCommand) error {
...
@@ -231,28 +230,6 @@ func UpdateAlertNotification(cmd *m.UpdateAlertNotificationCommand) error {
})
})
}
}
func
InsertAlertNotificationState
(
ctx
context
.
Context
,
cmd
*
m
.
InsertAlertNotificationCommand
)
error
{
return
withDbSession
(
ctx
,
func
(
sess
*
DBSession
)
error
{
notificationState
:=
&
m
.
AlertNotificationState
{
OrgId
:
cmd
.
OrgId
,
AlertId
:
cmd
.
AlertId
,
NotifierId
:
cmd
.
NotifierId
,
SentAt
:
cmd
.
SentAt
,
State
:
cmd
.
State
,
}
if
_
,
err
:=
sess
.
Insert
(
notificationState
);
err
!=
nil
{
if
dialect
.
IsUniqueConstraintViolation
(
err
)
{
return
m
.
ErrAlertNotificationStateAlreadyExist
}
return
err
}
return
nil
})
}
func
SetAlertNotificationStateToCompleteCommand
(
ctx
context
.
Context
,
cmd
*
m
.
SetAlertNotificationStateToCompleteCommand
)
error
{
func
SetAlertNotificationStateToCompleteCommand
(
ctx
context
.
Context
,
cmd
*
m
.
SetAlertNotificationStateToCompleteCommand
)
error
{
return
withDbSession
(
ctx
,
func
(
sess
*
DBSession
)
error
{
return
withDbSession
(
ctx
,
func
(
sess
*
DBSession
)
error
{
version
:=
cmd
.
State
.
Version
version
:=
cmd
.
State
.
Version
...
...
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