Commit 9ac1f6b2 by Torkel Ödegaard

Merge remote-tracking branch 'origin/move_stuff' into pro

parents dac49542 5846c710
...@@ -526,7 +526,7 @@ function($, _, moment) { ...@@ -526,7 +526,7 @@ function($, _, moment) {
}; };
default: default:
return function(val, axis) { return function(val, axis) {
return kbn.noneFormat(val, axis ? axis.tickDecimals : decimals); return kbn.noneFormat(val, axis ? axis.tickDecimals : null);
}; };
} }
}; };
......
define([ define([
'./grafanaCtrl', './grafanaCtrl',
'./dash', './dashboardCtrl',
'./dashLoader', './dashboardNavCtrl',
'./row', './row',
'./submenuCtrl', './submenuCtrl',
'./pulldown', './pulldown',
......
...@@ -10,7 +10,7 @@ function (angular, $, config, _) { ...@@ -10,7 +10,7 @@ function (angular, $, config, _) {
var module = angular.module('grafana.controllers'); var module = angular.module('grafana.controllers');
module.controller('DashCtrl', function( module.controller('DashboardCtrl', function(
$scope, $rootScope, dashboardKeybindings, $scope, $rootScope, dashboardKeybindings,
filterSrv, dashboardSrv, dashboardViewStateSrv, filterSrv, dashboardSrv, dashboardViewStateSrv,
panelMoveSrv, timer) { panelMoveSrv, timer) {
......
...@@ -10,7 +10,7 @@ function (angular, _, moment, config) { ...@@ -10,7 +10,7 @@ function (angular, _, moment, config) {
var module = angular.module('grafana.controllers'); var module = angular.module('grafana.controllers');
module.controller('dashLoader', function($scope, $rootScope, $http, alertSrv, $location, playlistSrv, datasourceSrv) { module.controller('DashboardNavCtrl', function($scope, $rootScope, alertSrv, $location, playlistSrv, datasourceSrv) {
$scope.init = function() { $scope.init = function() {
$scope.db = datasourceSrv.getGrafanaDB(); $scope.db = datasourceSrv.getGrafanaDB();
......
<div ng-controller="DashCtrl" body-class ng-class="{'dashboard-fullscreen': dashboardViewState.fullscreen}"> <div ng-controller="DashboardCtrl" body-class ng-class="{'dashboard-fullscreen': dashboardViewState.fullscreen}">
<div class="navbar navbar-static-top"> <div ng-include="'app/partials/dashboard_topnav.html'">
<div class="navbar-inner"> </div>
<div class="container-fluid">
<span class="brand"><img src="img/small.png" bs-tooltip="'Grafana'" data-placement="bottom"> {{dashboard.title}}</span>
<ul class="nav pull-right" ng-controller='dashLoader' ng-init="init()" ng-include="'app/partials/dashLoader.html'">
</ul>
</div>
</div>
</div>
<div class="submenu-controls"> <div class="submenu-controls">
<div class="submenu-panel" ng-controller="SubmenuCtrl" ng-repeat="pulldown in dashboard.pulldowns | filter:{ enable: true }"> <div class="submenu-panel" ng-controller="SubmenuCtrl" ng-repeat="pulldown in dashboard.pulldowns | filter:{ enable: true }">
<div class="submenu-panel-title"> <div class="submenu-panel-title">
<span class="small"><strong>{{pulldown.type}}:</strong></span> <span class="small"><strong>{{pulldown.type}}:</strong></span>
......
<style> <div class="navbar navbar-static-top">
.noarrow>a:after { <div class="navbar-inner">
display: none !important; <div class="container-fluid">
} <span class="brand"><img src="img/small.png" bs-tooltip="'Grafana'" data-placement="bottom"> {{dashboard.title}}</span>
</style> <ul class="nav pull-right" ng-controller='DashboardNavCtrl' ng-init="init()">
<li ng-show="dashboardViewState.fullscreen"> <li ng-show="dashboardViewState.fullscreen">
<a ng-click="exitFullscreen()"> <a ng-click="exitFullscreen()">
Back to dashboard Back to dashboard
</a> </a>
</li> </li>
<li class="grafana-menu-zoom-out"> <li class="grafana-menu-zoom-out">
<a class='small' ng-click='zoom(2)'> <a class='small' ng-click='zoom(2)'>
Zoom Out Zoom Out
</a> </a>
</li> </li>
<li ng-repeat="pulldown in dashboard.nav" ng-controller="PulldownCtrl" ng-show="pulldown.enable"> <li ng-repeat="pulldown in dashboard.nav" ng-controller="PulldownCtrl" ng-show="pulldown.enable">
<grafana-simple-panel type="pulldown.type" ng-cloak> <grafana-simple-panel type="pulldown.type" ng-cloak>
</grafana-simple-panel> </grafana-simple-panel>
</li> </li>
<li class="dropdown grafana-menu-save"> <li class="dropdown grafana-menu-save">
<a href="#" bs-tooltip="'Save'" data-placement="bottom" class="dropdown-toggle" data-toggle="dropdown" ng-click="openSaveDropdown()"> <a href="#" bs-tooltip="'Save'" data-placement="bottom" class="dropdown-toggle" data-toggle="dropdown" ng-click="openSaveDropdown()">
<i class='icon-save'></i> <i class='icon-save'></i>
</a> </a>
<ul class="save-dashboard-dropdown dropdown-menu" ng-if="saveDropdownOpened"> <ul class="save-dashboard-dropdown dropdown-menu" ng-if="saveDropdownOpened">
<li> <li>
<form class="input-prepend nomargin save-dashboard-dropdown-save-form"> <form class="input-prepend nomargin save-dashboard-dropdown-save-form">
<input class='input-medium' ng-model="dashboard.title" type="text" /> <input class='input-medium' ng-model="dashboard.title" type="text" />
<button class="btn" ng-click="saveDashboard()"><i class="icon-save"></i></button> <button class="btn" ng-click="saveDashboard()"><i class="icon-save"></i></button>
</form> </form>
</li> </li>
<li> <li>
<a class="link" ng-click="set_default()">Save as Home</a> <a class="link" ng-click="set_default()">Save as Home</a>
</li> </li>
<li> <li>
<a class="link" ng-click="purge_default()">Reset Home</a> <a class="link" ng-click="purge_default()">Reset Home</a>
</li> </li>
<li ng-show="!isFavorite"> <li ng-show="!isFavorite">
<a class="link" ng-click="markAsFavorite()">Mark as favorite</a> <a class="link" ng-click="markAsFavorite()">Mark as favorite</a>
</li> </li>
<li ng-show="isFavorite"> <li ng-show="isFavorite">
<a class="link" ng-click="removeAsFavorite()">Remove as favorite</a> <a class="link" ng-click="removeAsFavorite()">Remove as favorite</a>
</li> </li>
<li> <li>
<a class="link" ng-click="exportDashboard()">Export dashboard</a> <a class="link" ng-click="exportDashboard()">Export dashboard</a>
</li> </li>
<li ng-show="db.saveTemp"> <li ng-show="db.saveTemp">
<a bs-tooltip="'Share'" data-placement="bottom" ng-click="saveForSharing()" config-modal="app/partials/dashLoaderShare.html"> <a bs-tooltip="'Share'" data-placement="bottom" ng-click="saveForSharing()" config-modal="app/partials/dashLoaderShare.html">
Share temp copy Share temp copy
</a> </a>
</li> </li>
</ul> </ul>
</li> </li>
<li class="dropdown grafana-menu-load" ng-controller="SearchCtrl" ng-init="init()" ng-include="'app/partials/search.html'"> <li class="dropdown grafana-menu-load" ng-controller="SearchCtrl" ng-init="init()" ng-include="'app/partials/search.html'">
</li> </li>
<li class="grafana-menu-home"><a bs-tooltip="'Goto saved default'" data-placement="bottom" href='#/'><i class='icon-home'></i></a></li> <li class="grafana-menu-home"><a bs-tooltip="'Goto saved default'" data-placement="bottom" href='#/'><i class='icon-home'></i></a></li>
<li class="grafana-menu-edit" ng-show="dashboard.editable" bs-tooltip="'Configure dashboard'" data-placement="bottom"><a class="link" config-modal="app/partials/dasheditor.html"><i class='icon-cog pointer'></i></a></li> <li class="grafana-menu-edit" ng-show="dashboard.editable" bs-tooltip="'Configure dashboard'" data-placement="bottom"><a class="link" config-modal="app/partials/dasheditor.html"><i class='icon-cog pointer'></i></a></li>
<li class="grafana-menu-stop-playlist hide">
<a class='small' ng-click='stopPlaylist(2)'>
Stop playlist
</a>
</li>
</ul>
</div>
</div>
</div>
<li class="grafana-menu-stop-playlist hide">
<a class='small' ng-click='stopPlaylist(2)'>
Stop playlist
</a>
</li>
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