Skip to content

Commit

Permalink
Add descriptions of all advanced settings. Add informational text abo…
Browse files Browse the repository at this point in the history
…ut object viewer. Closes #373
  • Loading branch information
Rashid Khan committed Sep 25, 2014
1 parent 45c4701 commit be38749
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 31 deletions.
5 changes: 4 additions & 1 deletion src/kibana/apps/settings/sections/advanced/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ <h4>Caution: You can break stuff here</h4>
</thead>
<tbody>
<tr ng-repeat="conf in configs | filter:advancedFilter" ng-class="conf.value === undefined ? 'default' : 'custom'">
<td class="name">{{conf.name}}</td>
<td class="name">
<b>{{conf.name}}</b><br>
<span class="smaller">{{conf.description}}</span>
</td>
<td class="value">
<form
ng-if="conf.editting"
Expand Down
5 changes: 3 additions & 2 deletions src/kibana/apps/settings/sections/advanced/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ define(function (require) {
.catch(notify.fatal);
};

$scope.configs = _.map(configDefaults, function (defVal, name) {
$scope.configs = _.map(configDefaults, function (def, name) {
var conf = {
name: name,
defVal: defVal,
defVal: def.value,
description: def.description,
value: configVals[name]
};

Expand Down
8 changes: 3 additions & 5 deletions src/kibana/apps/settings/sections/objects/_objects.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<kbn-settings-app section="objects">
<kbn-settings-objects class="container">
<h2>Edit Saved Objects</h2>
<div class="bs-callout bs-callout-warning">
<h4>Caution: You can break stuff here</h4>
Be careful in here, these setting are for very advanced users only. Tweaks you make here can break large poritions of Kibana.
Some of these settings may be undocumented, unsupported or experimental. Seriously, if you thought the "Advance" tab was dangerous this is even more extreme!
</div>
<p>
From here you can delete saved objects, such as saved searches. You can also edit the raw data of saved objects. Typically objects are only modified via their associated application, which is probably what you should use instead of this screen.
</p>
<form>
<input ng-model="advancedFilter" class="form-control span12" type="text" placeholder="Filter"/>
</form>
Expand Down
5 changes: 2 additions & 3 deletions src/kibana/apps/settings/sections/objects/_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
</div>
<h1>Edit {{ title }} Object</h1>
<div class="bs-callout bs-callout-warning">
<h4>Caution: You can break stuff here</h4>
Be careful in here, these setting are for very advanced users only. Tweaks you make here can break large poritions of Kibana.
Some of these settings may be undocumented, unsupported or experimental. Seriously, if you thought the "Advance" tab was dangerous this is even more extreme!
<h4>Proceed with caution</h4>
Modifying objects is for advanced users only. Object properties are not validated and invalid objects could cause errors, data loss, or worse. Unless someone with intimate knowledge of the code told you to be in here, you probably shouldn't be.
</div>
</div>
<form name="objectForm" ng-submit="submit()">
Expand Down
2 changes: 1 addition & 1 deletion src/kibana/components/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ define(function (require) {
config.get = function (key, defaultVal) {
if (vals[key] == null) {
if (defaultVal == null) {
return defaults[key];
return defaults[key].value;
} else {
return _.cloneDeep(defaultVal);
}
Expand Down
65 changes: 46 additions & 19 deletions src/kibana/components/config/defaults.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,50 @@
define(function (require) {
var _ = require('lodash');

return _.flattenWith('.', {
dateFormat: 'MMMM Do YYYY, HH:mm:ss.SSS',
defaultIndex: null,
refreshInterval: 10000,
metaFields: ['_source', '_id', '_type', '_index'],

'discover:sampleSize': 500,
'fields:popularLimit': 10,

'histogram:barTarget': 50,
'histogram:maxBars': 100,

'csv:separator': ',',
'csv:quoteValues': true,

'history:limit': 10,

'shortDots:enable': false
});
return {
'dateFormat': {
value: 'MMMM Do YYYY, HH:mm:ss.SSS',
description: 'When displaying a pretty formatted date, use this format',
},
'defaultIndex': {
value: null,
description: 'The index to access if no index is set',
},
'metaFields': {
value: ['_source', '_id', '_type', '_index'],
description: 'Fields that exist outside of _source to merge into our document when displaying it',
},
'discover:sampleSize': {
value: 500,
description: 'The number of rows to show in the table',
},
'fields:popularLimit': {
value: 10,
description: 'The top N most popular fields to show',
},
'histogram:barTarget': {
value: 50,
description: 'Attempt to generate around this many bar when using "auto" interval in date histograms',
},
'histogram:maxBars': {
value: 100,
description: 'Never show more than this many bar in date histograms, scale values if needed',
},
'csv:separator': {
value: ',',
description: 'Seperate exported values with this string',
},
'csv:quoteValues': {
value: true,
description: 'Should values be quoted in csv exports?',
},
'history:limit': {
value: 10,
description: 'In fields that have history (eg query inputs), show this many recent values',
},
'shortDots:enable': {
value: false,
description: 'Shorten long fields, for example, instead of foo.bar.baz, show f.b.baz',
},
};
});

0 comments on commit be38749

Please sign in to comment.