This commit is contained in:
Amir Nissim 2014-03-10 16:06:18 +02:00
parent 31c59467db
commit 8d1b523b94
2 changed files with 12 additions and 19 deletions

View File

@ -14,7 +14,6 @@
$scope.isSourceVisible = route.locals.viewSource; $scope.isSourceVisible = route.locals.viewSource;
$scope.queryExecuting = false; $scope.queryExecuting = false;
$scope.queryResultStatus = null;
$scope.newVisualization = undefined; $scope.newVisualization = undefined;
@ -173,8 +172,6 @@
}); });
$scope.$watch("queryResult && queryResult.getStatus()", function(status) { $scope.$watch("queryResult && queryResult.getStatus()", function(status) {
$scope.queryResultStatus = status;
if (!status) { if (!status) {
return; return;
} }

View File

@ -59,21 +59,6 @@
</p> </p>
</div> </div>
<!-- alerts -->
<div ng-show="queryExecuting">
<p>
<div class="alert alert-info"
ng-show="queryResultStatus !== 'done' && queryResultStatus !== 'failed'"
ng-switch="queryResultStatus">
<span ng-switch-when="processing">Executing query&hellip;</span>
<span ng-switch-when="waiting">Query in queue&hellip;</span>
<rd-timer timestamp="queryResult.getUpdatedAt()"></rd-timer>
<button type="button" class="btn btn-warning btn-xs pull-right" ng-disabled="cancelling" ng-click="cancelExecution()">Cancel</button>
</div>
<div class="alert alert-danger" ng-show="queryResult.getError()">Error running query: <strong>{{queryResult.getError()}}</strong></div>
</p>
</div>
<!-- code editor --> <!-- code editor -->
<p ng-show="isSourceVisible"> <p ng-show="isSourceVisible">
<textarea ui-codemirror="editorOptions" ui-refresh="isSourceVisible" ng-model="query.query"></textarea> <textarea ui-codemirror="editorOptions" ui-refresh="isSourceVisible" ng-model="query.query"></textarea>
@ -118,8 +103,19 @@
</div> </div>
<div class="col-lg-9"> <div class="col-lg-9">
<!-- alerts -->
<div class="alert alert-info" ng-show="queryResult.getStatus() == 'processing'">
Executing query&hellip; <rd-timer timestamp="queryResult.getUpdatedAt()"></rd-timer>
<button type="button" class="btn btn-warning btn-xs pull-right" ng-disabled="cancelling" ng-click="cancelExecution()">Cancel</button>
</div>
<div class="alert alert-info" ng-show="queryResult.getStatus() == 'waiting'">
Query in queue&hellip; <rd-timer timestamp="queryResult.getUpdatedAt()"></rd-timer>
<button type="button" class="btn btn-warning btn-xs pull-right" ng-disabled="cancelling" ng-click="cancelExecution()">Cancel</button>
</div>
<div class="alert alert-danger" ng-show="queryResult.getError()">Error running query: <strong>{{queryResult.getError()}}</strong></div>
<!-- tabs and data --> <!-- tabs and data -->
<div ng-hide="queryExecuting"> <div ng-show="queryResult.getStatus() == 'done'">
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">