|
|
@@ -222,9 +222,25 @@ ${layout.menubar(section='query')}
|
|
|
</li>
|
|
|
<li>
|
|
|
<div class="control-group">
|
|
|
- <button id="refresh-btn" class="btn btn-small" data-loading-text="${ _('Refreshing...') }" rel="tooltip" data-placement="right" data-original-title="${ _('Update the list of tables seen by Impala. It can take a few seconds...') }">
|
|
|
+ <button id="refresh-btn" class="btn btn-small hide" data-loading-text="${ _('Refreshing...') }" rel="tooltip" data-placement="right" data-original-title="${ _('Update the list of tables seen by Impala. It can take a few seconds...') }">
|
|
|
+ <i class="icon-refresh"></i>
|
|
|
${ _('Refresh') }
|
|
|
</button>
|
|
|
+ <span id="refresh-tip">
|
|
|
+ <i class="icon-refresh"></i>
|
|
|
+ ${ _('Sync tables tips') }
|
|
|
+ </span>
|
|
|
+ <i id="refresh-tip" onclick="$('#refresh-btn,#refresh-tip').toggle('hide')"
|
|
|
+ rel="tooltip" data-placement="right" data-original-title="${ _('Using an Impala version inferior to 1.1? Click to use the refresh button.') }"
|
|
|
+ class="icon-plus-sign-alt" style="cursor: pointer;">
|
|
|
+ </i>
|
|
|
+ <div id="refresh-content" class="hide">
|
|
|
+ <ul style="text-align: left;">
|
|
|
+ <li>"invalidate metadata" ${ _("invalidates the entire catalog metadata. All table metadata will be reloaded on the next access.") }</li>
|
|
|
+ <li>"invalidate metadata <table>" ${ _("invalidates the metadata, load on the next access") }</li>
|
|
|
+ <li>"refresh <table>" ${ _("refreshes the metadata immediately. It's an incremental refresh. Much faster") }</li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</li>
|
|
|
% endif
|
|
|
@@ -745,7 +761,8 @@ ${layout.menubar(section='query')}
|
|
|
var _before = codeMirror.getRange({line: 0, ch: 0}, {line: codeMirror.getCursor().line, ch: codeMirror.getCursor().ch}).replace(/(\r\n|\n|\r)/gm, " ");
|
|
|
CodeMirror.possibleTable = false;
|
|
|
CodeMirror.tableFieldMagic = false;
|
|
|
- if (_before.toUpperCase().indexOf(" FROM ") > -1 && _before.toUpperCase().indexOf(" ON ") == -1 && _before.toUpperCase().indexOf(" WHERE ") == -1) {
|
|
|
+ if (_before.toUpperCase().indexOf(" FROM ") > -1 && _before.toUpperCase().indexOf(" ON ") == -1 && _before.toUpperCase().indexOf(" WHERE ") == -1 ||
|
|
|
+ _before.toUpperCase().indexOf("REFRESH") > -1 || _before.toUpperCase().indexOf("METADATA") > -1 ) {
|
|
|
CodeMirror.possibleTable = true;
|
|
|
}
|
|
|
CodeMirror.possibleSoloField = false;
|
|
|
@@ -896,6 +913,13 @@ ${layout.menubar(section='query')}
|
|
|
.always(function() { $(_this).button('reset') });
|
|
|
return false;
|
|
|
});
|
|
|
+
|
|
|
+ $("#refresh-tip").popover({
|
|
|
+ 'title': "${_('Missing some tables? In order to update the list of tables/metadata seen by Impala, execute one of these queries:')}",
|
|
|
+ 'content': $("#refresh-content").html(),
|
|
|
+ 'trigger': 'hover',
|
|
|
+ 'html': true
|
|
|
+ });
|
|
|
% endif
|
|
|
});
|
|
|
|