Commit ad4cf373 by Torkel Ödegaard

Work on unifying backend grafnaa and standalone grafana, and being able to build…

Work on unifying backend grafnaa and standalone grafana, and being able to build both from the same branch
parent 2b02c87b
Subproject commit 47f226be3b480e037692f30a320c6fcff2b9e01c
Subproject commit 33e3fc70b286e0a1ebee901006e8f70b63b69198
......@@ -17,8 +17,8 @@ func init() {
func main() {
app := cli.NewApp()
app.Name = "Grafana Pro"
app.Usage = "Grafana Pro Service"
app.Name = "Grafana Backend"
app.Usage = "grafana web"
app.Version = APP_VER
app.Commands = []cli.Command{cmd.CmdWeb}
app.Flags = append(app.Flags, []cli.Flag{}...)
......
......@@ -35,12 +35,14 @@ func newMacaron() *macaron.Macaron {
mapStatic(m, "", "public")
mapStatic(m, "app", "app")
mapStatic(m, "css", "css")
mapStatic(m, "img", "img")
mapStatic(m, "font", "font")
m.Use(session.Sessioner(setting.SessionOptions))
m.Use(macaron.Renderer(macaron.RenderOptions{
Directory: setting.TemplatesRootPath,
Directory: path.Join(setting.StaticRootPath, "views"),
IndentJSON: macaron.Env != macaron.PROD,
Delims: macaron.Delims{Left: "[[", Right: "]]"},
}))
......
......@@ -52,7 +52,6 @@ var (
CertFile, KeyFile string
RouterLogging bool
StaticRootPath string
TemplatesRootPath string
// Session settings.
SessionOptions session.Options
......@@ -139,7 +138,6 @@ func NewConfigContext() {
}
StaticRootPath = Cfg.MustValue("server", "static_root_path", path.Join(workDir, "grafana/src"))
TemplatesRootPath = Cfg.MustValue("server", "templates_path", path.Join(workDir, "templates"))
RouterLogging = Cfg.MustBool("server", "router_logging", false)
// PhantomJS rendering
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title>Grafana</title>
<link rel="stylesheet" href="/public/css/grafana.dark.min.css" title="Dark">
<link rel="icon" type="image/png" href="img/fav32.png">
<base href="/">
</head>
<body>
<h1>404</h1>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title>Grafana</title>
<link rel="stylesheet" href="/public/css/grafana.dark.min.css" title="Dark">
<link rel="icon" type="image/png" href="img/fav32.png">
<base href="/">
<!-- build:js app/app.js -->
<script src="/public/vendor/require/require.js"></script>
<script src="/public/app/components/require.config.js"></script>
<!-- endbuild -->
<script>require(['app'], function (app) { app.boot(); })</script>
</head>
<body ng-cloak ng-controller="GrafanaCtrl">
<link rel="stylesheet" href="/public/css/grafana.light.min.css" ng-if="grafana.style === 'light'">
<div class="pro-container" ng-class="{'pro-sidemenu-open': grafana.sidemenu}">
<aside class="pro-sidemenu" ng-if="grafana.sidemenu">
<div ng-include="'app/partials/pro/sidemenu.html'"></div>
</aside>
<div class="page-alert-list">
<div ng-repeat='alert in dashAlerts.list' class="alert-{{alert.severity}} alert">
<button type="button" class="alert-close" ng-click="dashAlerts.clear(alert)">
<i class="icon-remove-sign"></i>
</button>
<div class="alert-title">{{alert.title}}</div>
<div ng-bind-html='alert.text'></div>
</div>
</div>
<div ng-view class="pro-main-view"></div>
</div>
</body>
<script>
window.grafanaBootData = {
user:[[.user]],
settings: [[.settings]]
};
</script>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment