|
|
@@ -310,27 +310,33 @@ ${_('Example: SELECT * FROM tablename, or press CTRL + space')}
|
|
|
</div>
|
|
|
|
|
|
<div style="padding-top: 10px;">
|
|
|
- <span>
|
|
|
- <a data-bind="visible: result.meta().length > 0, click: function() { $data.showGrid(true); }, css: {'active': $data.showGrid}" href="javascript:void(0)" class="btn" title="${ _('Grid') }"><i class="fa fa-th"></i></a>
|
|
|
- <a data-bind="visible: result.meta().length > 0, click: function() { $data.showChart(true); }, css: {'active': $data.showChart}" href="javascript:void(0)" class="btn" title="${ _('Chart') }"><i class="fa fa-line-chart"></i></a>
|
|
|
- </span>
|
|
|
-
|
|
|
- <a data-bind="visible: status() != 'ready', click: function() { $data.showLogs(! $data.showLogs()); }, css: {'active': $data.showLogs}" href="javascript:void(0)" class="btn" title="${ _('Logs') }"><i class="fa fa-file-text-o"></i></a>
|
|
|
-
|
|
|
- <a data-bind="visible: status() == 'available', click: function() { $data.showDownload(! $data.showDownload()); }" href="javascript:void(0)" class="btn" title="${ _('Logs') }">
|
|
|
- <i class="fa fa-arrow-circle-o-down"></i>
|
|
|
- </a>
|
|
|
-
|
|
|
- <span data-bind="visible: showDownload">
|
|
|
- <form method="POST" action="${ url('spark:download') }">
|
|
|
- ${ csrf_token(request) | n,unicode }
|
|
|
- <input type="hidden" name="notebook" data-bind="value: ko.mapping.toJSON($root.selectedNotebook)"/>
|
|
|
- <input type="hidden" name="snippet" data-bind="value: ko.mapping.toJSON($data)"/>
|
|
|
-
|
|
|
- <button class="btn" type="submit" name="csv" title="${ _('Download first rows as CSV') }"><i class="fa fa-file-o"></i></button>
|
|
|
- <button class="btn" type="submit" name="xls" title="${ _('Download first rows as XLS') }"><i class="fa fa-file-excel-o"></i></button>
|
|
|
- </form>
|
|
|
- </span>
|
|
|
+
|
|
|
+ <div class="btn-group">
|
|
|
+ <button class="btn dropdown-toggle" data-toggle="dropdown"><i data-bind="visible: $data.showGrid" class="fa fa-th"></i><i data-bind="visible: $data.showChart" class="fa fa-line-chart"></i> <i class="fa fa-caret-down"></i></button>
|
|
|
+ <ul class="dropdown-menu">
|
|
|
+ <li><a data-bind="visible: result.meta().length > 0, click: function() { $data.showGrid(true); }, css: {'active': $data.showGrid}" href="javascript:void(0)"><i class="fa fa-th"></i> ${ _('Grid') }</a></li>
|
|
|
+ <li><a data-bind="visible: result.meta().length > 0, click: function() { $data.showChart(true); }, css: {'active': $data.showChart}" href="javascript:void(0)"><i class="fa fa-line-chart"></i> ${ _('Chart') }</a></li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="pull-right">
|
|
|
+ <a data-bind="visible: status() != 'ready', click: function() { $data.showLogs(! $data.showLogs()); }, css: {'active': $data.showLogs}" href="javascript:void(0)" class="btn" title="${ _('Logs') }"><i class="fa fa-file-text-o"></i></a>
|
|
|
+
|
|
|
+ <a data-bind="visible: status() == 'available', click: function() { $data.showDownload(! $data.showDownload()); }" href="javascript:void(0)" class="btn" title="${ _('Logs') }">
|
|
|
+ <i class="fa fa-arrow-circle-o-down"></i>
|
|
|
+ </a>
|
|
|
+
|
|
|
+ <span data-bind="visible: showDownload">
|
|
|
+ <form method="POST" action="${ url('spark:download') }">
|
|
|
+ ${ csrf_token(request) | n,unicode }
|
|
|
+ <input type="hidden" name="notebook" data-bind="value: ko.mapping.toJSON($root.selectedNotebook)"/>
|
|
|
+ <input type="hidden" name="snippet" data-bind="value: ko.mapping.toJSON($data)"/>
|
|
|
+
|
|
|
+ <button class="btn" type="submit" name="csv" title="${ _('Download first rows as CSV') }"><i class="fa fa-file-o"></i></button>
|
|
|
+ <button class="btn" type="submit" name="xls" title="${ _('Download first rows as XLS') }"><i class="fa fa-file-excel-o"></i></button>
|
|
|
+ </form>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<div data-bind="visible: showLogs, css: resultsKlass">
|
|
|
@@ -342,7 +348,7 @@ ${_('Example: SELECT * FROM tablename, or press CTRL + space')}
|
|
|
<span data-bind="text: result.errors"></span>
|
|
|
</div>
|
|
|
|
|
|
- <div class="row-fluid" data-bind="visible: result.meta().length > 0 && showGrid()" style="max-height: 400px">
|
|
|
+ <div class="row-fluid" data-bind="visible: result.meta().length > 0 && showGrid()" style="max-height: 400px; margin-top: 4px">
|
|
|
<div data-bind="visible: isLeftPanelVisible, css:{'span2': isLeftPanelVisible, 'hidden': !isLeftPanelVisible()}">
|
|
|
<a title="${_('Toggle columns')}" class="pull-right pointer" style="margin:3px; margin-top:9px" data-bind="click: toggleLeftPanel">
|
|
|
<i class="fa fa-chevron-left"></i>
|
|
|
@@ -372,7 +378,7 @@ ${_('Example: SELECT * FROM tablename, or press CTRL + space')}
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="row-fluid" data-bind="visible: result.meta().length > 0 && showChart()" style="max-height: 400px">
|
|
|
+ <div class="row-fluid" data-bind="visible: result.meta().length > 0 && showChart()" style="max-height: 400px; margin-top: 4px">
|
|
|
<div data-bind="visible: isLeftPanelVisible, css:{'span2': isLeftPanelVisible, 'hidden': !isLeftPanelVisible()}">
|
|
|
|
|
|
<a title="${_('Toggle settings')}" class="pull-right pointer" style="margin:3px; margin-top:9px" data-bind="click: toggleLeftPanel">
|