diff --git a/common/css/main.css b/common/css/main.css index d2d0e3c8ac9..e781c12b0b3 100644 --- a/common/css/main.css +++ b/common/css/main.css @@ -27,6 +27,10 @@ display: none; } +.pointer:hover { + color: #0088CC; +} + .panel:hover i.editlink { display: block; opacity: 0.3; @@ -36,18 +40,19 @@ opacity: 1; } +/* .row-header i.editlink { - display: none; + opacity: 0; } .row-header:hover i.editlink { - display: inline-block; opacity: 0.3; } .row-header i.editlink:hover { opacity: 1; } +*/ .pointer { cursor: pointer; diff --git a/index.html b/index.html index 81f246d0635..a58f5fdc115 100644 --- a/index.html +++ b/index.html @@ -34,6 +34,7 @@
Kibana Preview {{dashboards.title}} +
diff --git a/js/controllers.js b/js/controllers.js index 81fab71812c..cc473e2825d 100644 --- a/js/controllers.js +++ b/js/controllers.js @@ -5,22 +5,25 @@ angular.module('kibana.controllers', []) .controller('DashCtrl', function($scope, $rootScope, ejsResource, timer) { - $scope.config = config; - $scope._ = _; + $scope.init = function() { + $scope.config = config; + $scope._ = _; + $scope.reset_row(); - // The global dashboards object should be moved to an $http request for json - if (Modernizr.localstorage && - !(_.isUndefined(localStorage['dashboard'])) && - localStorage['dashboard'] !== '' - ) { - $scope.dashboards = JSON.parse(localStorage['dashboard']); - } else { - $scope.dashboards = dashboards; + // The global dashboards object should be moved to an $http request for json + if (Modernizr.localstorage && + !(_.isUndefined(localStorage['dashboard'])) && + localStorage['dashboard'] !== '' + ) { + $scope.dashboards = JSON.parse(localStorage['dashboard']); + } else { + $scope.dashboards = dashboards; + } + + var ejs = $scope.ejs = ejsResource(config.elasticsearch); } - var ejs = $scope.ejs = ejsResource(config.elasticsearch); - $scope.export = function() { var blob = new Blob([angular.toJson($scope.dashboards)], {type: "application/json;charset=utf-8"}); saveAs(blob, $scope.dashboards.title+"-"+new Date().getTime()); @@ -44,9 +47,34 @@ angular.module('kibana.controllers', []) } } + $scope.add_row = function(dashboards,row) { + $scope.dashboards.rows.push(row); + } + + $scope.reset_row = function() { + $scope.row = { + title: '', + height: '150px', + editable: true, + }; + }; + + $scope.init(); + + }) .controller('RowCtrl', function($scope, $rootScope, $timeout, ejsResource, timer) { + var _d = { + title: "Row", + height: "150px", + collapse: false, + editable: true, + panels: [], + } + _.defaults($scope.row,_d) + + $scope.init = function(){ $scope.reset_panel(); } diff --git a/panels/sort/module.html b/panels/sort/module.html index 752a9cf0216..0fdc9ff5520 100644 --- a/panels/sort/module.html +++ b/panels/sort/module.html @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/partials/dashboard.html b/partials/dashboard.html index d5f3c8ccb4a..06ae483d3ca 100644 --- a/partials/dashboard.html +++ b/partials/dashboard.html @@ -5,9 +5,8 @@
- - {{row.title}} - + + {{row.title}}
diff --git a/partials/dasheditor.html b/partials/dasheditor.html new file mode 100644 index 00000000000..5ab04a7344b --- /dev/null +++ b/partials/dasheditor.html @@ -0,0 +1,53 @@ + + +
+ \ No newline at end of file diff --git a/partials/roweditor.html b/partials/roweditor.html index 97666f85e54..ceed6fa2252 100644 --- a/partials/roweditor.html +++ b/partials/roweditor.html @@ -12,7 +12,7 @@
- +
@@ -28,9 +28,9 @@ {{panel.title}} {{panel.type}} - - - + + +