|
@@ -39,6 +39,13 @@ const TEMPLATE = `
|
|
|
<i class="fa fa-fw fa-map-o"></i> ${I18n('Explain')}
|
|
<i class="fa fa-fw fa-map-o"></i> ${I18n('Explain')}
|
|
|
</a>
|
|
</a>
|
|
|
</li>
|
|
</li>
|
|
|
|
|
+ <li>
|
|
|
|
|
+ <a href="javascript:void(0)" data-bind="click: format, css: { 'disabled': !createGistEnabled() }" title="${I18n(
|
|
|
|
|
+ 'Create a gist link for sharing the selected SQL queries'
|
|
|
|
|
+ )}">
|
|
|
|
|
+ <i class="fa fa-wf fa-link"></i> ${I18n('Share')}
|
|
|
|
|
+ </a>
|
|
|
|
|
+ </li>
|
|
|
<li>
|
|
<li>
|
|
|
<a href="javascript:void(0)" data-bind="click: format, css: { 'disabled': !formatEnabled() }" title="${I18n(
|
|
<a href="javascript:void(0)" data-bind="click: format, css: { 'disabled': !formatEnabled() }" title="${I18n(
|
|
|
'Format the current SQL query'
|
|
'Format the current SQL query'
|
|
@@ -93,6 +100,8 @@ class SnippetEditorActions {
|
|
|
() => this.snippet.type() === 'hive' || this.snippet.type() === 'impala'
|
|
() => this.snippet.type() === 'hive' || this.snippet.type() === 'impala'
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
|
|
+ this.createGistEnabled = ko.pureComputed(() => this.snippet.statement() !== '');
|
|
|
|
|
+
|
|
|
this.explainEnabled = ko.pureComputed(
|
|
this.explainEnabled = ko.pureComputed(
|
|
|
() =>
|
|
() =>
|
|
|
this.snippet.isReady() &&
|
|
this.snippet.isReady() &&
|