|
@@ -68,11 +68,20 @@ const TEMPLATE = `
|
|
|
params: {
|
|
params: {
|
|
|
gridSideBtn: false,
|
|
gridSideBtn: false,
|
|
|
snippet: $data,
|
|
snippet: $data,
|
|
|
- notebook: $parent
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ notebook: $parent
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
" style="display:inline-block;"></div>
|
|
" style="display:inline-block;"></div>
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
|
|
+
|
|
|
|
|
+ <!-- ko if: streaming -->
|
|
|
|
|
+ <form autocomplete="off" class="inline-block">
|
|
|
|
|
+ <input class="input-small search-input" style="margin-left: 10px;" type="text" ${ window.PREVENT_AUTOFILL_INPUT_ATTRS } placeholder="${ I18n('Live filter') }" data-bind="
|
|
|
|
|
+ textInput: filter,
|
|
|
|
|
+ clearable: filter
|
|
|
|
|
+ "/>
|
|
|
|
|
+ </form>
|
|
|
|
|
+ <!-- /ko -->
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="split-result-container">
|
|
<div class="split-result-container">
|
|
@@ -152,7 +161,7 @@ const TEMPLATE = `
|
|
|
onPosition: function() { redrawFixedHeaders(); }
|
|
onPosition: function() { redrawFixedHeaders(); }
|
|
|
}
|
|
}
|
|
|
"><div class="resize-bar"></div></div>
|
|
"><div class="resize-bar"></div></div>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<div class="split-result-content" data-bind="delayedOverflow: 'slow', css: resultsKlass">
|
|
<div class="split-result-content" data-bind="delayedOverflow: 'slow', css: resultsKlass">
|
|
|
<table class="table table-condensed resultTable">
|
|
<table class="table table-condensed resultTable">
|
|
|
<thead>
|
|
<thead>
|
|
@@ -161,7 +170,7 @@ const TEMPLATE = `
|
|
|
text: ($index() == 0 ? ' ' : $data.name),
|
|
text: ($index() == 0 ? ' ' : $data.name),
|
|
|
css: typeof cssClass != 'undefined' ? cssClass : 'sort-string',
|
|
css: typeof cssClass != 'undefined' ? cssClass : 'sort-string',
|
|
|
attr: { title: $data.type },
|
|
attr: { title: $data.type },
|
|
|
- style: {
|
|
|
|
|
|
|
+ style: {
|
|
|
'width': $index() == 0 ? '1%' : '',
|
|
'width': $index() == 0 ? '1%' : '',
|
|
|
'height': $index() == 0 ? '32px' : ''
|
|
'height': $index() == 0 ? '32px' : ''
|
|
|
},
|
|
},
|
|
@@ -196,6 +205,14 @@ class ResultGrid extends DisposableComponent {
|
|
|
this.fetchResult = params.fetchResult;
|
|
this.fetchResult = params.fetchResult;
|
|
|
this.streaming = params.streaming;
|
|
this.streaming = params.streaming;
|
|
|
|
|
|
|
|
|
|
+ this.filter = ko.observable().extend({ throttle: 100 });
|
|
|
|
|
+
|
|
|
|
|
+ this.filter.subscribe(filter => {
|
|
|
|
|
+ if (this.hueDatatable) {
|
|
|
|
|
+ this.hueDatatable.setFilter(filter);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
const trackedObservables = {
|
|
const trackedObservables = {
|
|
|
columnsVisible: false,
|
|
columnsVisible: false,
|
|
|
isMetaFilterVisible: false
|
|
isMetaFilterVisible: false
|
|
@@ -400,6 +417,9 @@ class ResultGrid extends DisposableComponent {
|
|
|
$resultTable.addClass('dt');
|
|
$resultTable.addClass('dt');
|
|
|
|
|
|
|
|
this.hueDatatable = this.createHueDatatable($resultTable);
|
|
this.hueDatatable = this.createHueDatatable($resultTable);
|
|
|
|
|
+ if (this.filter()) {
|
|
|
|
|
+ this.hueDatatable.setFilter(this.filter());
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
const $dataTablesWrapper = $resultTable.parents('.dataTables_wrapper');
|
|
const $dataTablesWrapper = $resultTable.parents('.dataTables_wrapper');
|
|
|
|
|
|
|
@@ -579,7 +599,7 @@ class ResultGrid extends DisposableComponent {
|
|
|
dataTable = this.createDatatable();
|
|
dataTable = this.createDatatable();
|
|
|
$resultTable.data('rendered', true);
|
|
$resultTable.data('rendered', true);
|
|
|
} else {
|
|
} else {
|
|
|
- dataTable = $resultTable.hueDataTable();
|
|
|
|
|
|
|
+ dataTable = this.hueDatatable;
|
|
|
}
|
|
}
|
|
|
try {
|
|
try {
|
|
|
dataTable.fnAddData(
|
|
dataTable.fnAddData(
|