mirror of
				https://github.com/grafana/grafana.git
				synced 2025-02-25 18:55:37 -06:00 
			
		
		
		
	Merge branch 'master' into alert_prometheus
This commit is contained in:
		@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -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)))
 | 
			
		||||
 
 | 
			
		||||
@@ -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,
 | 
			
		||||
	}))
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user