From 1989d772759e64383ddc10fa3996a834eeef906f Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Thu, 27 Feb 2014 16:42:49 -0700 Subject: [PATCH 1/2] Added config directive --- src/kibana/apps/dashboard/index.html | 8 +- src/kibana/apps/dashboard/index.js | 19 + .../dashboard/partials/loadDashboard.html | 5 + .../dashboard/partials/saveDashboard.html | 5 + src/kibana/apps/dashboard/styles/main.css | 5894 +++++++++++++++++ src/kibana/apps/dashboard/styles/main.less | 9 +- src/kibana/directives/config.js | 35 + src/kibana/partials/navConfig.html | 6 + 8 files changed, 5976 insertions(+), 5 deletions(-) create mode 100644 src/kibana/apps/dashboard/partials/loadDashboard.html create mode 100644 src/kibana/apps/dashboard/partials/saveDashboard.html create mode 100644 src/kibana/directives/config.js create mode 100644 src/kibana/partials/navConfig.html diff --git a/src/kibana/apps/dashboard/index.html b/src/kibana/apps/dashboard/index.html index 23252f1ba1d32..4e4e49e3a9b64 100644 --- a/src/kibana/apps/dashboard/index.html +++ b/src/kibana/apps/dashboard/index.html @@ -4,13 +4,13 @@ {{dashboard.title}} - - +
    diff --git a/src/kibana/apps/dashboard/index.js b/src/kibana/apps/dashboard/index.js index ef2a7b9f8a222..743064c388161 100644 --- a/src/kibana/apps/dashboard/index.js +++ b/src/kibana/apps/dashboard/index.js @@ -11,10 +11,12 @@ define(function (require) { require('gridster'); - var app = angular.module('app/dashboard', []); + var app = angular.module('app/dashboard'); app.controller('dashboard', function ($scope, courier) { + $scope.$broadcast('application.load'); + // Passed in the grid attr to the directive so we can access the directive's function from // the controller and view $scope.gridControl = {foo: true}; @@ -24,6 +26,9 @@ define(function (require) { $scope.configClose = function () { console.log('SAVE close'); }; + $scope.configSubmit = function () { + $scope.save($scope.dashboard.title); + }; }; $scope.openLoad = function () { @@ -127,7 +132,7 @@ define(function (require) { }; $scope.configurable = { - dashboard: $scope.dashboard + dashboard: $scope.dashboard, }; diff --git a/src/kibana/partials/navConfig.html b/src/kibana/partials/navConfig.html index b48712bf19af8..b1c28ca55d18c 100644 --- a/src/kibana/partials/navConfig.html +++ b/src/kibana/partials/navConfig.html @@ -1,6 +1,6 @@
    -
    +
    \ No newline at end of file