|
@@ -103,6 +103,12 @@ from desktop.views import commonheader, commonfooter, _ko
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
|
|
|
|
|
|
|
+ <!-- ko if: $root.collection.engine() != 'solr' -->
|
|
|
|
|
+ <!-- ko if: columns().length == 0 -->
|
|
|
|
|
+ <input type="text" class="no-margin" data-bind="value: $root.collection.name, hivechooser: $root.collection.name, skipColumns: true" placeholder="${ _('Table name or <database>.<table>') }">
|
|
|
|
|
+ <!-- /ko -->
|
|
|
|
|
+ <!-- /ko -->
|
|
|
|
|
+
|
|
|
<select data-bind="options: $root.availableDateFields, value: collection.timeFilter.field, optionsValue: 'name', visible: $root.isEditing() && $root.availableDateFields().length > 0" class="input-medium" style="margin-left: 4px"></select>
|
|
<select data-bind="options: $root.availableDateFields, value: collection.timeFilter.field, optionsValue: 'name', visible: $root.isEditing() && $root.availableDateFields().length > 0" class="input-medium" style="margin-left: 4px"></select>
|
|
|
<span class="time-filter" data-bind="template: {name: 'time-filter'}, visible: collection.timeFilter.type() == 'rolling'"></span>
|
|
<span class="time-filter" data-bind="template: {name: 'time-filter'}, visible: collection.timeFilter.type() == 'rolling'"></span>
|
|
|
<span class="time-fixed-filter" data-bind="template: {name: 'time-fixed-filter'}, visible: collection.timeFilter.type() == 'fixed'"></span>
|
|
<span class="time-fixed-filter" data-bind="template: {name: 'time-fixed-filter'}, visible: collection.timeFilter.type() == 'fixed'"></span>
|
|
@@ -110,12 +116,6 @@ from desktop.views import commonheader, commonfooter, _ko
|
|
|
<!-- ko if: $root.collection.engine() == 'solr' -->
|
|
<!-- ko if: $root.collection.engine() == 'solr' -->
|
|
|
<span data-bind="template: {name: 'nested-document-filter'}"></span>
|
|
<span data-bind="template: {name: 'nested-document-filter'}"></span>
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
-
|
|
|
|
|
- <!-- ko if: $root.collection.engine() != 'solr' -->
|
|
|
|
|
- <!-- ko if: columns().length == 0 -->
|
|
|
|
|
- <input type="text" class="no-margin" data-bind="value: $root.collection.name, hivechooser: $root.collection.name, skipColumns: true" placeholder="${ _('Table name or <database>.<table>') }">
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
- <!-- /ko -->
|
|
|
|
|
</form>
|
|
</form>
|
|
|
|
|
|
|
|
<form class="form-search" style="margin: 0" data-bind="submit: searchBtn, visible: columns().length != 0">
|
|
<form class="form-search" style="margin: 0" data-bind="submit: searchBtn, visible: columns().length != 0">
|
|
@@ -2487,6 +2487,7 @@ ${ dashboard.layout_skeleton() }
|
|
|
<fieldset>
|
|
<fieldset>
|
|
|
<legend><i class="fa fa-cogs"></i> ${ _('General settings') }</legend>
|
|
<legend><i class="fa fa-cogs"></i> ${ _('General settings') }</legend>
|
|
|
<!-- ko if: $root.initial.inited() -->
|
|
<!-- ko if: $root.initial.inited() -->
|
|
|
|
|
+
|
|
|
<!-- ko if: $root.collection.engine() == 'solr' -->
|
|
<!-- ko if: $root.collection.engine() == 'solr' -->
|
|
|
<div class="control-group">
|
|
<div class="control-group">
|
|
|
<label class="control-label" for="settingssolrindex">${ _('Solr index') }</label>
|
|
<label class="control-label" for="settingssolrindex">${ _('Solr index') }</label>
|
|
@@ -2495,12 +2496,23 @@ ${ dashboard.layout_skeleton() }
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
|
|
+ <!-- ko if: $root.collection.engine() != 'solr' -->
|
|
|
|
|
+ <div class="control-group">
|
|
|
|
|
+ <label class="control-label" for="settingssolrindex">${ _('Solr index') }</label>
|
|
|
|
|
+ <div class="controls">
|
|
|
|
|
+ <input type="text" class="no-margin" data-bind="value: $root.collection.name, hivechooser: $root.collection.name, skipColumns: true" placeholder="${ _('Table name or <database>.<table>') }">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- /ko -->
|
|
|
|
|
+
|
|
|
<div class="control-group">
|
|
<div class="control-group">
|
|
|
<label class="control-label" for="settingsdescription">${ _('Description') }</label>
|
|
<label class="control-label" for="settingsdescription">${ _('Description') }</label>
|
|
|
<div class="controls">
|
|
<div class="controls">
|
|
|
<input id="settingsdescription" type="text" class="input-xlarge" data-bind="textInput: $root.collection.description, tagsNotAllowed" style="margin-bottom: 0" />
|
|
<input id="settingsdescription" type="text" class="input-xlarge" data-bind="textInput: $root.collection.description, tagsNotAllowed" style="margin-bottom: 0" />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- ko if: $root.collection.engine() == 'solr' -->
|
|
|
<div class="control-group">
|
|
<div class="control-group">
|
|
|
<label class="control-label">${ _('Autocomplete') }</label>
|
|
<label class="control-label">${ _('Autocomplete') }</label>
|
|
|
<div class="controls">
|
|
<div class="controls">
|
|
@@ -2527,6 +2539,8 @@ ${ dashboard.layout_skeleton() }
|
|
|
</div>
|
|
</div>
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
|
|
+
|
|
|
|
|
+ <!-- /ko -->
|
|
|
</fieldset>
|
|
</fieldset>
|
|
|
</form>
|
|
</form>
|
|
|
</div>
|
|
</div>
|
|
@@ -3533,7 +3547,7 @@ $(document).ready(function () {
|
|
|
|
|
|
|
|
var _refreshTimeout = null;
|
|
var _refreshTimeout = null;
|
|
|
|
|
|
|
|
- viewModel.collection.autorefresh.subscribe(function (value) {
|
|
|
|
|
|
|
+ viewModel.collection.autorefresh.subscribe(function (value) {
|
|
|
if (value) {
|
|
if (value) {
|
|
|
refresh();
|
|
refresh();
|
|
|
}
|
|
}
|
|
@@ -3542,6 +3556,13 @@ $(document).ready(function () {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ viewModel.collection.autorefreshSeconds.subscribe(function (value) {
|
|
|
|
|
+ if (viewModel.collection.autorefresh()) {
|
|
|
|
|
+ window.clearTimeout(_refreshTimeout);
|
|
|
|
|
+ refresh();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
if (viewModel.collection.autorefresh()) {
|
|
if (viewModel.collection.autorefresh()) {
|
|
|
refresh();
|
|
refresh();
|
|
|
}
|
|
}
|