mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Get rid of click-to-change-title in dashboard. Make searching better. Closes #48
This commit is contained in:
parent
571e5af0ad
commit
b469f140e2
4 changed files with 7 additions and 11 deletions
|
@ -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">
|
||||
|
|
|
@ -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: {}};
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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}">
|
||||
|
|
|
@ -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 = {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue