Skip to content

Commit

Permalink
Disable timepicker in Visualization listing.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Feb 4, 2017
1 parent a1f737f commit ca4adc3
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- Local nav. -->
<kbn-top-nav name="visualize" no-menu-extensions>
<kbn-top-nav name="visualize">
<!-- Transcluded elements. -->
<div data-transclude-slots>
<!-- Title. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ export function VisualizeListingController(
$scope,
kbnUrl,
Notifier,
Private
Private,
timefilter
) {
timefilter.enabled = false;

// TODO: Extract this into an external service.
const services = Private(SavedObjectRegistryProvider).byLoaderPropertiesName;
const visualizationService = services.visualizations;
Expand Down Expand Up @@ -56,11 +59,11 @@ export function VisualizeListingController(
const selectedIds = selectedItems.map(item => item.id);

visualizationService.delete(selectedIds)
.then(fetchObjects)
.then(() => {
selectedItems = [];
})
.catch(error => notify.error(error));
.then(fetchObjects)
.then(() => {
selectedItems = [];
})
.catch(error => notify.error(error));
};

this.open = function open(item) {
Expand All @@ -69,7 +72,7 @@ export function VisualizeListingController(

this.edit = function edit(item) {
const params = {
// TODO: Get this value from somewhere instead of hardcodign it.
// TODO: Get this value from somewhere instead of hardcoding it.
service: 'savedVisualizations',
id: item.id
};
Expand Down
6 changes: 3 additions & 3 deletions src/core_plugins/kibana/public/visualize/wizard/step_1.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- Local nav. -->
<kbn-top-nav name="visualize" no-menu-extensions>
<kbn-top-nav name="visualize">
<!-- Transcluded elements. -->
<div data-transclude-slots>
<!-- Breadcrumbs. -->
Expand All @@ -26,11 +26,11 @@ <h1 class="kuiTitle">
ng-href="{{ visTypeUrl(type) }}"
>
<div class="wizard-type-heading">
<i
<span
aria-hidden="true"
class="wizard-type-heading-icon fa fa-fw"
ng-class="type.icon"
></i>
></span>
<h4 data-test-subj="visualizeWizardChartTypeTitle" class="wizard-type-heading-text">{{type.title}}</h4>
</div>
<p class="wizard-type-description">{{type.description}}</p>
Expand Down
12 changes: 6 additions & 6 deletions src/core_plugins/kibana/public/visualize/wizard/step_2.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- Local nav. -->
<kbn-top-nav name="visualize" no-menu-extensions>
<kbn-top-nav name="visualize">
<!-- Transcluded elements. -->
<div data-transclude-slots>
<!-- Breadcrumbs. -->
Expand All @@ -24,11 +24,11 @@ <h3 class="wizard-sub-title">From a New Search, Select Index</h3>
<h3 class="wizard-sub-title">Or, From a Saved Search</h3>
<!-- Saved searches -->
<saved-object-finder
title="Saved Searches"
type="searches"
class="wizard-row"
make-url="step2WithSearchUrl"
></saved-object-finder>
title="Saved Searches"
type="searches"
class="wizard-row"
make-url="step2WithSearchUrl"
></saved-object-finder>
</div>
</div>
</div>
3 changes: 1 addition & 2 deletions src/ui/public/kbn_top_nav/kbn_top_nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,8 @@ module.directive('kbnTopNav', function (Private) {
});
});

const extensions = getNavbarExtensions($attrs.name);
let controls = _.get($scope, $attrs.config, []);
const noMenuExtensions = $attrs.hasOwnProperty('noMenuExtensions');
const extensions = noMenuExtensions ? [] : getNavbarExtensions($attrs.name);

if (controls instanceof KbnTopNavController) {
controls.addItems(extensions);
Expand Down
2 changes: 0 additions & 2 deletions test/support/page_objects/visualize_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,6 @@ export default class VisualizePage {
});
}

// this is for starting on the
// bottom half of the "Create a new visualization Step 1" page
openSavedVisualization(vizName) {
return this.clickVisualizationByLinkText(vizName);
}
Expand Down

0 comments on commit ca4adc3

Please sign in to comment.