Skip to content

Commit

Permalink
Get rid of click-to-change-title in dashboard. Make searching better. C…
Browse files Browse the repository at this point in the history
…loses #48
  • Loading branch information
Rashid Khan committed Apr 15, 2014
1 parent 571e5af commit b469f14
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
7 changes: 1 addition & 6 deletions src/kibana/apps/dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@
<nav class="navbar navbar-default navbar-static-top">
<div class="container-fluid">
<div class="navbar-header">
<span class="navbar-brand pull-left" ng-click="editingTitle = true" ng-hide="editingTitle">
<span class="navbar-brand pull-left">
{{dash.title}}
</span>
<span class="pull-left" ng-show="editingTitle">
<form class="navbar-form" ng-submit="editingTitle = false">
<input type="text" ng-model="dash.title" class="form-control"/>
</form>
</span>
</div>

<ul class="nav navbar-nav pull-left">
Expand Down
5 changes: 2 additions & 3 deletions src/kibana/apps/dashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ define(function (require) {
if (query === void 0) return;

if (_.isString(query) && query.length > 0) {
query = {wildcard: {title: query + '*'}};
query = {wildcard: {title: '*' + query + '*'}};
} else {
query = {match_all: {}};
}
Expand Down Expand Up @@ -125,13 +125,12 @@ define(function (require) {
.type('dashboard')
.id($scope.dash.title);

// TODO: If a dashboard is deleted from kibana4-int, and we try to save another dashboard with
// the same name later, it fails due to a version conflict.
doc.doIndex({
title: dash.title,
panelsJSON: JSON.stringify($scope.gridControl.serializeGrid())
})
.then(function () {
notify.info('Saved Dashboard as "' + $scope.dash.title + '"');
if ($scope.dash.title !== $routeParams.id) {
$location.url('/dashboard/' + encodeURIComponent($scope.dash.title));
}
Expand Down
2 changes: 1 addition & 1 deletion src/kibana/apps/dashboard/partials/load_dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<label>Filter Dashboards</label>
<input type="text" ng-model="configurable.input.search" class="form-control"/>
</div>
<ul class="nav nav-pills">
<ul class="nav nav-pills container-fluid">
<li
ng-repeat="res in configurable.searchResults | orderBy:'_source.title'"
ng-class="{active: configurable.dashboard.id == res._id}">
Expand Down
4 changes: 3 additions & 1 deletion src/kibana/utils/mixins.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ define(function (require) {
}
return array;
},
flattenWith: function (dot, nestedObj) {
// NOTE: The flatten behavior here works if you don't need to keep a reference to the
// original value
flattenWith: function (dot, nestedObj, keepArrays) {
var key; // original key
var stack = []; // track key stack
var flatObj = {};
Expand Down

0 comments on commit b469f14

Please sign in to comment.