Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
panda01 committed Mar 10, 2015
2 parents 1d3349e + 6701acc commit 5676eaf
Show file tree
Hide file tree
Showing 52 changed files with 249 additions and 154 deletions.
4 changes: 4 additions & 0 deletions FAQ.md
Expand Up @@ -11,3 +11,7 @@

**Q:** What happened to templated/scripted dashboards?
**A:** Check out the URL. The state of each app is stored there, including any filters, queries or columns. This should be a lot easier than constructing scripted dashboards. The encoding of the URL is RISON.

**Q:** I'm getting `bin/node/bin/node: not found` but I can see the node binary in the package?
**A:** Kibana 4 packages are architecture specific. Ensure you are using the correct package for your architecture.

4 changes: 2 additions & 2 deletions src/kibana/components/agg_table/agg_table.html
Expand Up @@ -7,10 +7,10 @@
<div class="agg-table-controls">
<small>Export:</small>&nbsp;&nbsp;
<a class="small" ng-click="aggTable.exportAsCsv(false)">
Raw <i class="fa fa-download"></i>
Raw <i aria-hidden="true" class="fa fa-download"></i>
</a>&nbsp;&nbsp;&nbsp;
<a class="small" ng-click="aggTable.exportAsCsv(true)">
Formatted <i class="fa fa-download"></i>
Formatted <i aria-hidden="true" class="fa fa-download"></i>
</a>
<paginate-controls></paginate-controls>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/kibana/components/agg_types/controls/field.html
Expand Up @@ -22,6 +22,7 @@
name="field"
required
ng-model="agg.params.field"
auto-select-if-only-one="indexedFields"
ng-options="field as field.displayName group by field.type for field in indexedFields"
ng-change="aggParam.onChange(agg)">
</select>
Expand Down
6 changes: 4 additions & 2 deletions src/kibana/components/agg_types/controls/ranges.html
Expand Up @@ -15,14 +15,16 @@
ng-model="range.from"
type="number"
class="form-control"
name="range.from" />
name="range.from"
step="any" />
</td>
<td>
<input
ng-model="range.to"
type="number"
class="form-control"
name="range.to" />
name="range.to"
step="any" />
</td>
<td>
<button
Expand Down
23 changes: 19 additions & 4 deletions src/kibana/components/doc_table/components/table_row.js
Expand Up @@ -6,10 +6,12 @@ define(function (require) {
var module = require('modules').get('app/discover');

require('components/highlight/highlight');
require('components/highlight/highlight_tags');
require('components/doc_viewer/doc_viewer');
require('filters/trust_as_html');
require('filters/short_dots');


// guestimate at the minimum number of chars wide cells in the table should be
var MIN_LINE_LENGTH = 20;

Expand All @@ -21,7 +23,7 @@ define(function (require) {
* <tr ng-repeat="row in rows" kbn-table-row="row"></tr>
* ```
*/
module.directive('kbnTableRow', function ($compile, config, highlightFilter, shortDotsFilter, courier) {
module.directive('kbnTableRow', function ($compile, config, highlightFilter, highlightTags, shortDotsFilter, courier) {
var openRowHtml = require('text!components/doc_table/components/table_row/open.html');
var detailsHtml = require('text!components/doc_table/components/table_row/details.html');
var cellTemplate = _.template(require('text!components/doc_table/components/table_row/cell.html'));
Expand Down Expand Up @@ -104,14 +106,17 @@ define(function (require) {

$scope.columns.forEach(function (column) {
var formatted;

var sources = _.extend({}, row.$$_formatted, row.highlight);
if (column === '_source') {
formatted = sourceTemplate({
source: _.mapValues(row.$$_formatted, function (val, field) {
var sourceConfig = {
source: _.mapValues(sources, function (val, field) {
return _displayField(row, field, false);
}),
highlight: row.highlight,
shortDotsFilter: shortDotsFilter
});
};
formatted = sourceTemplate(sourceConfig);
} else {
formatted = _displayField(row, column, true);
}
Expand Down Expand Up @@ -187,6 +192,16 @@ define(function (require) {
function _getValForField(row, field) {
var val;

if (row.highlight && row.highlight[field]) {
// Strip out the highlight tags so we have the "original" value
var untagged = _.map(row.highlight[field], function (value) {
return value
.split(highlightTags.pre).join('')
.split(highlightTags.post).join('');
});
return _formatField(untagged, field);
}

// discover formats all of the values and puts them in $$_formatted for display
val = (row.$$_formatted || _formatRow(row))[field];

Expand Down
8 changes: 6 additions & 2 deletions src/kibana/components/doc_viewer/doc_viewer.html
Expand Up @@ -25,7 +25,11 @@
</td>

<td>
<i bo-if="!mapping[field] && !showArrayInObjectsWarning(doc, field)"
<i bo-if="!mapping[field] && field[0] === '_'"
tooltip-placement="top"
tooltip="Field names beginning with _ are not supported"
class="fa fa-warning text-color-warning ng-scope doc-viewer-underscore"></i>
<i bo-if="!mapping[field] && field[0] !== '_' && !showArrayInObjectsWarning(doc, field)"
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 doc-viewer-no-mapping"></i>
Expand All @@ -43,4 +47,4 @@

<pre ng-show="mode == 'json'">{{hit | json}}</pre>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion src/kibana/components/paginated_table/paginated_table.html
Expand Up @@ -22,7 +22,7 @@
'fa-sort': paginatedTable.sort.columnIndex !== $index || paginatedTable.sort.direction === null
}">
</i>
<i ng-if="col.filterable" class="fa fa-search" ng-click="$event.stopPropagation()" tooltip="Click on a cell to filter"></i>
<i aria-label="Click on a cell to filter" ng-if="col.filterable" class="fa fa-search" ng-click="$event.stopPropagation()" tooltip="Click on a cell to filter"></i>
</th>
</tr>
</thead>
Expand Down
16 changes: 9 additions & 7 deletions src/kibana/components/timepicker/timepicker.html
Expand Up @@ -64,7 +64,7 @@
</div>

<div ng-switch-when="relative">
<form ng-submit="applyRelative()" class="form-inline" name="relativeTime">
<form role="form" ng-submit="applyRelative()" class="form-inline" name="relativeTime">
<div class="kbn-timepicker-section">
<label>
From:
Expand All @@ -91,12 +91,14 @@
</div>
<br>
<div class="small">
<input
ng-model="relative.round"
ng-checked="relative.round"
ng-change="formatRelative()"
type="checkbox">
round to the {{units[relative.unit]}}
<label>
<input
ng-model="relative.round"
ng-checked="relative.round"
ng-change="formatRelative()"
type="checkbox">
round to the {{units[relative.unit]}}
</label>
</div>
</div>

Expand Down
1 change: 1 addition & 0 deletions src/kibana/components/vislib/styles/_layout.less
Expand Up @@ -12,6 +12,7 @@
// margin: 10px 0 0 6px;
min-height: 0;
min-width: 0;
overflow: hidden;
}

/* YAxis logic */
Expand Down
2 changes: 1 addition & 1 deletion src/kibana/components/visualize/visualize.html
Expand Up @@ -2,7 +2,7 @@
class="text-center visualize-error visualize-chart">
<div class="item top"></div>
<div class="item">
<h2><i class="fa fa-meh-o"></i></h2>
<h2 aria-hidden="true"><i aria-hidden="true" class="fa fa-meh-o"></i></h2>
<h4>No results found</h4>
</div>
<div class="item bottom"></div>
Expand Down
5 changes: 3 additions & 2 deletions src/kibana/directives/auto_select_if_only_one.js
@@ -1,12 +1,13 @@
define(function (require) {
var module = require('modules').get('kibana');

module.directive('autoSelectIfOnlyOne', function () {
module.directive('autoSelectIfOnlyOne', function ($parse) {
return {
restrict: 'A',
require: 'ngModel',
link: function (scope, element, attributes, ngModelCtrl) {
scope.$watch(attributes.autoSelectIfOnlyOne, function (options) {
attributes.$observe('autoSelectIfOnlyOne', function (result) {
var options = $parse(result)(scope);
if (options && options.length === 1) {
ngModelCtrl.$setViewValue(options[0]);
ngModelCtrl.$render();
Expand Down
4 changes: 2 additions & 2 deletions src/kibana/index.html
Expand Up @@ -3,7 +3,7 @@
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width">
<link rel="shortcut icon" href="styles/theme/elk.ico">
<title>Kibana 4</title>
Expand All @@ -15,7 +15,7 @@
<div class="row">
<div class="col-md-offset-4 col-md-4 page-header initial-load">
<center>
<img width="128" src="images/initial_load.gif">
<img width="128" alt="Loading Kibana" src="images/initial_load.gif">
<h1>
<strong>Kibana</strong>
<small id="cache-message">is loading. Give me a moment here. I'm loading a whole bunch of code. Don't worry, all this good stuff will be cached up for next time!</small>
Expand Down
4 changes: 2 additions & 2 deletions src/kibana/partials/global_config.html
Expand Up @@ -7,6 +7,6 @@
ng-options="opt.display for opt in opts.fetchIntervals">
</select>
</div>
<button type="submit" class="btn btn-default">
<i class="fa fa-save"></i> Save
<button type="submit" class="btn btn-default" aria-label="Save">
<i aria-hidden="true" class="fa fa-save"></i> Save
</button>
2 changes: 1 addition & 1 deletion src/kibana/partials/info.html
@@ -1,4 +1,4 @@
<i class="fa fa-info-circle"
<i aria-label="{{info}}" class="fa fa-info-circle"
tooltip="{{info}}"
tooltip-placement="{{placement}}"
tooltip-popup-delay="250"></i>
4 changes: 2 additions & 2 deletions src/kibana/partials/saved_object_finder.html
@@ -1,4 +1,4 @@
<form>
<form role="form">
<div class="form-group finder-form">
<div>
<a class="small pull-right" ng-click="manageObject(type)">manage {{type}}</a>
Expand All @@ -21,7 +21,7 @@
ng-href="{{ makeUrl(hit) }}"
ng-click="onChoose(hit, $event)">
<li>
<i class="fa" ng-if="hit.icon" ng-class="hit.icon"></i> {{hit.title}}
<i aria-hidden="true" class="fa" ng-if="hit.icon" ng-class="hit.icon"></i> {{hit.title}}
<p ng-if="hit.description" ng-bind="hit.description"></p>
</li>
</a>
Expand Down
6 changes: 3 additions & 3 deletions src/kibana/plugins/dashboard/components/panel/panel.html
Expand Up @@ -2,14 +2,14 @@
<div class="panel-heading">
<span class="panel-title">{{savedObj.title}}</span>
<div class="btn-group">
<a ng-show="!appEmbedded" ng-href="{{edit}}/{{panel.id | uriescape}}"><i class="fa fa-pencil"></i></a>
<a ng-show="!appEmbedded" ng-click="remove()"><i class="fa fa-times"></i></a>
<a aria-label="Edit" ng-show="!appEmbedded" ng-href="{{edit}}/{{panel.id | uriescape}}"><i aria-hidden="true" class="fa fa-pencil"></i></a>
<a aria-label="Remove" ng-show="!appEmbedded" ng-click="remove()"><i aria-hidden="true" class="fa fa-times"></i></a>
</div>
<div class="clearfix"></div>
</div>

<div ng-if="error" class="load-error">
<i class="fa fa-exclamation-triangle"></i>
<i aria-hidden="true" class="fa fa-exclamation-triangle"></i>
<span ng-bind="error"></span>
</div>

Expand Down
22 changes: 12 additions & 10 deletions src/kibana/plugins/dashboard/index.html
Expand Up @@ -4,21 +4,23 @@

<form name="queryInput"
class="fill inline-form"
ng-submit="filterResults()">
ng-submit="filterResults()"
role="form">

<div class="typeahead" kbn-typeahead="dashboard">
<div class="input-group"
ng-class="queryInput.$invalid ? 'has-error' : ''">

<input type="text"
placeholder="Filter..."
aria-label="Filter input"
class="form-control"
ng-model="state.query"
input-focus
kbn-typeahead-input
validate-query>
<button type="submit" class="btn btn-default" ng-disabled="queryInput.$invalid">
<span class="fa fa-search"></span>
<button type="submit" class="btn btn-default" ng-disabled="queryInput.$invalid" aria-label="Filter dashboards">
<span aria-hidden="true" class="fa fa-search"></span>
</button>
</div>

Expand All @@ -27,21 +29,21 @@

</form>

<div class="button-group">
<div class="button-group" role="toolbar">
<kbn-tooltip text="New Dashboard" placement="bottom" append-to-body="1">
<button ng-click="newDashboard()"><i class="fa fa-file-new-o"></i></button>
<button ng-click="newDashboard()" aria-label="New Dashboard"><i aria-hidden="true" class="fa fa-file-new-o"></i></button>
</kbn-tooltip>
<kbn-tooltip text="Save Dashboard" placement="bottom" append-to-body="1">
<button ng-click="configTemplate.toggle('save')"><i class="fa fa-save"></i></button>
<button aria-label="Save Dashboard" aria-haspopup="true" aria-expanded="{{toggleSaveDashboard}}" ng-click="configTemplate.toggle('save'); toggleSaveDashboard = !toggleSaveDashboard"><i aria-hidden="true" class="fa fa-save"></i></button>
</kbn-tooltip>
<kbn-tooltip text="Load Saved Dashboard" placement="bottom" append-to-body="1">
<button ng-click="configTemplate.toggle('load')"><i class="fa fa-folder-open-o"></i></button>
<button aria-label="Load Saved Dashboard" aria-haspopup="true" aria-expanded="{{toggleLoadSavedDashboard}}" ng-click="configTemplate.toggle('load'); toggleLoadSavedDashboard = !toggleLoadSavedDashboard"><i aria-hidden="true" class="fa fa-folder-open-o"></i></button>
</kbn-tooltip>
<kbn-tooltip text="Share" placement="bottom" append-to-body="1">
<button ng-click="configTemplate.toggle('share')"><i class="fa fa-external-link"></i></button>
<button aria-label="Share Dashboard" aria-haspopup="true" aria-expanded="{{toggleShareDashboard}}" ng-click="configTemplate.toggle('share'); toggleShareDashboard = !toggleShareDashboard"><i aria-hidden="true" class="fa fa-external-link"></i></button>
</kbn-tooltip>
<kbn-tooltip text="Add Visualization" placement="bottom" append-to-body="1">
<button ng-click="configTemplate.toggle('pickVis')"><i class="fa fa-plus-circle"></i></button>
<button aria-label="Add Visualization" aria-haspopup="true" aria-expanded="{{toggleAddVisualization}}" ng-click="configTemplate.toggle('pickVis'); toggleAddVisualization = !toggleAddVisualization"><i aria-hidden="true" class="fa fa-plus-circle"></i></button>
</kbn-tooltip>
</div>
</navbar>
Expand All @@ -52,7 +54,7 @@

<div ng-show="!state.panels.length" class="text-center start-screen">
<h2>Ready to get started?</h2>
<p>Click the <a class="btn btn-xs navbtn-inverse" ng-click="configTemplate.open('pickVis')"><i class="fa fa-plus-circle"></i></a> button in the menu bar above to add a visualization to the dashboard. <br/>If you haven't setup a visualization yet visit the <a href="#/visualize">"Visualize"</a> tab to create your first visualization.</p>
<p>Click the <a class="btn btn-xs navbtn-inverse" ng-click="configTemplate.open('pickVis'); toggleAddVisualization = !toggleAddVisualization" aria-label="Add visualization"><i aria-hidden="true" class="fa fa-plus-circle"></i></a> button in the menu bar above to add a visualization to the dashboard. <br/>If you haven't setup a visualization yet visit the <a href="#/visualize" title="Visualize">"Visualize"</a> tab to create your first visualization.</p>
</div>

<dashboard-grid></dashboard-grid>
Expand Down
4 changes: 2 additions & 2 deletions src/kibana/plugins/dashboard/partials/pick_visualization.html
@@ -1,7 +1,7 @@
<div ng-switch on="mode" ng-init="mode = 'visualization'" class="dashboard-panel-picker">
<ul class="nav nav-tabs">
<li ng-class="{active: mode == 'visualization'}"><a ng-click="mode='visualization'">Visualizations</a></li>
<li ng-class="{active: mode == 'search'}"><a ng-click="mode='search'">Searches</a></li>
<li ng-class="{active: mode == 'visualization'}"><a ng-click="mode='visualization'" title="Visualizations">Visualizations</a></li>
<li ng-class="{active: mode == 'search'}"><a ng-click="mode='search'" title="Searches">Searches</a></li>
</ul>

<li class="list-group-item" ng-switch-when="visualization">
Expand Down
10 changes: 5 additions & 5 deletions src/kibana/plugins/dashboard/partials/save_dashboard.html
@@ -1,7 +1,7 @@
<form ng-submit="opts.save()">
<form ng-submit="opts.save()" role="form">
<div class="form-group">
<label for="exampleInputEmail1">Save As</label>
<input type="text" ng-model="opts.dashboard.title" class="form-control" placeholder="Dashboard title" input-focus="select">
<label for="dashboardTitle">Save As</label>
<input id="dashboardTitle" type="text" ng-model="opts.dashboard.title" class="form-control" placeholder="Dashboard title" input-focus>
</div>
<button type="submit" ng-disabled="!opts.dashboard.title" class="btn btn-primary">Save</button>
</form>
<button type="submit" ng-disabled="!opts.dashboard.title" class="btn btn-primary" aria-label="Save dashboard">Save</button>
</form>
Expand Up @@ -18,9 +18,9 @@ <h5 ng-show="!field.details.error">Quick Count
<div ng-repeat="bucket in field.details.buckets" class="discover-field-details-item">
<div>
<span ng-show="field.filterable" class="pull-right">
<i class="fa fa-search-minus pull-right discover-field-details-filter"
<i aria-hidden="true" class="fa fa-search-minus pull-right discover-field-details-filter"
ng-click="updateFilterInQuery(field, bucket.value, '-')"></i>
<i class="fa fa-search-plus pull-right discover-field-details-filter"
<i aria-hidden="true" class="fa fa-search-plus pull-right discover-field-details-filter"
ng-click="updateFilterInQuery(field, bucket.value, '+')"></i>
</span>
<div css-truncate css-truncate-expandable="true" class="discover-field-details-value">
Expand All @@ -38,7 +38,7 @@ <h5 ng-show="!field.details.error">Quick Count
class="sidebar-item-button primary">
Visualize
<span class="discover-field-vis-warning" ng-show="warnings.length" tooltip="{{warnings.join(' ')}}">
( {{warnings.length}} <ng-pluralize count="warnings.length" when="{'1':'warning', 'other':'warnings'}"></ng-pluralize> <i class="fa fa-warning"></i> )
( {{warnings.length}} <ng-pluralize count="warnings.length" when="{'1':'warning', 'other':'warnings'}"></ng-pluralize> <i aria-hidden="true" class="fa fa-warning"></i> )
</span>
</div>

Expand Down

0 comments on commit 5676eaf

Please sign in to comment.