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
8c30babd
Commit
8c30babd
authored
Sep 13, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(alerting): fixed build issues
parent
3af891d0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
20 deletions
+14
-20
pkg/services/alerting/extractor_test.go
+0
-6
pkg/services/alerting/notifiers/base_test.go
+2
-6
pkg/services/annotations/annotations.go
+1
-0
pkg/services/sqlstore/migrations/annotation_mig.go
+11
-8
No files found.
pkg/services/alerting/extractor_test.go
View file @
8c30babd
...
...
@@ -44,7 +44,6 @@ func TestAlertRuleExtraction(t *testing.T) {
"handler": 1,
"enabled": true,
"frequency": "60s",
"severity": "critical",
"conditions": [
{
"type": "query",
...
...
@@ -129,11 +128,6 @@ func TestAlertRuleExtraction(t *testing.T) {
So
(
alerts
[
1
]
.
Handler
,
ShouldEqual
,
0
)
})
Convey
(
"should extract Severity property"
,
func
()
{
So
(
alerts
[
0
]
.
Severity
,
ShouldEqual
,
"critical"
)
So
(
alerts
[
1
]
.
Severity
,
ShouldEqual
,
"warning"
)
})
Convey
(
"should extract frequency in seconds"
,
func
()
{
So
(
alerts
[
0
]
.
Frequency
,
ShouldEqual
,
60
)
So
(
alerts
[
1
]
.
Frequency
,
ShouldEqual
,
60
)
...
...
pkg/services/alerting/notifiers/base_test.go
View file @
8c30babd
package
notifiers
import
(
"testing"
import
.
"github.com/smartystreets/goconvey/convey"
.
"github.com/smartystreets/goconvey/convey"
)
func
TestBaseNotifier
(
t
*
testing
.
T
)
{
func
TestBaseNotifier
(
/* t *testing.T */
)
{
// Convey("Parsing base notification state", t, func() {
//
// Convey("matches", func() {
...
...
pkg/services/annotations/annotations.go
View file @
8c30babd
...
...
@@ -40,6 +40,7 @@ type Item struct {
OrgId
int64
`json:"orgId"`
DashboardId
int64
`json:"dashboardId"`
PanelId
int64
`json:"panelId"`
CategoryId
int64
`json:"panelId"`
Type
ItemType
`json:"type"`
Title
string
`json:"title"`
Text
string
`json:"text"`
...
...
pkg/services/sqlstore/migrations/annotation_mig.go
View file @
8c30babd
...
...
@@ -15,6 +15,7 @@ func addAnnotationMig(mg *Migrator) {
{
Name
:
"user_id"
,
Type
:
DB_BigInt
,
Nullable
:
true
},
{
Name
:
"dashboard_id"
,
Type
:
DB_BigInt
,
Nullable
:
true
},
{
Name
:
"panel_id"
,
Type
:
DB_BigInt
,
Nullable
:
true
},
{
Name
:
"category_id"
,
Type
:
DB_BigInt
,
Nullable
:
true
},
{
Name
:
"type"
,
Type
:
DB_NVarchar
,
Length
:
25
,
Nullable
:
false
},
{
Name
:
"title"
,
Type
:
DB_Text
,
Nullable
:
false
},
{
Name
:
"text"
,
Type
:
DB_Text
,
Nullable
:
false
},
...
...
@@ -27,18 +28,20 @@ func addAnnotationMig(mg *Migrator) {
Indices
:
[]
*
Index
{
{
Cols
:
[]
string
{
"org_id"
,
"alert_id"
},
Type
:
IndexType
},
{
Cols
:
[]
string
{
"org_id"
,
"type"
},
Type
:
IndexType
},
{
Cols
:
[]
string
{
"dashboard_id"
,
"panel_id"
},
Type
:
IndexType
},
{
Cols
:
[]
string
{
"epoch"
},
Type
:
IndexType
},
{
Cols
:
[]
string
{
"org_id"
,
"category_id"
},
Type
:
IndexType
},
{
Cols
:
[]
string
{
"org_id"
,
"dashboard_id"
,
"panel_id"
,
"epoch"
},
Type
:
IndexType
},
{
Cols
:
[]
string
{
"org_id"
,
"epoch"
},
Type
:
IndexType
},
},
}
mg
.
AddMigration
(
"Drop old annotation table v
3
"
,
NewDropTableMigration
(
"annotation"
))
mg
.
AddMigration
(
"Drop old annotation table v
4
"
,
NewDropTableMigration
(
"annotation"
))
mg
.
AddMigration
(
"create annotation table v
4
"
,
NewAddTableMigration
(
table
))
mg
.
AddMigration
(
"create annotation table v
5
"
,
NewAddTableMigration
(
table
))
// create indices
mg
.
AddMigration
(
"add index annotation org_id & alert_id v3"
,
NewAddIndexMigration
(
table
,
table
.
Indices
[
0
]))
mg
.
AddMigration
(
"add index annotation org_id & type v3"
,
NewAddIndexMigration
(
table
,
table
.
Indices
[
1
]))
mg
.
AddMigration
(
"add index annotation dashboard_id panel_id"
,
NewAddIndexMigration
(
table
,
table
.
Indices
[
2
]))
mg
.
AddMigration
(
"add index annotation epoch v3"
,
NewAddIndexMigration
(
table
,
table
.
Indices
[
3
]))
mg
.
AddMigration
(
"add index annotation 0 v3"
,
NewAddIndexMigration
(
table
,
table
.
Indices
[
0
]))
mg
.
AddMigration
(
"add index annotation 1 v3"
,
NewAddIndexMigration
(
table
,
table
.
Indices
[
1
]))
mg
.
AddMigration
(
"add index annotation 2 v3"
,
NewAddIndexMigration
(
table
,
table
.
Indices
[
2
]))
mg
.
AddMigration
(
"add index annotation 3 v3"
,
NewAddIndexMigration
(
table
,
table
.
Indices
[
3
]))
mg
.
AddMigration
(
"add index annotation 4 v3"
,
NewAddIndexMigration
(
table
,
table
.
Indices
[
4
]))
}
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