mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(footer): began work on page footer
This commit is contained in:
parent
152e085310
commit
de26a17dc7
@ -1,13 +1,17 @@
|
|||||||
package dtos
|
package dtos
|
||||||
|
|
||||||
type IndexViewData struct {
|
type IndexViewData struct {
|
||||||
User *CurrentUser
|
User *CurrentUser
|
||||||
Settings map[string]interface{}
|
Settings map[string]interface{}
|
||||||
AppUrl string
|
AppUrl string
|
||||||
AppSubUrl string
|
AppSubUrl string
|
||||||
GoogleAnalyticsId string
|
GoogleAnalyticsId string
|
||||||
GoogleTagManagerId string
|
GoogleTagManagerId string
|
||||||
MainNavLinks []*NavLink
|
MainNavLinks []*NavLink
|
||||||
|
BuildVersion string
|
||||||
|
BuildCommit string
|
||||||
|
NewGrafanaVersionExists bool
|
||||||
|
NewGrafanaVersion string
|
||||||
}
|
}
|
||||||
|
|
||||||
type PluginCss struct {
|
type PluginCss struct {
|
||||||
|
@ -137,11 +137,9 @@ func getFrontendSettingsMap(c *middleware.Context) (map[string]interface{}, erro
|
|||||||
"allowOrgCreate": (setting.AllowUserOrgCreate && c.IsSignedIn) || c.IsGrafanaAdmin,
|
"allowOrgCreate": (setting.AllowUserOrgCreate && c.IsSignedIn) || c.IsGrafanaAdmin,
|
||||||
"authProxyEnabled": setting.AuthProxyEnabled,
|
"authProxyEnabled": setting.AuthProxyEnabled,
|
||||||
"buildInfo": map[string]interface{}{
|
"buildInfo": map[string]interface{}{
|
||||||
"version": setting.BuildVersion,
|
"version": setting.BuildVersion,
|
||||||
"commit": setting.BuildCommit,
|
"commit": setting.BuildCommit,
|
||||||
"buildstamp": setting.BuildStamp,
|
"buildstamp": setting.BuildStamp,
|
||||||
"latestVersion": plugins.GrafanaLatestVersion,
|
|
||||||
"hasUpdate": plugins.GrafanaHasUpdate,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,11 +36,15 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
|
|||||||
LightTheme: prefs.Theme == "light",
|
LightTheme: prefs.Theme == "light",
|
||||||
Timezone: prefs.Timezone,
|
Timezone: prefs.Timezone,
|
||||||
},
|
},
|
||||||
Settings: settings,
|
Settings: settings,
|
||||||
AppUrl: setting.AppUrl,
|
AppUrl: setting.AppUrl,
|
||||||
AppSubUrl: setting.AppSubUrl,
|
AppSubUrl: setting.AppSubUrl,
|
||||||
GoogleAnalyticsId: setting.GoogleAnalyticsId,
|
GoogleAnalyticsId: setting.GoogleAnalyticsId,
|
||||||
GoogleTagManagerId: setting.GoogleTagManagerId,
|
GoogleTagManagerId: setting.GoogleTagManagerId,
|
||||||
|
BuildVersion: setting.BuildVersion,
|
||||||
|
BuildCommit: setting.BuildCommit,
|
||||||
|
NewGrafanaVersion: plugins.GrafanaLatestVersion,
|
||||||
|
NewGrafanaVersionExists: plugins.GrafanaHasUpdate,
|
||||||
}
|
}
|
||||||
|
|
||||||
if setting.DisableGravatar {
|
if setting.DisableGravatar {
|
||||||
|
@ -35,15 +35,6 @@ function (angular, coreModule, config) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// build info view model
|
|
||||||
$scope.buildInfo = {
|
|
||||||
version: config.buildInfo.version,
|
|
||||||
commit: config.buildInfo.commit,
|
|
||||||
buildstamp: new Date(config.buildInfo.buildstamp * 1000),
|
|
||||||
latestVersion: config.buildInfo.latestVersion,
|
|
||||||
hasUpdate: config.buildInfo.hasUpdate,
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.submit = function() {
|
$scope.submit = function() {
|
||||||
if ($scope.loginMode) {
|
if ($scope.loginMode) {
|
||||||
$scope.login();
|
$scope.login();
|
||||||
|
@ -73,14 +73,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" style="margin-top: 50px">
|
|
||||||
<div class="version-footer text-center small">
|
|
||||||
Grafana version: {{buildInfo.version}}, commit: {{buildInfo.commit}},
|
|
||||||
build date: {{buildInfo.buildstamp | date: 'yyyy-MM-dd HH:mm:ss' }}
|
|
||||||
</div>
|
|
||||||
<div class="version-footer text-center small" ng-show="buildInfo.hasUpdate">
|
|
||||||
<a class="external-link" target="_blank" href="http://grafana.org/download">New Grafana Version Available ({{buildInfo.latestVersion}})</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -67,7 +67,6 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -7,3 +7,6 @@
|
|||||||
a { color: darken($gray-1, 25%); }
|
a { color: darken($gray-1, 25%); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
padding: 5rem 0 1rem 0;
|
||||||
|
}
|
||||||
|
@ -39,6 +39,36 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-view class="main-view"></div>
|
<div ng-view class="main-view"></div>
|
||||||
|
|
||||||
|
<footer class="footer">
|
||||||
|
<div class="row text-center">
|
||||||
|
<a href="http://docs.grafana.org" target="_blank">
|
||||||
|
<i class="fa fa-question-circle"></i>
|
||||||
|
Docs
|
||||||
|
</a>
|
||||||
|
<span class="muted">|</a>
|
||||||
|
<a href="https://grafana.net/support/plans" target="_blank">
|
||||||
|
<i class="fa fa-question-circle"></i>
|
||||||
|
Support Plans
|
||||||
|
</a>
|
||||||
|
<span class="muted">|</a>
|
||||||
|
<a href="https://grafana.org/community" target="_blank">
|
||||||
|
<i class="fa fa-comments"></i>
|
||||||
|
Community
|
||||||
|
</a>
|
||||||
|
<span class="muted">|</a>
|
||||||
|
<a href="http://docs.grafana.org" target="_blank">
|
||||||
|
<a href="http://grafana.org" target="_blank">Grafana</a>
|
||||||
|
<span class="muted">v[[.BuildVersion]] (commit: [[.BuildCommit]])</span>
|
||||||
|
<span class="muted">|</a>
|
||||||
|
[[if .NewGrafanaVersionExists]]
|
||||||
|
<a href="http://grafana.org/download" target="_blank" bs-tooltip="'[[.NewGrafanaVersion]]'">
|
||||||
|
<i class="fa fa-question-circle-o"></i>
|
||||||
|
New version available!
|
||||||
|
</a>
|
||||||
|
[[end]]
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
</grafana-app>
|
</grafana-app>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user