started work datasources admin

This commit is contained in:
Torkel Ödegaard
2014-12-16 12:04:08 +01:00
parent f665a30d28
commit b70a3f0958
14 changed files with 104 additions and 21 deletions

View File

@@ -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:

View File

@@ -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()
}
}