Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into apps/home
Browse files Browse the repository at this point in the history
  • Loading branch information
Spencer Alger committed Jun 30, 2015
2 parents 844b95c + 1ed3cbb commit 40536fe
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 32 deletions.
4 changes: 2 additions & 2 deletions docs/getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ A green oval with the filter definition displays right under the query box:
image::images/tutorial-visualize-map-3.png[]

Hover on the filter to display the controls to toggle, pin, invert, or delete the filter. Save this chart with the name
_Bar Example_.
_Map Example_.

Finally, we're going to define a sample Markdown widget to display on our dashboard. Click on *New Visualization*, then
*Markdown widget*, to display a very simple Markdown entry field:
Expand Down Expand Up @@ -323,4 +323,4 @@ clicking the *Share* button to display HTML embedding code as well as a direct l
=== Wrapping Up

Now that you've handled the basic aspects of Kibana's functionality, you're ready to explore Kibana in further detail.
Take a look at the rest of the documentation for more details!
Take a look at the rest of the documentation for more details!
3 changes: 1 addition & 2 deletions docs/whats-new.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
the Visualize tab to Discover to a Dashboard.
* {k4pull}2731[Pull Request 2731]: Field formatting options now supported in Settings.
* {k4pull}3154[Pull Request 3154]: New chart: Bubble chart, derived from the basic line chart.
* {k4pull}3212[Pull Request 3212]: You can now install Kibana on Linux with a package manager such as `yum` or
`apt-get`.
* {k4pull}3212[Pull Request 3212]: You can now install Kibana on Linux with a package manager such as `apt-get`.
* {k4pull}3271[Pull Request 3271] and {k4pull}3262[3262]: New aggregations: IPv4 and Date range aggregations enable
you to specify buckets for these qualities.
* {k4pull}3290[Pull Request 3290]: You can select a time interval for the Discover display of time series data.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"husky": "^0.8.1",
"istanbul": "^0.3.15",
"jade": "^1.8.2",
"license-checker": "3.0.3",
"license-checker": "^3.1.0",
"libesvm": "^1.0.1",
"load-grunt-config": "^0.7.0",
"marked": "^0.3.3",
Expand Down
45 changes: 28 additions & 17 deletions src/ui/components/agg_types/buckets/terms.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ define(function (require) {
title: 'Terms',
makeLabel: function (agg) {
var params = agg.params;
return params.order.display + ' ' + params.size + ' ' + params.field.displayName;
return params.field.displayName + ': ' + params.order.display;
},
createFilter: createFilter,
params: [
Expand All @@ -53,21 +53,6 @@ define(function (require) {
name: 'size',
default: 5
},
{
name: 'order',
type: 'optioned',
default: 'desc',
editor: require('text!components/agg_types/controls/order_and_size.html'),
options: [
{ display: 'Top', val: 'desc' },
{ display: 'Bottom', val: 'asc' }
],
write: _.noop // prevent default write, it's handled by orderAgg
},
{
name: 'orderBy',
write: _.noop // prevent default write, it's handled by orderAgg
},
{
name: 'orderAgg',
type: AggConfig,
Expand Down Expand Up @@ -122,6 +107,12 @@ define(function (require) {
// we aren't creating a custom aggConfig
if (!orderBy || orderBy !== 'custom') {
params.orderAgg = null;

if (orderBy === '_term') {
params.orderBy = '_term';
return;
}

// ensure that orderBy is set to a valid agg
if (!_.find($scope.responseValueAggs, { id: orderBy })) {
params.orderBy = null;
Expand All @@ -146,7 +137,12 @@ define(function (require) {
output.params.valueType = agg.field().type === 'number' ? 'float' : agg.field().type;
}

if (!orderAgg || orderAgg.type.name === 'count') {
if (!orderAgg) {
order[agg.params.orderBy || '_count'] = dir;
return;
}

if (orderAgg.type.name === 'count') {
order._count = dir;
return;
}
Expand All @@ -159,6 +155,21 @@ define(function (require) {
output.subAggs = (output.subAggs || []).concat(orderAgg);
order[orderAggId] = dir;
}
},
{
name: 'order',
type: 'optioned',
default: 'desc',
editor: require('text!components/agg_types/controls/order_and_size.html'),
options: [
{ display: 'Descending', val: 'desc' },
{ display: 'Ascending', val: 'asc' }
],
write: _.noop // prevent default write, it's handled by orderAgg
},
{
name: 'orderBy',
write: _.noop // prevent default write, it's handled by orderAgg
}
]
});
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/agg_types/controls/field.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<div class="hintbox" ng-if="!indexedFields.length">
<p>
<i class="fa fa-danger text-danger"></i>
<strong>No Compatible Fields:</strong> The "{{ vis.indexPattern.id }}" index pattern does not any of the following field types: {{ agg.type.params.byName.field.filterFieldTypes | commaList:false }}
<strong>No Compatible Fields:</strong> The "{{ vis.indexPattern.id }}" index pattern does not contain any of the following field types: {{ agg.type.params.byName.field.filterFieldTypes | commaList:false }}
</p>
</div>

Expand Down
3 changes: 3 additions & 0 deletions src/ui/components/agg_types/controls/order_agg.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
<option value="custom" ng-selected="agg.params.orderBy === 'custom'">
Custom Metric
</option>
<option value="_term" ng-selected="agg.params.orderBy === '_term'">
Term
</option>
</select>
</div>
<div ng-show="agg.params.orderAgg" class="vis-editor-agg-order-agg">
Expand Down
8 changes: 8 additions & 0 deletions src/ui/components/config/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ define(function () {
'format:currency:defaultPattern': {
type: 'string',
value: '($0,0.[00])'
},
'timepicker:timeDefaults': {
type: 'json',
value: JSON.stringify({
from: 'now-15m',
to: 'now',
mode: 'quick'
}, null, 2)
}
};
};
Expand Down
8 changes: 2 additions & 6 deletions src/ui/components/timefilter/timefilter.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
define(function (require) {
require('modules')
.get('kibana')
.service('timefilter', function (Private, globalState, $rootScope) {
.service('timefilter', function (Private, globalState, $rootScope, config) {

var _ = require('lodash');
var angular = require('angular');
Expand All @@ -27,11 +27,7 @@

self.enabled = false;

var timeDefaults = {
from: 'now-15m',
to: 'now',
mode: 'quick'
};
var timeDefaults = config.get('timepicker:timeDefaults');

var refreshIntervalDefaults = {
display: 'Off',
Expand Down
3 changes: 2 additions & 1 deletion tasks/config/licenses.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ module.exports = function (grunt) {
'FileSaver@undefined': ['MIT'],
'[email protected]': ['Public-Domain'],
'[email protected]': ['MIT'],
'[email protected]': ['BSD']
'[email protected]': ['BSD'],
'[email protected]': ['BSD-3-Clause', 'MIT']
}
}
};
Expand Down
5 changes: 3 additions & 2 deletions tasks/licenses.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ module.exports = function (grunt) {
var invalidLicenses = _.filter(licenseStats, function (pkg) { return !pkg.valid;});

if (grunt.option('only-invalid')) {
console.log(invalidLicenses);
grunt.log.debug(JSON.stringify(invalidLicenses, null, 2));
} else {
console.log(licenseStats);
grunt.log.debug(JSON.stringify(licenseStats, null, 2));
}


if (invalidLicenses.length) {
grunt.fail.warn('Non-confirming licenses: ' + _.pluck(invalidLicenses, 'name').join(', ') +
'. Use --only-invalid for details.', invalidLicenses.length);
Expand Down

0 comments on commit 40536fe

Please sign in to comment.