mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Work on unifying backend grafnaa and standalone grafana, and being able to build both from the same branch
This commit is contained in:
2
grafana
2
grafana
Submodule grafana updated: 47f226be3b...33e3fc70b2
4
main.go
4
main.go
@@ -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
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
<!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>
|
||||
@@ -1,53 +0,0 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user