Knockout is supplied from the page outside the Hue container in embedded mode and deferred updates is only available for 3.4 and above.
@@ -222,7 +222,9 @@ ${ assist.assistPanel() }
(function () {
- ko.options.deferUpdates = true;
+ if (ko.options) {
+ ko.options.deferUpdates = true;
+ }
function CreateDatabaseViewModel() {
var self = this;
@@ -545,7 +545,9 @@ ${ assist.assistPanel() }
<script type="text/javascript">
function CreateTableViewModel() {
@@ -184,7 +184,9 @@ ${ assist.assistPanel() }
function ImportWizardChooseDelimiterViewModel() {
@@ -191,7 +191,9 @@ ${ assist.assistPanel() }
function ImportWizardChooseFileViewModel() {
@@ -219,7 +219,9 @@ ${ assist.assistPanel() }
function ImportWizardDefineColumnsViewModel() {
@@ -1285,8 +1285,9 @@ ${ components.menubar(is_embeddable) }
-
$(document).ready(function () {
var options = {
@@ -554,7 +554,9 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', iconClick='$root.assi
huePubSub.subscribe('show.delete.privilege.modal', function () {
$('#deletePrivilegeModal').modal('show');
@@ -65,7 +65,9 @@ ${ assist.assistPanel() }
function AssistViewModel(options) {
@@ -37,7 +37,9 @@
%if with_deferred:
</script>
%endif
</%def>
@@ -65,7 +65,9 @@
var userGroups = [];
% for group in user.groups.all():
@@ -1036,8 +1036,9 @@ ${ assist.assistPanel() }
% endif
var MAPPINGS = {
SOLR_TO_HIVE: {
@@ -491,7 +491,9 @@ ${ assist.assistPanel() }
var fieldNum = 0;
@@ -2689,7 +2689,9 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
}
var VIEW_MODEL_OPTIONS = $.extend(${ options_json | n,unicode,antixss }, {
huePubSubId: HUE_PUB_SUB_EDITOR_ID,
@@ -178,7 +178,9 @@ ${ commonheader_m(editor_type, editor_type, user, request, "68px") | n,unicode }
${ assist.assistJSModels() }
ace.config.set("basePath", "/static/desktop/js/ace");