Skip to content

Commit

Permalink
Use inject dependencies in Visualize and Dashboard listing.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Feb 6, 2017
1 parent 438f5c4 commit 794b18c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ import 'ui/pager';
import { DashboardConstants } from '../dashboard_constants';
import _ from 'lodash';

export function DashboardListingController(
$filter,
$scope,
confirmModal,
kbnUrl,
Notifier,
pagerFactory,
Private,
timefilter
) {
export function DashboardListingController($injector, $scope) {
const $filter = $injector.get('$filter');
const confirmModal = $injector.get('confirmModal');
const kbnUrl = $injector.get('kbnUrl');
const Notifier = $injector.get('Notifier');
const pagerFactory = $injector.get('pagerFactory');
const Private = $injector.get('Private');
const timefilter = $injector.get('timefilter');

timefilter.enabled = false;

const limitTo = $filter('limitTo');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ import 'ui/pager_control';
import 'ui/pager';
import _ from 'lodash';

export function VisualizeListingController(
$filter,
$scope,
confirmModal,
kbnUrl,
Notifier,
pagerFactory,
Private,
timefilter
) {
export function VisualizeListingController($injector, $scope) {
const $filter = $injector.get('$filter');
const confirmModal = $injector.get('confirmModal');
const kbnUrl = $injector.get('kbnUrl');
const Notifier = $injector.get('Notifier');
const pagerFactory = $injector.get('pagerFactory');
const Private = $injector.get('Private');
const timefilter = $injector.get('timefilter');

timefilter.enabled = false;

const limitTo = $filter('limitTo');
Expand Down

0 comments on commit 794b18c

Please sign in to comment.