|
@@ -102,7 +102,7 @@ ${ components.menubar(is_embeddable) }
|
|
|
<!-- ko if: editingTable -->
|
|
<!-- ko if: editingTable -->
|
|
|
<!-- ko with: table -->
|
|
<!-- ko with: table -->
|
|
|
<li class="editable-breadcrumb-input">
|
|
<li class="editable-breadcrumb-input">
|
|
|
- <input type="text" data-bind="hivechooser: {data: name, database: $parent.name, skipColumns: true, searchEverywhere: true, onChange: function(val){ $parent.setTableByName(val); $parent.editingTable(false); }, apiHelperUser: '${ user }', apiHelperType: 'hive'}" autocomplete="off" />
|
|
|
|
|
|
|
+ <input type="text" data-bind="hivechooser: {data: name, database: $parent.name, skipColumns: true, searchEverywhere: true, onChange: function(val){ $parent.setTableByName(val); $parent.editingTable(false); }, apiHelperUser: '${ user }', apiHelperType: sourceType()}" autocomplete="off" />
|
|
|
</li>
|
|
</li>
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
@@ -206,7 +206,7 @@ ${ components.menubar(is_embeddable) }
|
|
|
<td data-bind="text: $index() + 1"></td>
|
|
<td data-bind="text: $index() + 1"></td>
|
|
|
<td title="${_('Query partition data')}">
|
|
<td title="${_('Query partition data')}">
|
|
|
<!-- ko if: IS_HUE_4 -->
|
|
<!-- ko if: IS_HUE_4 -->
|
|
|
- <a data-bind="click: function() { queryAndWatch(notebookUrl); }, text: '[\'' + columns.join('\',\'') + '\']'" href="javascript:void(0)"></a>
|
|
|
|
|
|
|
+ <a data-bind="click: function() { queryAndWatch(notebookUrl, sourceType()); }, text: '[\'' + columns.join('\',\'') + '\']'" href="javascript:void(0)"></a>
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
<!-- ko if: ! IS_HUE_4 -->
|
|
<!-- ko if: ! IS_HUE_4 -->
|
|
|
<a data-bind="attr: {'href': readUrl }, text: '[\'' + columns.join('\',\'') + '\']'"></a>
|
|
<a data-bind="attr: {'href': readUrl }, text: '[\'' + columns.join('\',\'') + '\']'"></a>
|
|
@@ -428,7 +428,7 @@ ${ components.menubar(is_embeddable) }
|
|
|
<!-- ko if: $root.navigatorEnabled() -->
|
|
<!-- ko if: $root.navigatorEnabled() -->
|
|
|
<h4>${ _('Tags') }</h4>
|
|
<h4>${ _('Tags') }</h4>
|
|
|
<div style="margin-top: 5px" data-bind="component: { name: 'nav-tags', params: {
|
|
<div style="margin-top: 5px" data-bind="component: { name: 'nav-tags', params: {
|
|
|
- sourceType: 'hive',
|
|
|
|
|
|
|
+ sourceType: sourceType(),
|
|
|
database: db_name
|
|
database: db_name
|
|
|
} }"></div>
|
|
} }"></div>
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
@@ -452,7 +452,7 @@ ${ components.menubar(is_embeddable) }
|
|
|
<div class="actionbar-actions" data-bind="visible: tables().length > 0, dockable: { scrollable: '${ MAIN_SCROLLABLE }', nicescroll: true, jumpCorrection: 5 }">
|
|
<div class="actionbar-actions" data-bind="visible: tables().length > 0, dockable: { scrollable: '${ MAIN_SCROLLABLE }', nicescroll: true, jumpCorrection: 5 }">
|
|
|
<input class="input-xlarge search-query margin-left-10" type="text" placeholder="${ _('Search for a table...') }" data-bind="clearable: tableQuery, value: tableQuery, valueUpdate: 'afterkeydown'"/>
|
|
<input class="input-xlarge search-query margin-left-10" type="text" placeholder="${ _('Search for a table...') }" data-bind="clearable: tableQuery, value: tableQuery, valueUpdate: 'afterkeydown'"/>
|
|
|
<button class="btn toolbarBtn margin-left-20" title="${_('Browse the selected table')}" data-bind="click: function () { setTable(selectedTables()[0]); selectedTables([]); }, disable: selectedTables().length !== 1"><i class="fa fa-eye"></i> ${_('View')}</button>
|
|
<button class="btn toolbarBtn margin-left-20" title="${_('Browse the selected table')}" data-bind="click: function () { setTable(selectedTables()[0]); selectedTables([]); }, disable: selectedTables().length !== 1"><i class="fa fa-eye"></i> ${_('View')}</button>
|
|
|
- <button class="btn toolbarBtn" title="${_('Query the selected table')}" data-bind="click: function () { IS_HUE_4 ? queryAndWatch('/notebook/browse/' + name + '/' + selectedTables()[0].name + '/') : location.href = '/notebook/browse/' + name + '/' + selectedTables()[0].name; }, disable: selectedTables().length !== 1">
|
|
|
|
|
|
|
+ <button class="btn toolbarBtn" title="${_('Query the selected table')}" data-bind="click: function () { IS_HUE_4 ? queryAndWatch('/notebook/browse/' + name + '/' + selectedTables()[0].name + '/', sourceType()) : location.href = '/notebook/browse/' + name + '/' + selectedTables()[0].name; }, disable: selectedTables().length !== 1">
|
|
|
<i class="fa fa-play fa-fw"></i> ${_('Query')}
|
|
<i class="fa fa-play fa-fw"></i> ${_('Query')}
|
|
|
</button>
|
|
</button>
|
|
|
% if has_write_access:
|
|
% if has_write_access:
|
|
@@ -610,7 +610,7 @@ ${ components.menubar(is_embeddable) }
|
|
|
<!-- ko with: table -->
|
|
<!-- ko with: table -->
|
|
|
% if USE_NEW_EDITOR.get():
|
|
% if USE_NEW_EDITOR.get():
|
|
|
<!-- ko if: IS_HUE_4 -->
|
|
<!-- ko if: IS_HUE_4 -->
|
|
|
- <a class="inactive-action" data-bind="tooltip: { placement: 'bottom', delay: 750 }, click: function() { queryAndWatch('/notebook/browse/' + database.name + '/' + name + '/'); }" title="${_('Query the table')}" href="javascript:void(0)"><i class="fa fa-play fa-fw"></i></a>
|
|
|
|
|
|
|
+ <a class="inactive-action" data-bind="tooltip: { placement: 'bottom', delay: 750 }, click: function() { queryAndWatch('/notebook/browse/' + database.name + '/' + name + '/', sourceType()); }" title="${_('Query the table')}" href="javascript:void(0)"><i class="fa fa-play fa-fw"></i></a>
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
<!-- ko if: ! IS_HUE_4 -->
|
|
<!-- ko if: ! IS_HUE_4 -->
|
|
|
<a class="inactive-action" data-bind="tooltip: { placement: 'bottom', delay: 750 }, attr: { 'href': '/notebook/browse/' + database.name + '/' + name }" title="${_('Query the table')}"><i class="fa fa-play fa-fw"></i></a>
|
|
<a class="inactive-action" data-bind="tooltip: { placement: 'bottom', delay: 750 }, attr: { 'href': '/notebook/browse/' + database.name + '/' + name }" title="${_('Query the table')}"><i class="fa fa-play fa-fw"></i></a>
|
|
@@ -1197,10 +1197,10 @@ ${ components.menubar(is_embeddable) }
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- function queryAndWatch(url) {
|
|
|
|
|
|
|
+ function queryAndWatch(url, sourceType) {
|
|
|
$.post(url, {
|
|
$.post(url, {
|
|
|
format: "json",
|
|
format: "json",
|
|
|
- sourceType: '${ source_type }'
|
|
|
|
|
|
|
+ sourceType: sourceType
|
|
|
},function(resp) {
|
|
},function(resp) {
|
|
|
if (resp.history_uuid) {
|
|
if (resp.history_uuid) {
|
|
|
huePubSub.publish('open.editor.query', resp.history_uuid);
|
|
huePubSub.publish('open.editor.query', resp.history_uuid);
|