Skip to content

Commit

Permalink
Use a constant for the landing page url
Browse files Browse the repository at this point in the history
  • Loading branch information
stacey-gammon committed Jan 24, 2017
1 parent fd857dc commit fbdaa84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

export const DashboardConstants = {
ADD_VISUALIZATION_TO_DASHBOARD_MODE_PARAM: 'addToDashboard',
NEW_VISUALIZATION_ID_PARAM: 'addVisualization'
NEW_VISUALIZATION_ID_PARAM: 'addVisualization',
LANDING_PAGE_URL: '/dashboard'
};
3 changes: 2 additions & 1 deletion src/core_plugins/kibana/public/dashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ import { savedDashboardRegister } from 'plugins/kibana/dashboard/saved_dashboard

import dashboardListingTemplate from './listing/dashboard_listing.html';
import { DashboardListingController } from './listing/dashboard_listing';
import { DashboardConstants } from './dashboard_constants';

require('ui/saved_objects/saved_object_registry').register(savedDashboardRegister);

uiRoutes
.defaults(/dashboard/, {
requireDefaultIndex: true
})
.when('/dashboard', {
.when(DashboardConstants.LANDING_PAGE_URL, {
template: dashboardListingTemplate,
controller: DashboardListingController,
controllerAs: 'listingController'
Expand Down

0 comments on commit fbdaa84

Please sign in to comment.