|
|
@@ -304,33 +304,48 @@ ${_('Example: SELECT * FROM tablename, or press CTRL + space')}
|
|
|
<textarea data-bind="value: statement_raw, codemirror: { 'id': id(), 'viewportMargin': Infinity, 'lineNumbers': true, 'matchBrackets': true, 'mode': editorMode(), 'enter': execute }"></textarea>
|
|
|
<a href="javascript:void(0)" data-bind="click: execute, visible: status() != 'running'" class="btn codeMirror-overlaybtn">${ _('Go!') }</a>
|
|
|
<a href="javascript:void(0)" data-bind="click: cancel, visible: status() == 'running'" class="btn codeMirror-overlaybtn">${ _('Cancel') }</a>
|
|
|
- <div class="progress" data-bind="css:{'progress-neutral': progress() == 0, 'progress-warning': progress() > 0 && progress() < 100, 'progress-success': progress() == 100}" style="height: 1px">
|
|
|
+ <div class="progress" data-bind="css: {'progress-neutral': progress() == 0, 'progress-warning': progress() > 0 && progress() < 100, 'progress-success': progress() == 100}" style="height: 1px">
|
|
|
<div class="bar" data-bind="style: {'width': progress() + '%'}"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div style="padding-top: 10px;">
|
|
|
-
|
|
|
- <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>
|
|
|
- <div class="btn-group" data-bind="visible: result.meta().length > 0">
|
|
|
- <button class="btn dropdown-toggle" style="height: 31px" data-bind="css: {'active': $data.showChart}" data-toggle="dropdown"><i class="hcha hcha-bar-chart" data-bind="visible: chartType() == ko.HUE_CHARTS.TYPES.BARCHART"></i><i class="hcha hcha-line-chart" data-bind="visible: chartType() == ko.HUE_CHARTS.TYPES.LINECHART"></i><i class="hcha hcha-pie-chart" data-bind="visible: chartType() == ko.HUE_CHARTS.TYPES.PIECHART"></i><i class="hcha hcha-map-chart" data-bind="visible: chartType() == ko.HUE_CHARTS.TYPES.MAP"></i> <i class="fa fa-caret-down"></i></button>
|
|
|
+ <a data-bind="visible: result.hasSomeResults(), click: function() { $data.showGrid(true); }, css: {'active': $data.showGrid}" href="javascript:void(0)" class="btn" title="${ _('Grid') }"><i class="fa fa-th"></i></a>
|
|
|
+ <div class="btn-group" data-bind="visible: result.hasSomeResults()">
|
|
|
+ <button class="btn dropdown-toggle" style="height: 31px" data-bind="css: {'active': $data.showChart}" data-toggle="dropdown">
|
|
|
+ <i class="hcha hcha-bar-chart" data-bind="visible: chartType() == ko.HUE_CHARTS.TYPES.BARCHART"></i>
|
|
|
+ <i class="hcha hcha-line-chart" data-bind="visible: chartType() == ko.HUE_CHARTS.TYPES.LINECHART"></i>
|
|
|
+ <i class="hcha hcha-pie-chart" data-bind="visible: chartType() == ko.HUE_CHARTS.TYPES.PIECHART"></i>
|
|
|
+ <i class="hcha hcha-map-chart" data-bind="visible: chartType() == ko.HUE_CHARTS.TYPES.MAP"></i>
|
|
|
+ <i class="fa fa-caret-down"></i>
|
|
|
+ </button>
|
|
|
<ul class="dropdown-menu">
|
|
|
- <li><a href="javascript:void(0)" data-bind="css: {'active': chartType() == ko.HUE_CHARTS.TYPES.BARCHART}, click: function(){ $data.showChart(true); chartType(ko.HUE_CHARTS.TYPES.BARCHART); }"><i class="hcha hcha-bar-chart"></i> ${_('Bars')}</a></li>
|
|
|
- <li><a href="javascript:void(0)" data-bind="css: {'active': chartType() == ko.HUE_CHARTS.TYPES.LINECHART}, click: function(){ $data.showChart(true); chartType(ko.HUE_CHARTS.TYPES.LINECHART); }"><i class="hcha hcha-line-chart"></i> ${_('Lines')}</a></li>
|
|
|
- <li><a href="javascript:void(0)" data-bind="css: {'active': chartType() == ko.HUE_CHARTS.TYPES.PIECHART}, click: function(){ $data.showChart(true); chartType(ko.HUE_CHARTS.TYPES.PIECHART); }"><i class="hcha hcha-pie-chart"></i> ${_('Pie')}</a></li>
|
|
|
- <li><a href="javascript:void(0)" data-bind="css: {'active': chartType() == ko.HUE_CHARTS.TYPES.MAP}, click: function(){ $data.showChart(true); chartType(ko.HUE_CHARTS.TYPES.MAP); }"><i class="hcha hcha-map-chart"></i> ${_('Map')}</a></li>
|
|
|
+ <li><a href="javascript:void(0)" data-bind="css: {'active': chartType() == ko.HUE_CHARTS.TYPES.BARCHART}, click: function(){ $data.showChart(true); chartType(ko.HUE_CHARTS.TYPES.BARCHART); }">
|
|
|
+ <i class="hcha hcha-bar-chart"></i> ${_('Bars')}</a>
|
|
|
+ </li>
|
|
|
+ <li><a href="javascript:void(0)" data-bind="css: {'active': chartType() == ko.HUE_CHARTS.TYPES.LINECHART}, click: function(){ $data.showChart(true); chartType(ko.HUE_CHARTS.TYPES.LINECHART); }">
|
|
|
+ <i class="hcha hcha-line-chart"></i> ${_('Lines')}</a>
|
|
|
+ </li>
|
|
|
+ <li><a href="javascript:void(0)" data-bind="css: {'active': chartType() == ko.HUE_CHARTS.TYPES.PIECHART}, click: function(){ $data.showChart(true); chartType(ko.HUE_CHARTS.TYPES.PIECHART); }">
|
|
|
+ <i class="hcha hcha-pie-chart"></i> ${_('Pie')}</a>
|
|
|
+ </li>
|
|
|
+ <li><a href="javascript:void(0)" data-bind="css: {'active': chartType() == ko.HUE_CHARTS.TYPES.MAP}, click: function(){ $data.showChart(true); chartType(ko.HUE_CHARTS.TYPES.MAP); }">
|
|
|
+ <i class="hcha hcha-map-chart"></i> ${_('Map')}</a>
|
|
|
+ </li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
|
|
|
<div class="pull-right">
|
|
|
- <a data-bind="visible: status() != 'ready', click: function() { $data.showLogs(! $data.showLogs()); window.setTimeout(redrawFixedHeaders, 100); }, 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>
|
|
|
+ <a data-bind="visible: status() != 'ready', click: function() { $data.showLogs(! $data.showLogs()); window.setTimeout(redrawFixedHeaders, 100); }, 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-download"></i>
|
|
|
+ </a>
|
|
|
|
|
|
- <span data-bind="visible: showDownload">
|
|
|
+ <span data-bind="visible: showDownload() && result.hasSomeResults()">
|
|
|
<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)"/>
|
|
|
@@ -351,12 +366,21 @@ ${_('Example: SELECT * FROM tablename, or press CTRL + space')}
|
|
|
<div data-bind="visible: result.errors().length > 0, css: resultsKlass">
|
|
|
<span data-bind="text: result.errors"></span>
|
|
|
</div>
|
|
|
+
|
|
|
+ <div data-bind="visible: ! result.hasResultset() && status() == 'available', css: resultsKlass">
|
|
|
+ ${ _('Success.') }
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div data-bind="visible: result.hasResultset() && status() == 'available' && result.data().length == 0, css: resultsKlass">
|
|
|
+ ${ _('Success but empty results.') }
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="row-fluid" data-bind="visible: result.meta().length > 0 && showGrid()" style="max-height: 400px; margin-top: 4px">
|
|
|
+ <div class="row-fluid" data-bind="visible: result.hasSomeResults() && 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>
|
|
|
</a>
|
|
|
+
|
|
|
<ul class="nav nav-list" style="border: none; background-color: #FFF">
|
|
|
<li class="nav-header">${_('columns')}</li>
|
|
|
</ul>
|