Skip to content

Commit

Permalink
Merge branch 'master' into feature/brush
Browse files Browse the repository at this point in the history
  • Loading branch information
stormpython committed Sep 26, 2014
2 parents 99f3cfa + 81bb771 commit 6d7d919
Show file tree
Hide file tree
Showing 45 changed files with 483 additions and 250 deletions.
2 changes: 1 addition & 1 deletion .esvmrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"defaults": {
"branch": "1.x",
"plugins": ["elasticsearch/marvel/latest"]
"plugins": ["elasticsearch/marvel/latest", "mobz/elasticsearch-head"]
}
}
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,4 @@ notifications:
format: html
on_success: change
template:
- ! '%{repository_slug}/%{branch} by %{author}: %{commit_message} (<a href="%{build_url}">open</a>)'
env:
global:
secure: AX9xidE0quyS07ZfOcecxEGjlNDT9YlM+fvtQHqOaODBII2jg5rgz0SyyxmTPSG68aqUNk8ML9slbRE4h0iPqNkB6fbDE2Dc6oTrRE7XFGDBjw66OHV2ZbsobdORf4UtWO06JBgLUEU2pzRYphe/B14dyA+ZO6p+bAgBmcdLd8k=
- ! '%{repository_slug}/%{branch} by %{author}: %{commit_message} (<a href="%{build_url}">open</a>)'
2 changes: 2 additions & 0 deletions TODOS.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,8 @@
- refactor this code to simplify and possibly merge with data converter code below
- **[src/kibana/components/vislib/lib/data.js](https://github.com/elasticsearch/kibana4/blob/master/src/kibana/components/vislib/lib/data.js)**
- need to make this more generic
- **[src/kibana/components/vislib/lib/x_axis.js](https://github.com/elasticsearch/kibana4/blob/master/src/kibana/components/vislib/lib/x_axis.js)**
- need to add mouseover to show tooltip on truncated labels
- **[src/kibana/components/vislib/vis.js](https://github.com/elasticsearch/kibana4/blob/master/src/kibana/components/vislib/vis.js)**
- need to come up with a solution for resizing when no data is available
- **[src/kibana/components/vislib/visualizations/column_chart.js](https://github.com/elasticsearch/kibana4/blob/master/src/kibana/components/vislib/visualizations/column_chart.js)**
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"elasticsearch": "*",
"Faker": "~1.1.0",
"FileSaver": "*",
"font-awesome": "~4.0.3",
"font-awesome": "~4.2.0",
"gridster": "~0.5.0",
"inflection": "~1.3.5",
"jquery": "~2.1.0",
Expand Down
20 changes: 15 additions & 5 deletions src/kibana/apps/dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,21 @@
</form>

<div class="button-group">
<button ng-click="newDashboard()"><i class="fa fa-file-o"></i></button>
<button ng-click="openAdd()"><i class="fa fa-plus"></i></button>
<button ng-click="openSave()"><i class="fa fa-save"></i></button>
<button ng-click="openLoad()"><i class="fa fa-folder-open"></i></button>
<button ng-click="openShare()"><i class="fa fa-code"></i></button>
<kbn-tooltip text="New Dashboard" placement="bottom" append-to-body="1">
<button ng-click="newDashboard()"><i class="fa fa-file-new-o"></i></button>
</kbn-tooltip>
<kbn-tooltip text="Save Dashboard" placement="bottom" append-to-body="1">
<button ng-click="openSave()"><i class="fa fa-save"></i></button>
</kbn-tooltip>
<kbn-tooltip text="Load Saved Dashboard" placement="bottom" append-to-body="1">
<button ng-click="openLoad()"><i class="fa fa-folder-open-o"></i></button>
</kbn-tooltip>
<kbn-tooltip text="Share" placement="bottom" append-to-body="1">
<button ng-click="openShare()"><i class="fa fa-external-link"></i></button>
</kbn-tooltip>
<kbn-tooltip text="Add Visualization" placement="bottom" append-to-body="1">
<button ng-click="openAdd()"><i class="fa fa-plus-circle"></i></button>
</kbn-tooltip>
</div>
</navbar>
</nav>
Expand Down
3 changes: 1 addition & 2 deletions src/kibana/apps/dashboard/styles/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ dashboard-grid {
.justify-content(flex-start);

.panel-heading {
.flex();
min-height: 25px;
.flex(0 0 auto);
white-space: nowrap;
display: flex;

Expand Down
2 changes: 0 additions & 2 deletions src/kibana/apps/discover/controllers/discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ define(function (require) {
$scope.opts = {
// number of records to fetch, then paginate through
sampleSize: config.get('discover:sampleSize'),
// max length for summaries in the table
maxSummaryLength: 100,
// Index to match
index: $state.index,
savedSearch: savedSearch,
Expand Down
24 changes: 6 additions & 18 deletions src/kibana/apps/discover/directives/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ define(function (require) {
sorting: '=',
filtering: '=',
refresh: '=',
maxLength: '=',
mapping: '=',
timefield: '=?'
},
Expand Down Expand Up @@ -120,7 +119,6 @@ define(function (require) {
columns: '=',
filtering: '=',
mapping: '=',
maxLength: '=',
timefield: '=?',
row: '=kbnTableRow'
},
Expand All @@ -138,11 +136,6 @@ define(function (require) {
// whenever we compile, we should create a child scope that we can then detroy
var $child;

// set the maxLength for summaries
if ($scope.maxLength === void 0) {
$scope.maxLength = 250;
}

// toggle display of the rows details, a full list of the fields from each row
$scope.toggleRow = function () {
var row = $scope.row;
Expand Down Expand Up @@ -235,10 +228,11 @@ define(function (require) {
/**
* Fill an element with the value of a field
*/
function _displayField(el, row, field, truncate) {
var val = _getValForField(row, field, truncate);
el.text(val);
return el;
function _displayField(el, row, field) {
return el.html(
$('<div>').addClass('truncate-by-height')
.text(_getValForField(row, field))
);
}

/**
Expand All @@ -247,10 +241,9 @@ define(function (require) {
*
* @param {object} row - the row to pull the value from
* @param {string} field - the name of the field (dot-seperated paths are accepted)
* @param {boolean} untruncate - Should truncated values have a "more" link to expand the text?
* @return {[type]} a string, which should be inserted as text, or an element
*/
function _getValForField(row, field, untruncate) {
function _getValForField(row, field) {
var val;

// discover formats all of the values and puts them in _formatted for display
Expand All @@ -259,11 +252,6 @@ define(function (require) {
// undefined and null should just be an empty string
val = (val == null) ? '' : val;

// truncate the column text, not the details
if (typeof val === 'string' && val.length > $scope.maxLength) {
val = val.substring(0, $scope.maxLength) + '...';
}

return val;
}

Expand Down
17 changes: 12 additions & 5 deletions src/kibana/apps/discover/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,18 @@
</form>

<div class="button-group">
<button ng-click="newQuery()"><i class="fa fa-file-o"></i></button>
<button ng-click="toggleSave()"><i class="fa fa-save"></i></button>
<button ng-click="toggleLoad()"><i class="fa fa-folder-open"></i></button>
<button ng-click="toggleConfig()"><i class="fa fa-gear"></i></button>
<kbn-tooltip text="New Search" placement="bottom" append-to-body="1">
<button ng-click="newQuery()"><i class="fa fa-file-new-o"></i></button>
</kbn-tooltip>
<kbn-tooltip text="Save Search" placement="bottom" append-to-body="1">
<button ng-click="toggleSave()"><i class="fa fa-save"></i></button>
</kbn-tooltip>
<kbn-tooltip text="Load Saved Search" placement="bottom" append-to-body="1">
<button ng-click="toggleLoad()"><i class="fa fa-folder-open-o"></i></button>
</kbn-tooltip>
<kbn-tooltip text="Settings" placement="bottom" append-to-body="1">
<button ng-click="toggleConfig()"><i class="fa fa-gear"></i></button>
</kbn-tooltip>
</div>
</navbar>

Expand Down Expand Up @@ -137,7 +145,6 @@ <h3 ng-show="opts.savedSearch.id">
sorting="state.sort"
filtering="filterQuery"
refresh="fetch"
max-length="opts.maxSummaryLength"
timefield="opts.timefield"
mapping="fieldsByName">
</kbn-table>
Expand Down
4 changes: 1 addition & 3 deletions src/kibana/apps/discover/partials/row_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
tooltip-placement="top"
tooltip="No cached mapping for this field. Refresh your mapping from the Settings > Indices page"
class="fa fa-warning text-color-warning ng-scope"></i>
<kbn-truncated class="discover-table-details-value"
orig="{{row._formatted[field] || row[field]}}"
length=100></kbn-truncated>
<span class="discover-table-details-value">{{row._formatted[field] || row[field]}}</span>
</td>
</tr>
</tbody>
Expand Down
1 change: 0 additions & 1 deletion src/kibana/apps/discover/partials/table.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
mapping="mapping"
sorting="sorting"
timefield="timefield"
max-length="maxLength"
filtering="filtering"
class="discover-table-row"></tr>
</tbody>
Expand Down
6 changes: 5 additions & 1 deletion src/kibana/apps/settings/sections/advanced/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ <h4>Caution: You can break stuff here</h4>
<tbody>
<tr ng-repeat="conf in configs | filter:advancedFilter" ng-class="conf.value === undefined ? 'default' : 'custom'">
<td class="name">
<b>{{conf.name}}</b><br>
<b>{{conf.name}}</b>
<span class="smaller" ng-show="conf.value !== undefined">
(Default: <i>{{conf.defVal == undefined ? 'null' : conf.defVal}}</i>)
</span>
<br>
<span class="smaller">{{conf.description}}</span>
</td>
<td class="value">
Expand Down
27 changes: 15 additions & 12 deletions src/kibana/apps/settings/sections/indices/_create.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,30 +50,35 @@ <h1>Configure an index pattern</h1>
</select>
</div>

<div class="alert alert-danger" ng-repeat="err in index.patternErrors">{{err}}</div>
<div class="alert alert-danger" ng-repeat="err in index.patternErrors">
{{err}}
</div>

<div class="alert alert-info" ng-if="index.samples">
Sample index names
Attempted to match the following indices:
<ul>
<li ng-repeat="sample in index.samples">{{sample}}</li>
</ul>
<a ng-click="moreSamples(true)" class="alert-link">more</a>
<button ng-click="moreSamples(true)" class="btn btn-default">
Expand Search
</button>
</div>

<div class="alert alert-{{index.existing.class}}" ng-if="index.existing">
Pattern matches {{index.existing.matchPercent}} of similar indices
Pattern matches {{index.existing.matchPercent}} of existing indices
<ul>
<li ng-repeat="match in index.existing.matches | orderBy:'toString()'| limitTo: index.sampleCount">{{match}}</li>
</ul>
<a
<button
ng-if="index.sampleCount < index.existing.matches.length"
ng-click="moreSamples()"
class="alert-link">
more
</a>
class="btn btn-default">
Expand Search
</button>
</div>

<div class="alert alert-danger" ng-if="index.existing.failures.length">
Indices that did not match:
Indices that were found, but did not match the pattern:
<ul>
<li ng-repeat="match in index.existing.failures | limitTo: index.sampleCount">{{match}}</li>
</ul>
Expand All @@ -83,9 +88,7 @@ <h1>Configure an index pattern</h1>
class="alert-link">
more
</a>
</section>


</div>
</section>

<div class="form-group" ng-if="index.isTimeBased">
Expand Down
2 changes: 1 addition & 1 deletion src/kibana/apps/settings/sections/objects/_objects.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h2>Edit Saved Objects</h2>

<ul class="nav nav-tabs">
<li class="kbn-settings-tab" ng-class="{ active: state.tab === service.title }" ng-repeat="service in services">
<a ng-click="changeTab(service)">{{ service.title }} <small>({{service.hits}})</small></a>
<a ng-click="changeTab(service)">{{ service.title }} <small>({{service.data.length}})</small></a>
</li>
</ul>
<div class="tab-content">
Expand Down
2 changes: 1 addition & 1 deletion src/kibana/apps/settings/sections/objects/_objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ define(function (require) {
var services = registry.all().map(function (obj) {
var service = $injector.get(obj.service);
return service.find(filter).then(function (data) {
return { service: obj.service, title: obj.title, data: data.hits, hits: data.total };
return { service: obj.service, title: obj.title, data: data.hits };
});
});
$q.all(services).then(function (data) {
Expand Down
34 changes: 22 additions & 12 deletions src/kibana/apps/visualize/editor/editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,31 @@
</div>

<div class="button-group">
<button ng-click="startOver()"><i class="fa fa-file-o"></i></button>
<kbn-tooltip text="New Visualization" placement="bottom" append-to-body="1">
<button ng-click="startOver()"><i class="fa fa-file-new-o"></i></button>
</kbn-tooltip>

<!-- normal save -->
<button ng-if="!editableVis.dirty" ng-click="toggleSave()">
<i class="fa fa-save"></i>
</button>
<kbn-tooltip text="Save Visualization" placement="bottom" append-to-body="1">
<!-- normal save -->
<button ng-if="!editableVis.dirty" ng-click="toggleSave()">
<i class="fa fa-save"></i>
</button>

<!-- save stub with tooltip -->
<button disabled ng-if="editableVis.dirty" tooltip="Apply or Discard your changes before saving">
<i class="fa fa-save"></i>
</button>
<!-- save stub with tooltip -->
<button disabled ng-if="editableVis.dirty" tooltip="Apply or Discard your changes before saving">
<i class="fa fa-save"></i>
</button>
</kbn-tooltip>

<button ng-click="toggleLoad()"><i class="fa fa-folder-open"></i></button>
<button ng-click="toggleShare()"><i class="fa fa-code"></i></button>
<button ng-click="fetch()"><i class="fa fa-refresh"></i></button>
<kbn-tooltip text="Load Saved Visualization" placement="bottom" append-to-body="1">
<button ng-click="toggleLoad()"><i class="fa fa-folder-open-o"></i></button>
</kbn-tooltip>
<kbn-tooltip text="Share Visualization" placement="bottom" append-to-body="1">
<button ng-click="toggleShare()"><i class="fa fa-external-link"></i></button>
</kbn-tooltip>
<kbn-tooltip text="Refresh" placement="bottom" append-to-body="1">
<button ng-click="fetch()"><i class="fa fa-refresh"></i></button>
</kbn-tooltip>
</div>
</navbar>

Expand Down
4 changes: 4 additions & 0 deletions src/kibana/apps/visualize/styles/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@
}
}

.visualizations .visualization i {
margin-right: @padding-base-horizontal;
}

@import "../editor/editor.less";
6 changes: 3 additions & 3 deletions src/kibana/apps/visualize/wizard/step_2.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ <h1>
<span class="pull-right label label-default">Step 2</span>
</h1>

<ul class="list-group list-group-menu">
<a class="list-group-item list-group-menu-item"
<ul class="visualizations list-group list-group-menu">
<a class="visualization list-group-item list-group-menu-item"
ng-repeat="type in visTypes"
ng-href="{{ visTypeUrl(type) }}">
<li>
<i ng-class="type.icon"></i>{{type.title}}
<i class="fa" ng-class="type.icon"></i>{{type.title}}
</li>
</a>
</ul>
4 changes: 4 additions & 0 deletions src/kibana/components/config/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,9 @@ define(function (require) {
value: false,
description: 'Shorten long fields, for example, instead of foo.bar.baz, show f.b.baz',
},
'truncate:maxHeight': {
value: 100,
description: 'The maximum height that a cell in a table should occupy. Set to 0 to disable truncation.'
}
};
});
3 changes: 2 additions & 1 deletion src/kibana/components/courier/saved_object/saved_object.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ define(function (require) {
};

obj.saveSource = function (source) {
return docSource.doIndex(source).then(function (id) {
return docSource.doIndex(source)
.then(function (id) {
obj.id = id;
})
.then(function () {
Expand Down
Loading

0 comments on commit 6d7d919

Please sign in to comment.