|
|
@@ -1,75 +1,97 @@
|
|
|
<kibana-panel ng-controller='table' ng-init='init()'>
|
|
|
+ <style>
|
|
|
+ .table-doc-table {
|
|
|
+ margin-left: 0px !important;
|
|
|
+ overflow-y: auto;
|
|
|
+ overflow-x: auto;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
|
|
|
<span ng-show="panel.spyable" style="position:absolute;right:0px;top:0px" class='panelextra pointer'>
|
|
|
<i bs-modal="'partials/modal.html'" class="icon-eye-open"></i>
|
|
|
</span>
|
|
|
|
|
|
- <div style="{{panel.overflow}}:{{panel.height || row.height}};overflow-y:auto;overflow-x:auto">
|
|
|
- <div class="row-fluid" ng-show="panel.paging">
|
|
|
- <div class="span1 offset1" style="text-align:right">
|
|
|
- <i ng-click="panel.offset = 0" ng-show="panel.offset > 0" class='icon-circle-arrow-left pointer'></i>
|
|
|
- <i ng-click="panel.offset = (panel.offset - panel.size)" ng-show="panel.offset > 0" class='icon-arrow-left pointer'></i>
|
|
|
- </div>
|
|
|
- <div class="span8" style="text-align:center">
|
|
|
- <strong>{{panel.offset}}</strong> to <strong>{{panel.offset + data.slice(panel.offset,panel.offset+panel.size).length}}</strong>
|
|
|
- <small> of {{data.length}} available for paging</small>
|
|
|
- </div>
|
|
|
- <div class="span1" style="text-align:left">
|
|
|
- <i ng-click="panel.offset = (panel.offset + panel.size)" ng-show="data.length > panel.offset+panel.size" class='icon-arrow-right pointer'></i>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="small" ng-show="panel.fields.length == 0">No columns configured. You may want to add a <strong>fields panel</strong>, or click the edit button in the top right of this panel to add some columns</div>
|
|
|
- <table class="table-hover table table-condensed" ng-style="panel.style">
|
|
|
- <thead ng-show="panel.header">
|
|
|
-
|
|
|
- <th style="white-space:nowrap" ng-repeat="field in panel.fields">
|
|
|
- <i ng-show="!$first" class="pointer link icon-caret-left" ng-click="_.move(panel.fields,$index,$index-1)"></i>
|
|
|
+ <div class="row-fluid">
|
|
|
+ <div ng-class="{'span3':panel.field_list}" ng-show="panel.field_list">
|
|
|
+ <div class="sidebar-nav">
|
|
|
+ <h5>Fields <i class=" icon-chevron-sign-left pointer " ng-click="panel.field_list = !panel.field_list" bs-tooltip="'Hide field list'" ng-show="panel.field_list"></i></h5>
|
|
|
+ <ul class="unstyled" style="height:{{row.height}};overflow-y:auto;overflow-x:hidden;">
|
|
|
+ <li ng-style="panel.style" ng-repeat="field in all_fields" >
|
|
|
+ <i class="pointer" ng-class="{'icon-check': _.contains(panel.fields,field),'icon-check-empty': !_.contains(panel.fields,field)}" ng-click="toggle_field(field)"></i>
|
|
|
+ <a data-unique="1" bs-popover="'panels/table/micropanel.html'" data-placement="right" ng-click="toggle_micropanel(field)" ng-class="{label: _.contains(panel.fields,field)}">{{field}}</a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
|
|
|
- <span class="pointer" ng-click="set_sort(field)" ng-show='panel.sortable'>
|
|
|
- {{field}}
|
|
|
- <i ng-show='field == panel.sort[0]' class="pointer link" ng-class="{'icon-chevron-up': panel.sort[1] == 'asc','icon-chevron-down': panel.sort[1] == 'desc'}"></i>
|
|
|
- </span>
|
|
|
- <span ng-show='!panel.sortable'>{{field}}</span>
|
|
|
- <i ng-show="!$last" class="pointer link icon-caret-right" ng-click="_.move(panel.fields,$index,$index+1)"></i>
|
|
|
- </th>
|
|
|
-
|
|
|
- </thead>
|
|
|
- <tbody ng-repeat="row in data | slice:panel.offset:panel.offset+panel.size" ng-class-odd="'odd'">
|
|
|
- <tr ng-click="toggle_details(row)" class="pointer">
|
|
|
- <td ng-repeat="field in panel.fields" ng-bind-html-unsafe="(row.highlight[field]||row._source[field]) | highlight"></td>
|
|
|
- </tr>
|
|
|
- <tr ng-show="row.kibana.details">
|
|
|
- <td colspan=1000>
|
|
|
- <table class='table table-bordered table-condensed'>
|
|
|
- <thead>
|
|
|
- <th>Field</th>
|
|
|
- <th>Action</th>
|
|
|
- <th>Value</th>
|
|
|
- </thead>
|
|
|
- <tr ng-repeat="(key,value) in row.kibana.details._source" ng-class-odd="'odd'">
|
|
|
- <td>{{key}}</td>
|
|
|
- <td>
|
|
|
- <i class='icon-search pointer' ng-click="build_search(key,value)"></i>
|
|
|
- <i class='icon-ban-circle pointer' ng-click="build_search(key,value,true)"></i>
|
|
|
- </td>
|
|
|
- <td>{{value}}</td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- <div class="row-fluid" ng-show="panel.paging">
|
|
|
- <div class="span1 offset3" style="text-align:right">
|
|
|
- <i ng-click="panel.offset = 0" ng-show="panel.offset > 0" class='icon-circle-arrow-left pointer'></i>
|
|
|
- <i ng-click="panel.offset = (panel.offset - panel.size)" ng-show="panel.offset > 0" class='icon-arrow-left pointer'></i>
|
|
|
</div>
|
|
|
- <div class="span4" style="text-align:center">
|
|
|
- <strong>{{panel.offset}}</strong> to <strong>{{panel.offset + data.slice(panel.offset,panel.offset+panel.size).length}}</strong>
|
|
|
- <small> of {{data.length}} available for paging</small>
|
|
|
+ </div>
|
|
|
+ <div style="{{panel.overflow}}:{{panel.height || row.height}};" ng-class="{'span9':panel.field_list,'span12':!panel.field_list}" class="table-doc-table">
|
|
|
+ <i class="pull-left icon-chevron-sign-right pointer" ng-click="panel.field_list = !panel.field_list" bs-tooltip="'Show field list'" ng-show="!panel.field_list"></i>
|
|
|
+ <div class="row-fluid" ng-show="panel.paging">
|
|
|
+ <div class="span1 offset1" style="text-align:right">
|
|
|
+ <i ng-click="panel.offset = 0" ng-show="panel.offset > 0" class='icon-circle-arrow-left pointer'></i>
|
|
|
+ <i ng-click="panel.offset = (panel.offset - panel.size)" ng-show="panel.offset > 0" class='icon-arrow-left pointer'></i>
|
|
|
+ </div>
|
|
|
+ <div class="span8" style="text-align:center">
|
|
|
+ <strong>{{panel.offset}}</strong> to <strong>{{panel.offset + data.slice(panel.offset,panel.offset+panel.size).length}}</strong>
|
|
|
+ <small> of {{data.length}} available for paging</small>
|
|
|
+ </div>
|
|
|
+ <div class="span1" style="text-align:left">
|
|
|
+ <i ng-click="panel.offset = (panel.offset + panel.size)" ng-show="data.length > panel.offset+panel.size" class='icon-arrow-right pointer'></i>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="span1" style="text-align:left">
|
|
|
- <i ng-click="panel.offset = (panel.offset + panel.size)" ng-show="data.length > panel.offset+panel.size" class='icon-arrow-right pointer'></i>
|
|
|
+ <div class="small" ng-show="panel.fields.length == 0">No columns configured. You may want to add a <strong>fields panel</strong>, or click the edit button in the top right of this panel to add some columns</div>
|
|
|
+ <table class="table-hover table table-condensed" ng-style="panel.style">
|
|
|
+ <thead ng-show="panel.header">
|
|
|
+
|
|
|
+ <th style="white-space:nowrap" ng-repeat="field in panel.fields">
|
|
|
+ <i ng-show="!$first" class="pointer link icon-caret-left" ng-click="_.move(panel.fields,$index,$index-1)"></i>
|
|
|
+
|
|
|
+ <span class="pointer" ng-click="set_sort(field)" ng-show='panel.sortable'>
|
|
|
+ {{field}}
|
|
|
+ <i ng-show='field == panel.sort[0]' class="pointer link" ng-class="{'icon-chevron-up': panel.sort[1] == 'asc','icon-chevron-down': panel.sort[1] == 'desc'}"></i>
|
|
|
+ </span>
|
|
|
+ <span ng-show='!panel.sortable'>{{field}}</span>
|
|
|
+ <i ng-show="!$last" class="pointer link icon-caret-right" ng-click="_.move(panel.fields,$index,$index+1)"></i>
|
|
|
+ </th>
|
|
|
+
|
|
|
+ </thead>
|
|
|
+ <tbody ng-repeat="row in data | slice:panel.offset:panel.offset+panel.size" ng-class-odd="'odd'">
|
|
|
+ <tr ng-click="toggle_details(row)" class="pointer">
|
|
|
+ <td ng-repeat="field in panel.fields" ng-bind-html-unsafe="(row.highlight[field]||row._source[field]) | highlight"></td>
|
|
|
+ </tr>
|
|
|
+ <tr ng-show="row.kibana.details">
|
|
|
+ <td colspan=1000>
|
|
|
+ <table class='table table-bordered table-condensed'>
|
|
|
+ <thead>
|
|
|
+ <th>Field</th>
|
|
|
+ <th>Action</th>
|
|
|
+ <th>Value</th>
|
|
|
+ </thead>
|
|
|
+ <tr ng-repeat="(key,value) in row.kibana.details._source" ng-class-odd="'odd'">
|
|
|
+ <td>{{key}}</td>
|
|
|
+ <td>
|
|
|
+ <i class='icon-search pointer' ng-click="build_search(key,value)"></i>
|
|
|
+ <i class='icon-ban-circle pointer' ng-click="build_search(key,value,true)"></i>
|
|
|
+ </td>
|
|
|
+ <td>{{value}}</td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <div class="row-fluid" ng-show="panel.paging">
|
|
|
+ <div class="span1 offset3" style="text-align:right">
|
|
|
+ <i ng-click="panel.offset = 0" ng-show="panel.offset > 0" class='icon-circle-arrow-left pointer'></i>
|
|
|
+ <i ng-click="panel.offset = (panel.offset - panel.size)" ng-show="panel.offset > 0" class='icon-arrow-left pointer'></i>
|
|
|
+ </div>
|
|
|
+ <div class="span4" style="text-align:center">
|
|
|
+ <strong>{{panel.offset}}</strong> to <strong>{{panel.offset + data.slice(panel.offset,panel.offset+panel.size).length}}</strong>
|
|
|
+ <small> of {{data.length}} available for paging</small>
|
|
|
+ </div>
|
|
|
+ <div class="span1" style="text-align:left">
|
|
|
+ <i ng-click="panel.offset = (panel.offset + panel.size)" ng-show="data.length > panel.offset+panel.size" class='icon-arrow-right pointer'></i>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|