Skip to content

Commit

Permalink
Move visualize/landing route to live at visualize/ instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Feb 4, 2017
1 parent 8ca2faf commit e674f6c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 28 deletions.
7 changes: 5 additions & 2 deletions src/core_plugins/kibana/public/visualize/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'plugins/kibana/visualize/styles/main.less';
import 'plugins/kibana/visualize/editor/editor';
import 'plugins/kibana/visualize/landing/landing';
import 'plugins/kibana/visualize/wizard/wizard';
import 'plugins/kibana/visualize/editor/add_bucket_agg';
import 'plugins/kibana/visualize/editor/agg';
Expand All @@ -19,13 +18,17 @@ import 'plugins/kibana/visualize/saved_visualizations/_saved_vis';
import 'plugins/kibana/visualize/saved_visualizations/saved_visualizations';
import uiRoutes from 'ui/routes';

import visualizeListingTemplate from './listing/visualize_listing.html';
import { VisualizeListingController } from './listing/visualize_listing';

uiRoutes
.defaults(/visualize/, {
requireDefaultIndex: true
})
.when('/visualize', {
redirectTo: '/visualize/landing'
template: visualizeListingTemplate,
controller: VisualizeListingController,
controllerAs: 'listingController',
});

// preloading
Expand Down
11 changes: 0 additions & 11 deletions src/core_plugins/kibana/public/visualize/landing/landing.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
type="text"
placeholder="Search..."
aria-label="Filter"
ng-model="landingController.filter"
ng-model="listingController.filter"
>
</div>
</div>
Expand All @@ -34,10 +34,10 @@
<!-- Bulk delete button -->
<button
class="kuiButton kuiButton--danger kuiButton--iconText"
confirm-click="landingController.deleteSelectedItems()"
confirm-click="listingController.deleteSelectedItems()"
confirmation="Are you sure you want to delete the selected visualizations? This action is irreversible!"
aria-label="Delete selected objects"
ng-hide="landingController.getSelectedItemsCount() === 0"
ng-hide="listingController.getSelectedItemsCount() === 0"
>
<span aria-hidden="true" class="kuiButton__icon kuiIcon fa-trash"></span>
Delete
Expand All @@ -48,7 +48,7 @@
class="kuiButton kuiButton--primary kuiButton--iconText"
href="#/visualize/step/1"
aria-label="Create new visualization"
ng-hide="landingController.getSelectedItemsCount() > 0"
ng-hide="listingController.getSelectedItemsCount() > 0"
>
<span aria-hidden="true" class="kuiButton__icon kuiIcon fa-plus"></span>
Create visualization
Expand All @@ -61,22 +61,22 @@
</div>

<!-- NoResults -->
<div class="kuiPanel kuiPanel--centered" ng-if="!landingController.items.length">
<div class="kuiPanel kuiPanel--centered" ng-if="!listingController.items.length">
<div class="kuiNoResults">
No visualizations matched your search.
</div>
</div>

<!-- Table -->
<table class="kuiTable" ng-if="landingController.items.length">
<table class="kuiTable" ng-if="listingController.items.length">
<thead>
<tr>
<th class="kuiTableHeaderCell kuiTableHeaderCell--checkBox">
<input
type="checkbox"
class="kuiCheckBox"
ng-checked="landingController.areAllItemsChecked()"
ng-click="landingController.toggleAll()"
ng-checked="listingController.areAllItemsChecked()"
ng-click="listingController.toggleAll()"
>
</th>

Expand All @@ -95,15 +95,15 @@

<tbody>
<tr
ng-repeat="item in landingController.items track by item.id | orderBy:'title'"
ng-repeat="item in listingController.items track by item.id | orderBy:'title'"
class="kuiTableRow"
>
<td class="kuiTableRowCell kuiTableRowCell--checkBox">
<input
type="checkbox"
class="kuiCheckBox"
ng-click="landingController.toggleItem(item)"
ng-checked="landingController.isItemChecked(item)"
ng-click="listingController.toggleItem(item)"
ng-checked="listingController.isItemChecked(item)"
>
</td>

Expand All @@ -119,7 +119,7 @@

<button
class="kuiMicroButton kuiTableRowHoverReveal"
ng-click="landingController.edit(item)"
ng-click="listingController.edit(item)"
aria-label="Edit"
tooltip="Edit object"
>
Expand All @@ -144,8 +144,8 @@
<!-- ToolBarFooter -->
<div class="kuiToolBarFooter">
<div class="kuiToolBarFooterSection">
<div class="kuiToolBarText" ng-hide="landingController.getSelectedItemsCount() === 0">
{{ landingController.getSelectedItemsCount() }} selected
<div class="kuiToolBarText" ng-hide="listingController.getSelectedItemsCount() === 0">
{{ listingController.getSelectedItemsCount() }} selected
</div>
</div>
<div class="kuiToolBarFooterSection">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import SavedObjectRegistryProvider from 'ui/saved_objects/saved_object_registry';

export function VisualizeLandingController(
export function VisualizeListingController(
$scope,
kbnUrl,
Notifier,
Expand Down

0 comments on commit e674f6c

Please sign in to comment.