mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
unify references
This commit is contained in:
parent
f86cd7a93a
commit
b5fd704fa4
4 changed files with 4 additions and 5 deletions
|
@ -20,7 +20,7 @@ define(function (require) {
|
|||
var $body = $(document.body);
|
||||
|
||||
// appState from controller
|
||||
var $state = $scope.$state;
|
||||
var $state = $scope.state;
|
||||
|
||||
var gridster; // defined in init()
|
||||
|
||||
|
@ -47,7 +47,7 @@ define(function (require) {
|
|||
}
|
||||
}).data('gridster');
|
||||
|
||||
$scope.$watchCollection('$state.panels', function (panels) {
|
||||
$scope.$watchCollection('state.panels', function (panels) {
|
||||
var currentPanels = gridster.$widgets.toArray().map(function (el) {
|
||||
return getPanelFor(el);
|
||||
});
|
||||
|
|
|
@ -12,7 +12,7 @@ define(function (require) {
|
|||
requires: '^dashboardGrid',
|
||||
link: function ($scope, $el) {
|
||||
// using $scope inheritance, panels are available in AppState
|
||||
var $state = $scope.$state;
|
||||
var $state = $scope.state;
|
||||
|
||||
// receives panel object from the dashboard grid directive
|
||||
$scope.$watch('visId', function (visId) {
|
||||
|
|
|
@ -56,7 +56,7 @@ define(function (require) {
|
|||
panels: dash.panelsJSON ? JSON.parse(dash.panelsJSON) : []
|
||||
};
|
||||
|
||||
var $state = $scope.$state = new AppState(stateDefaults);
|
||||
var $state = $scope.state = new AppState(stateDefaults);
|
||||
|
||||
$scope.configTemplate = new ConfigTemplate({
|
||||
save: require('text!apps/dashboard/partials/save_dashboard.html'),
|
||||
|
|
|
@ -170,7 +170,6 @@ define(function (require) {
|
|||
writeRow(chartData, { doc_count: resp.hits.total });
|
||||
}
|
||||
|
||||
|
||||
// now that things are well-ordered, and
|
||||
// all related values have been segregated into
|
||||
// their individual charts, we can go through and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue