From 7f925dda72193d016a7b61f536fceab5a4219043 Mon Sep 17 00:00:00 2001 From: spalger Date: Tue, 9 Feb 2016 18:09:21 -0700 Subject: [PATCH 1/2] [Notifier] import the Notifier directly --- src/ui/public/config/_delayed_updater.js | 4 +++- src/ui/public/config/config.js | 8 ++++---- src/ui/public/courier/fetch/_notifier.js | 4 +++- src/ui/public/courier/fetch/request/_error_handler.js | 3 ++- src/ui/public/state_management/state.js | 4 ++-- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/ui/public/config/_delayed_updater.js b/src/ui/public/config/_delayed_updater.js index 959ca0478cfc1..76cdb67e16e16 100644 --- a/src/ui/public/config/_delayed_updater.js +++ b/src/ui/public/config/_delayed_updater.js @@ -1,7 +1,9 @@ import _ from 'lodash'; import angular from 'angular'; import ConfigValsProvider from 'ui/config/_vals'; -export default function DelayedUpdaterFactory(Private, $rootScope, Promise, Notifier) { +import Notifier from 'ui/notify/notifier'; + +export default function DelayedUpdaterFactory(Private, $rootScope, Promise) { var notify = new Notifier(); var vals = Private(ConfigValsProvider); diff --git a/src/ui/public/config/config.js b/src/ui/public/config/config.js index 2c3ed2778b9e7..486e5c4929b20 100644 --- a/src/ui/public/config/config.js +++ b/src/ui/public/config/config.js @@ -6,16 +6,16 @@ import ConfigValsProvider from 'ui/config/_vals'; import CourierDataSourceDocSourceProvider from 'ui/courier/data_source/doc_source'; import uiRoutes from 'ui/routes'; import uiModules from 'ui/modules'; -var module = uiModules.get('kibana/config', [ - 'kibana/notify' -]); +import Notifier from 'ui/notify/notifier'; + +var module = uiModules.get('kibana/config'); uiRoutes.addSetupWork(function (config) { return config.init(); }); // service for delivering config variables to everywhere else -module.service('config', function (Private, Notifier, kbnVersion, kbnIndex, $rootScope, buildNum) { +module.service('config', function (Private, kbnVersion, kbnIndex, $rootScope, buildNum) { var config = this; var defaults = Private(ConfigDefaultsProvider); diff --git a/src/ui/public/courier/fetch/_notifier.js b/src/ui/public/courier/fetch/_notifier.js index 1c587080c7fa9..e839d29195125 100644 --- a/src/ui/public/courier/fetch/_notifier.js +++ b/src/ui/public/courier/fetch/_notifier.js @@ -1,4 +1,6 @@ -export default function CourierFetchNotifier(Notifier) { +import Notifier from 'ui/notify/notifier'; + +export default function CourierFetchNotifier() { return new Notifier({ location: 'Courier Fetch' }); diff --git a/src/ui/public/courier/fetch/request/_error_handler.js b/src/ui/public/courier/fetch/request/_error_handler.js index 95fff4d3b51bf..69aede3ee21f4 100644 --- a/src/ui/public/courier/fetch/request/_error_handler.js +++ b/src/ui/public/courier/fetch/request/_error_handler.js @@ -1,6 +1,7 @@ import CourierErrorHandlersProvider from 'ui/courier/_error_handlers'; +import Notifier from 'ui/notify/notifier'; -export default function RequestErrorHandlerFactory(Private, Notifier) { +export default function RequestErrorHandlerFactory(Private) { var errHandlers = Private(CourierErrorHandlersProvider); var notify = new Notifier({ diff --git a/src/ui/public/state_management/state.js b/src/ui/public/state_management/state.js index 8c573a9d72812..dfc0f8c62b7ec 100644 --- a/src/ui/public/state_management/state.js +++ b/src/ui/public/state_management/state.js @@ -3,9 +3,10 @@ import rison from 'ui/utils/rison'; import applyDiff from 'ui/utils/diff_object'; import qs from 'ui/utils/query_string'; import EventsProvider from 'ui/events'; +import Notifier from 'ui/notify/notifier'; -export default function StateProvider(Notifier, Private, $rootScope, $location) { +export default function StateProvider(Private, $rootScope, $location) { var Events = Private(EventsProvider); _.class(State).inherits(Events); @@ -147,4 +148,3 @@ export default function StateProvider(Notifier, Private, $rootScope, $location) return State; }; - From f5bdc1b73c6936dc1aa4fba1b8562d43d9f6fe09 Mon Sep 17 00:00:00 2001 From: spalger Date: Tue, 9 Feb 2016 18:10:04 -0700 Subject: [PATCH 2/2] [angular/di] include missing imports for angular dependencies --- src/ui/public/courier/data_source/doc_source.js | 2 ++ src/ui/public/timefilter/timefilter.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ui/public/courier/data_source/doc_source.js b/src/ui/public/courier/data_source/doc_source.js index db9ce8fd34028..6d93ac0c5b9c2 100644 --- a/src/ui/public/courier/data_source/doc_source.js +++ b/src/ui/public/courier/data_source/doc_source.js @@ -3,6 +3,8 @@ import CourierDataSourceDocSendToEsProvider from 'ui/courier/data_source/_doc_se import CourierDataSourceAbstractProvider from 'ui/courier/data_source/_abstract'; import CourierFetchRequestDocProvider from 'ui/courier/fetch/request/doc'; import CourierFetchStrategyDocProvider from 'ui/courier/fetch/strategy/doc'; +import 'ui/es'; +import 'ui/storage'; export default function DocSourceFactory(Private, Promise, es, sessionStorage) { var sendToEs = Private(CourierDataSourceDocSendToEsProvider); diff --git a/src/ui/public/timefilter/timefilter.js b/src/ui/public/timefilter/timefilter.js index 34b33de18b0c4..02612f5ae7712 100644 --- a/src/ui/public/timefilter/timefilter.js +++ b/src/ui/public/timefilter/timefilter.js @@ -3,12 +3,14 @@ import angular from 'angular'; import moment from 'moment'; import dateMath from 'ui/utils/dateMath'; import 'ui/state_management/global_state'; +import 'ui/config'; import EventsProvider from 'ui/events'; import UtilsDiffTimePickerValsProvider from 'ui/utils/diff_time_picker_vals'; import TimefilterLibDiffTimeProvider from 'ui/timefilter/lib/diff_time'; import TimefilterLibDiffIntervalProvider from 'ui/timefilter/lib/diff_interval'; import uiRoutes from 'ui/routes'; import uiModules from 'ui/modules'; + uiRoutes .addSetupWork(function (timefilter) { return timefilter.init(); @@ -111,4 +113,3 @@ uiModules return new Timefilter(); }); -