mirror of
				https://github.com/grafana/grafana.git
				synced 2025-02-25 18:55:37 -06:00 
			
		
		
		
	started work datasources admin
This commit is contained in:
		@@ -46,8 +46,8 @@ func Logger() macaron.Handler {
 | 
			
		||||
				content = fmt.Sprintf("\033[1;32m%s\033[0m", content)
 | 
			
		||||
				return
 | 
			
		||||
			case 304:
 | 
			
		||||
				//content = fmt.Sprintf("\033[1;33m%s\033[0m", content)
 | 
			
		||||
				return
 | 
			
		||||
				content = fmt.Sprintf("\033[1;33m%s\033[0m", content)
 | 
			
		||||
			case 404:
 | 
			
		||||
				content = fmt.Sprintf("\033[1;31m%s\033[0m", content)
 | 
			
		||||
			case 500:
 | 
			
		||||
 
 | 
			
		||||
@@ -9,6 +9,7 @@ import (
 | 
			
		||||
 | 
			
		||||
	"github.com/torkelo/grafana-pro/pkg/log"
 | 
			
		||||
	"github.com/torkelo/grafana-pro/pkg/models"
 | 
			
		||||
	"github.com/torkelo/grafana-pro/pkg/setting"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type Context struct {
 | 
			
		||||
@@ -60,8 +61,8 @@ func (ctx *Context) JsonApiErr(status int, message string, err error) {
 | 
			
		||||
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		log.Error(4, "%s: %v", message, err)
 | 
			
		||||
		if macaron.Env != macaron.PROD {
 | 
			
		||||
			resp["error"] = err
 | 
			
		||||
		if setting.Env != setting.PROD {
 | 
			
		||||
			resp["error"] = err.Error()
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user