mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 00:55:47 -06:00
style changing now works again
This commit is contained in:
parent
f180707b6f
commit
186f753aec
@ -45,6 +45,8 @@ function (angular, $, config, _) {
|
||||
$rootScope.fullscreen = false;
|
||||
|
||||
$scope.dashboard = dashboard.create(dashboardData);
|
||||
$scope.grafana.style = $scope.dashboard.style;
|
||||
|
||||
$scope.filter = filterSrv;
|
||||
$scope.filter.init($scope.dashboard);
|
||||
|
||||
|
@ -17,7 +17,7 @@ function (angular, _, moment) {
|
||||
$scope.elasticsearch = $scope.elasticsearch || {};
|
||||
|
||||
$scope.onAppEvent('save-dashboard', function() {
|
||||
$scope.elasticsearch_save('dashboard', false);
|
||||
$scope.saveDashboard();
|
||||
});
|
||||
|
||||
$scope.onAppEvent('zoom-out', function() {
|
||||
@ -142,6 +142,10 @@ function (angular, _, moment) {
|
||||
});
|
||||
};
|
||||
|
||||
$scope.styleUpdated = function() {
|
||||
$scope.grafana.style = $scope.dashboard.style;
|
||||
};
|
||||
|
||||
$scope.openSaveDropdown = function() {
|
||||
$scope.isFavorite = playlistSrv.isCurrentFavorite($scope.dashboard);
|
||||
};
|
||||
|
@ -15,6 +15,9 @@ function (angular, config, _) {
|
||||
$scope.init = function() {
|
||||
$scope._ = _;
|
||||
$scope.dashAlerts = alertSrv;
|
||||
$scope.grafana = {
|
||||
style: 'dark'
|
||||
};
|
||||
};
|
||||
|
||||
$rootScope.onAppEvent = function(name, callback) {
|
||||
|
@ -15,7 +15,7 @@
|
||||
<label class="small">Title</label><input type="text" class="input-large" ng-model='dashboard.title'></input>
|
||||
</div>
|
||||
<div class="editor-option">
|
||||
<label class="small">Style</label><select class="input-small" ng-model="dashboard.style" ng-options="f for f in ['dark','light']"></select>
|
||||
<label class="small">Theme</label><select class="input-small" ng-model="dashboard.style" ng-options="f for f in ['dark','light']" ng-change="styleUpdated()"></select>
|
||||
</div>
|
||||
<div class="editor-option">
|
||||
<label class="small">Time correction</label>
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
<body ng-cloak ng-controller="GrafanaCtrl">
|
||||
|
||||
<link rel="stylesheet" href="css/bootstrap.light.min.css" ng-if="dashboard.style === 'light'">
|
||||
<link rel="stylesheet" href="css/bootstrap.light.min.css" ng-if="grafana.style === 'light'">
|
||||
<link rel="stylesheet" href="css/bootstrap-responsive.min.css">
|
||||
<link rel="stylesheet" href="css/font-awesome.min.css">
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user