|
@@ -1408,10 +1408,12 @@ ${ hueIcons.symbols() }
|
|
|
<!-- ko if: availableDatabases().length > 0 && isSqlDialect() -->
|
|
<!-- ko if: availableDatabases().length > 0 && isSqlDialect() -->
|
|
|
<div data-bind="component: { name: 'snippet-db-selection', params: { selectedDatabase: database, availableDatabases: availableDatabases } }" style="display: inline-block"></div>
|
|
<div data-bind="component: { name: 'snippet-db-selection', params: { selectedDatabase: database, availableDatabases: availableDatabases } }" style="display: inline-block"></div>
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ % if ENABLE_BATCH_EXECUTE.get():
|
|
|
<!-- ko if: isSqlDialect() -->
|
|
<!-- ko if: isSqlDialect() -->
|
|
|
<select class="input-medium" data-bind="options: statementTypes, value: statementType"></select>
|
|
<select class="input-medium" data-bind="options: statementTypes, value: statementType"></select>
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
|
|
+ % endif
|
|
|
|
|
|
|
|
<a class="inactive-action margin-left-10" href="javascript:void(0)" data-bind="visible: status() != 'ready' && status() != 'loading', click: function() { hideFixedHeaders(); $data.showLogs(!$data.showLogs());}, css: {'blue': $data.showLogs}" title="${ _('Show Logs') }"><i class="fa fa-file-text-o"></i></a>
|
|
<a class="inactive-action margin-left-10" href="javascript:void(0)" data-bind="visible: status() != 'ready' && status() != 'loading', click: function() { hideFixedHeaders(); $data.showLogs(!$data.showLogs());}, css: {'blue': $data.showLogs}" title="${ _('Show Logs') }"><i class="fa fa-file-text-o"></i></a>
|
|
|
<a class="inactive-action margin-left-10" href="javascript:void(0)" data-bind="toggle: settingsVisible, visible: hasProperties, css: { 'blue' : settingsVisible }" title="${ _('Settings and properties') }"><i class="fa fa-cog"></i></a>
|
|
<a class="inactive-action margin-left-10" href="javascript:void(0)" data-bind="toggle: settingsVisible, visible: hasProperties, css: { 'blue' : settingsVisible }" title="${ _('Settings and properties') }"><i class="fa fa-cog"></i></a>
|
|
@@ -2020,7 +2022,7 @@ ${ hueIcons.symbols() }
|
|
|
<a class="snippet-side-btn blue" style="cursor: default;" data-bind="visible: status() == 'loading'" title="${ _('Creating session') }">
|
|
<a class="snippet-side-btn blue" style="cursor: default;" data-bind="visible: status() == 'loading'" title="${ _('Creating session') }">
|
|
|
<i class="fa fa-fw fa-spinner fa-spin"></i>
|
|
<i class="fa fa-fw fa-spinner fa-spin"></i>
|
|
|
</a>
|
|
</a>
|
|
|
- <a class="snippet-side-btn" data-bind="click: reexecute, visible: $root.editorMode() && result.handle() && result.handle().has_more_statements, css: {'blue': $parent.history().length == 0 || $root.editorMode(), 'disabled': statement() === '' }" title="${ _('Restart from the first statement') }">
|
|
|
|
|
|
|
+ <a class="snippet-side-btn" data-bind="click: reexecute, visible: $root.editorMode() && result.handle() && result.handle().has_more_statements, css: {'blue': $parent.history().length == 0 || $root.editorMode(), 'disabled': ! isReady() }" title="${ _('Restart from the first statement') }">
|
|
|
<i class="fa fa-fw fa-repeat snippet-side-single"></i>
|
|
<i class="fa fa-fw fa-repeat snippet-side-single"></i>
|
|
|
</a>
|
|
</a>
|
|
|
<div class="label label-info" data-bind="attr: {'title':'${ _ko('Showing results of the statement #')}' + (result.statement_id() + 1)}, visible: $root.editorMode() && result.statements_count() > 1">
|
|
<div class="label label-info" data-bind="attr: {'title':'${ _ko('Showing results of the statement #')}' + (result.statement_id() + 1)}, visible: $root.editorMode() && result.statements_count() > 1">
|
|
@@ -2036,9 +2038,9 @@ ${ hueIcons.symbols() }
|
|
|
<i class="fa fa-fw fa-spinner snippet-side-single fa-spin"></i>
|
|
<i class="fa fa-fw fa-spinner snippet-side-single fa-spin"></i>
|
|
|
</a>
|
|
</a>
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
- <div class="inactive-action dropdown hover-actions pointer" data-bind="css: {'disabled': statement() === '' || status() === 'running' || status() === 'loading' }">
|
|
|
|
|
|
|
+ <div class="inactive-action dropdown hover-actions pointer" data-bind="css: {'disabled': ! isReady() || status() === 'running' || status() === 'loading' }">
|
|
|
<!-- ko if: isBatchable() && wasBatchExecuted() -->
|
|
<!-- ko if: isBatchable() && wasBatchExecuted() -->
|
|
|
- <a class="snippet-side-btn" style="padding-right:0; padding-left: 2px" href="javascript: void(0)" title="${ _('Submit all the queries as a background batch job.') }" data-bind="click: function() { wasBatchExecuted(true); execute(); }, visible: status() != 'running' && status() != 'loading', css: {'blue': $parent.history().length == 0 || $root.editorMode(), 'disabled': statement() === '' }">
|
|
|
|
|
|
|
+ <a class="snippet-side-btn" style="padding-right:0; padding-left: 2px" href="javascript: void(0)" title="${ _('Submit all the queries as a background batch job.') }" data-bind="click: function() { wasBatchExecuted(true); execute(); }, visible: status() != 'running' && status() != 'loading', css: {'blue': $parent.history().length == 0 || $root.editorMode(), 'disabled': ! isReady() }">
|
|
|
<i class="fa fa-fw fa-send"></i>
|
|
<i class="fa fa-fw fa-send"></i>
|
|
|
</a>
|
|
</a>
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
@@ -2049,17 +2051,17 @@ ${ hueIcons.symbols() }
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
% if ENABLE_BATCH_EXECUTE.get():
|
|
% if ENABLE_BATCH_EXECUTE.get():
|
|
|
<!-- ko if: isBatchable() && status() != 'running' && status() != 'loading' -->
|
|
<!-- ko if: isBatchable() && status() != 'running' && status() != 'loading' -->
|
|
|
- <a class="dropdown-toggle snippet-side-btn" style="padding:0" data-toggle="dropdown" href="javascript: void(0)" data-bind="css: {'disabled': statement() === '', 'blue': currentQueryTab() == 'queryExplain' }">
|
|
|
|
|
|
|
+ <a class="dropdown-toggle snippet-side-btn" style="padding:0" data-toggle="dropdown" href="javascript: void(0)" data-bind="css: {'disabled': ! isReady(), 'blue': currentQueryTab() == 'queryExplain' }">
|
|
|
<i class="fa fa-caret-down"></i>
|
|
<i class="fa fa-caret-down"></i>
|
|
|
</a>
|
|
</a>
|
|
|
<ul class="dropdown-menu less-padding">
|
|
<ul class="dropdown-menu less-padding">
|
|
|
<li>
|
|
<li>
|
|
|
- <a href="javascript:void(0)" data-bind="click: function() { wasBatchExecuted(false); $('.dropdown-toggle').dropdown('toggle'); execute(); }, style: { color: statement() === '' || status() === 'running' || status() === 'loading' ? '#999' : ''}, css: {'disabled': statement() === '' || status() === 'running' || status() === 'loading' }" title="${ _('Execute interactively the current statement') }">
|
|
|
|
|
|
|
+ <a href="javascript:void(0)" data-bind="click: function() { wasBatchExecuted(false); $('.dropdown-toggle').dropdown('toggle'); execute(); }, style: { color: ! isReady() || status() === 'running' || status() === 'loading' ? '#999' : ''}, css: {'disabled': ! isReady() || status() === 'running' || status() === 'loading' }" title="${ _('Execute interactively the current statement') }">
|
|
|
<i class="fa fa-fw fa-play"></i> ${_('Execute')}
|
|
<i class="fa fa-fw fa-play"></i> ${_('Execute')}
|
|
|
</a>
|
|
</a>
|
|
|
</li>
|
|
</li>
|
|
|
<li>
|
|
<li>
|
|
|
- <a href="javascript:void(0)" data-bind="click: function() { wasBatchExecuted(true); $('.dropdown-toggle').dropdown('toggle'); execute(); }, css: {'disabled': statement() === '' }" title="${ _('Submit all the queries as a background batch job.') }">
|
|
|
|
|
|
|
+ <a href="javascript:void(0)" data-bind="click: function() { wasBatchExecuted(true); $('.dropdown-toggle').dropdown('toggle'); execute(); }, css: {'disabled': ! isReady() }" title="${ _('Submit all the queries as a background batch job.') }">
|
|
|
<i class="fa fa-fw fa-send"></i> ${_('Batch')}
|
|
<i class="fa fa-fw fa-send"></i> ${_('Batch')}
|
|
|
</a>
|
|
</a>
|
|
|
</li>
|
|
</li>
|
|
@@ -2069,28 +2071,28 @@ ${ hueIcons.symbols() }
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- ko if: isSqlDialect -->
|
|
<!-- ko if: isSqlDialect -->
|
|
|
- <div class="inactive-action dropdown hover-actions pointer" data-bind="css: {'disabled': statement() === '' || status() === 'running' || status() === 'loading' }">
|
|
|
|
|
- <a class="snippet-side-btn" style="padding-right:0; padding-left: 2px;" href="javascript: void(0)" data-bind="click: explain, css: {'disabled': statement() === '' || status() === 'running' || status() === 'loading', 'blue': currentQueryTab() == 'queryExplain' }" title="${ _('Explain the current SQL query') }">
|
|
|
|
|
|
|
+ <div class="inactive-action dropdown hover-actions pointer" data-bind="css: {'disabled': ! isReady() || status() === 'running' || status() === 'loading' }">
|
|
|
|
|
+ <a class="snippet-side-btn" style="padding-right:0; padding-left: 2px;" href="javascript: void(0)" data-bind="click: explain, css: {'disabled': ! isReady() || status() === 'running' || status() === 'loading', 'blue': currentQueryTab() == 'queryExplain' }" title="${ _('Explain the current SQL query') }">
|
|
|
<i class="fa fa-fw fa-map-o"></i>
|
|
<i class="fa fa-fw fa-map-o"></i>
|
|
|
</a>
|
|
</a>
|
|
|
- <a class="dropdown-toggle snippet-side-btn" style="padding:0" data-toggle="dropdown" href="javascript: void(0)" data-bind="css: {'disabled': statement() === '', 'blue': currentQueryTab() == 'queryExplain' }">
|
|
|
|
|
|
|
+ <a class="dropdown-toggle snippet-side-btn" style="padding:0" data-toggle="dropdown" href="javascript: void(0)" data-bind="css: {'disabled': ! isReady(), 'blue': currentQueryTab() == 'queryExplain' }">
|
|
|
<i class="fa fa-caret-down"></i>
|
|
<i class="fa fa-caret-down"></i>
|
|
|
</a>
|
|
</a>
|
|
|
<ul class="dropdown-menu less-padding">
|
|
<ul class="dropdown-menu less-padding">
|
|
|
<li>
|
|
<li>
|
|
|
- <a href="javascript:void(0)" data-bind="click: explain, style: { color: statement() === '' || status() === 'running' || status() === 'loading' ? '#999' : ''}, css: {'disabled': statement() === '' || status() === 'running' || status() === 'loading' }" title="${ _('Explain the current SQL query') }">
|
|
|
|
|
|
|
+ <a href="javascript:void(0)" data-bind="click: explain, style: { color: ! isReady() || status() === 'running' || status() === 'loading' ? '#999' : ''}, css: {'disabled': ! isReady() || status() === 'running' || status() === 'loading' }" title="${ _('Explain the current SQL query') }">
|
|
|
<i class="fa fa-fw fa-map-o"></i> ${_('Explain')}
|
|
<i class="fa fa-fw fa-map-o"></i> ${_('Explain')}
|
|
|
</a>
|
|
</a>
|
|
|
</li>
|
|
</li>
|
|
|
<!-- ko if: formatEnabled -->
|
|
<!-- ko if: formatEnabled -->
|
|
|
<li>
|
|
<li>
|
|
|
- <a href="javascript:void(0)" data-bind="click: format, css: {'disabled': statement() === '' }" title="${ _('Format the current SQL query') }">
|
|
|
|
|
|
|
+ <a href="javascript:void(0)" data-bind="click: format, css: {'disabled': ! isReady() }" title="${ _('Format the current SQL query') }">
|
|
|
<i class="fa fa-fw fa-indent"></i> ${_('Format')}
|
|
<i class="fa fa-fw fa-indent"></i> ${_('Format')}
|
|
|
</a>
|
|
</a>
|
|
|
</li>
|
|
</li>
|
|
|
<!-- /ko -->
|
|
<!-- /ko -->
|
|
|
<li>
|
|
<li>
|
|
|
- <a href="javascript:void(0)" data-bind="click: clear, css: {'disabled': statement() === '' }" title="${ _('Clear the current editor') }">
|
|
|
|
|
|
|
+ <a href="javascript:void(0)" data-bind="click: clear, css: {'disabled': ! isReady() }" title="${ _('Clear the current editor') }">
|
|
|
<i class="fa fa-fw fa-eraser"></i> ${_('Clear')}
|
|
<i class="fa fa-fw fa-eraser"></i> ${_('Clear')}
|
|
|
</a>
|
|
</a>
|
|
|
</li>
|
|
</li>
|