[editor] Fix DB selection for snippets in notebook mode
@@ -926,6 +926,7 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
<!-- ko template: { name: 'longer-operation${ suffix }' } --><!-- /ko -->
<span class="execution-timer" data-bind="visible: type() != 'text' && status() != 'ready' && status() != 'loading', text: result.executionTime().toHHMMSS()" title="${ _('Execution time') }"></span>
+ <!-- ko template: { name: 'snippet-header-database-selection' } --><!-- /ko -->
<!-- ko template: { name: 'snippet-header-statement-type${ suffix }' } --><!-- /ko -->
<a class="inactive-action move-widget" href="javascript:void(0)"><i class="fa fa-arrows"></i></a>
@@ -941,10 +942,18 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
<!-- ko template: { name: 'longer-operation${ suffix }' } --><!-- /ko -->
<span class="execution-timer" data-bind="visible: type() != 'text' && status() != 'ready' && status() != 'loading', text: result.executionTime().toHHMMSS()" title="${ _('Execution time') }"></span>
+ <!-- ko template: { name: 'snippet-header-database-selection' } --><!-- /ko -->
+ <!-- ko template: { name: 'snippet-header-statement-type${ suffix }' } --><!-- /ko -->
+
+ <a class="inactive-action margin-left-10" href="javascript:void(0)" data-bind="toggle: settingsVisible, visible: hasProperties, css: { 'blue' : settingsVisible }" title="${ _('Query settings') }"><i class="fa fa-cog"></i></a>
+ <a class="inactive-action margin-left-10 pointer" title="${ _('Show editor help') }" data-toggle="modal" data-target="#helpModal${ suffix }"><i class="fa fa-question"></i></a>
+ </div>
+</script>
+
+<script type="text/html" id="snippet-header-database-selection">
<!-- ko if: loadingContext() && isSqlDialect() -->
<i class="fa fa-spinner fa-spin muted"></i>
<!-- /ko -->
-
<!-- ko if: !loadingContext() && isSqlDialect() -->
<!-- ko if: availableComputes().length > 1 || namespaceRefreshEnabled() -->
<!-- ko if: availableComputes().length > 0-->
@@ -968,16 +977,9 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
<!-- ko if: availableDatabases().length === 0-->
<span class="editor-header-title"><i class="fa fa-warning"></i> ${ _('No databases found') }</span>
<!-- /ko -->
-
<!-- /ko -->
- <!-- ko template: { name: 'snippet-header-statement-type${ suffix }' } --><!-- /ko -->
-
- <a class="inactive-action margin-left-10" href="javascript:void(0)" data-bind="toggle: settingsVisible, visible: hasProperties, css: { 'blue' : settingsVisible }" title="${ _('Query settings') }"><i class="fa fa-cog"></i></a>
- <a class="inactive-action margin-left-10 pointer" title="${ _('Show editor help') }" data-toggle="modal" data-target="#helpModal${ suffix }"><i class="fa fa-question"></i></a>
- </div>
</script>
-
<script type="text/html" id="snippet-header-statement-type${ suffix }">
% if ENABLE_EXTERNAL_STATEMENT.get() and not IS_EMBEDDED.get():
<!-- ko if: isSqlDialect() -->
