Skip to content

Commit

Permalink
Merge pull request #1 from w33ble/feature/doc_viewer
Browse files Browse the repository at this point in the history
fix dov viewer tab style
  • Loading branch information
rashidkpc committed Dec 5, 2014
2 parents faf0a5b + 2bddc7b commit 18a3d02
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 36 deletions.
68 changes: 35 additions & 33 deletions src/kibana/components/doc_viewer/doc_viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,41 @@
<li ng-class="{active: mode == 'json'}"><a ng-click="mode='json'">JSON</a></li>
</ul>

<table class="table table-condensed" ng-show="mode == 'table'" bindonce>
<tbody>
<tr ng-repeat="field in fields" bindonce>
<td field-name="field"
field-type="mapping[field].type"
width="1%"
class="doc-viewer-field">
</td>
<td width="1%" class="doc-viewer-buttons" ng-if="filter">
<span bo-if="showFilters(mapping[field])">
<i ng-click="filter(field, flattened[field], '+')" class="fa fa-search-plus"></i>
<i ng-click="filter(field, flattened[field],'-')" class="fa fa-search-minus"></i>
</span>
<span bo-if="!showFilters(mapping[field])" tooltip="Unindexed fields can not be searched">
<i class="fa fa-search-plus text-muted"></i>
<i class="fa fa-search-minus text-muted"></i>
</span>
</td>
<div class="content">
<table class="table table-condensed" ng-show="mode == 'table'" bindonce>
<tbody>
<tr ng-repeat="field in fields" bindonce>
<td field-name="field"
field-type="mapping[field].type"
width="1%"
class="doc-viewer-field">
</td>
<td width="1%" class="doc-viewer-buttons" ng-if="filter">
<span bo-if="showFilters(mapping[field])">
<i ng-click="filter(field, flattened[field], '+')" class="fa fa-search-plus"></i>
<i ng-click="filter(field, flattened[field],'-')" class="fa fa-search-minus"></i>
</span>
<span bo-if="!showFilters(mapping[field])" tooltip="Unindexed fields can not be searched">
<i class="fa fa-search-plus text-muted"></i>
<i class="fa fa-search-minus text-muted"></i>
</span>
</td>

<td>
<i bo-if="!mapping[field] && !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>
<i bo-if="showArrayInObjectsWarning(doc, field)"
tooltip-placement="top"
tooltip="Objects in arrays are not well supported."
class="fa fa-warning text-color-warning ng-scope doc-viewer-object-array"></i>
<span class="doc-viewer-value" ng-bind-html="(formatted[field] || hit[field]) | highlight : hit.highlight[field] | trustAsHtml"></span>
</td>
</tr>
</tbody>
</table>
<td>
<i bo-if="!mapping[field] && !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>
<i bo-if="showArrayInObjectsWarning(doc, field)"
tooltip-placement="top"
tooltip="Objects in arrays are not well supported."
class="fa fa-warning text-color-warning ng-scope doc-viewer-object-array"></i>
<span class="doc-viewer-value" ng-bind-html="(formatted[field] || hit[field]) | highlight : hit.highlight[field] | trustAsHtml"></span>
</td>
</tr>
</tbody>
</table>

<pre ng-show="mode == 'json'">{{hit | json}}</pre>
<pre ng-show="mode == 'json'">{{hit | json}}</pre>
</div>
</div>
5 changes: 2 additions & 3 deletions src/kibana/components/doc_viewer/doc_viewer.less
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ doc-viewer .doc-viewer {
font-family: "Lucida Console", Monaco, monospace;
}

.nav-tabs {
border-bottom: 0px !important;
.content {
margin-top: @padding-base-vertical;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ define(function (require) {
};
}
});

return {
fields: ['*', '_source'],
scriptFields: scriptFields
Expand Down

0 comments on commit 18a3d02

Please sign in to comment.