Merge branch 'master' into alert_prometheus

This commit is contained in:
bergquist
2016-09-22 19:27:24 +02:00
329 changed files with 5738 additions and 13256 deletions

View File

@@ -72,8 +72,8 @@ func (n *RootNotifier) uploadImage(context *EvalContext) error {
Url: imageUrl,
Width: "800",
Height: "400",
SessionId: "123",
Timeout: "10",
SessionId: "cef0256d482b4293",
Timeout: "30",
}
if imagePath, err := renderer.RenderToPng(renderOpts); err != nil {

View File

@@ -12,6 +12,7 @@ import (
"net/smtp"
"os"
"strings"
"time"
"github.com/grafana/grafana/pkg/log"
"github.com/grafana/grafana/pkg/setting"
@@ -66,7 +67,7 @@ func sendToSmtpServer(recipients []string, msgContent []byte) error {
tlsconfig.Certificates = []tls.Certificate{cert}
}
conn, err := net.Dial("tcp", net.JoinHostPort(host, port))
conn, err := net.DialTimeout("tcp", net.JoinHostPort(host, port), time.Second*10)
if err != nil {
return err
}

View File

@@ -44,7 +44,7 @@ func sendWebRequest(webhook *Webhook) error {
webhookLog.Debug("Sending webhook", "url", webhook.Url)
client := http.Client{
Timeout: time.Duration(3 * time.Second),
Timeout: time.Duration(10 * time.Second),
}
request, err := http.NewRequest("POST", webhook.Url, bytes.NewReader([]byte(webhook.Body)))

View File

@@ -120,4 +120,9 @@ func addDashboardMigration(mg *Migrator) {
mg.AddMigration("Add index for plugin_id in dashboard", NewAddIndexMigration(dashboardV2, &Index{
Cols: []string{"org_id", "plugin_id"}, Type: IndexType,
}))
// dashboard_id index for dashboard_tag table
mg.AddMigration("Add index for dashboard_id in dashboard_tag", NewAddIndexMigration(dashboardTagV1, &Index{
Cols: []string{"dashboard_id"}, Type: IndexType,
}))
}