Skip to content

Commit

Permalink
feat: Don't display '%' for spell'
Browse files Browse the repository at this point in the history
  • Loading branch information
1ambda committed Mar 7, 2017
1 parent 0792dd3 commit 56986c2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Expand Up @@ -38,7 +38,7 @@
{{paragraph.status}}
</span>

<span ng-if="paragraph.status=='RUNNING'">
<span ng-if="paragraph.status === 'RUNNING' && paragraph.executor !== 'SPELL'">
{{getProgress()}}%
</span>

Expand Down
10 changes: 9 additions & 1 deletion zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
Expand Up @@ -16,6 +16,12 @@ import {
SpellResult,
} from '../../spell';

const ParagraphExecutor = {
SPELL: 'SPELL',
INTERPRETER: 'INTERPRETER',
NONE: '', /** meaning `DONE` */
};

angular.module('zeppelinWebApp').controller('ParagraphCtrl', ParagraphCtrl);

function ParagraphCtrl($scope, $rootScope, $route, $window, $routeParams, $location,
Expand Down Expand Up @@ -265,6 +271,7 @@ function ParagraphCtrl($scope, $rootScope, $route, $window, $routeParams, $locat

$scope.cleanupSpellTransaction = function() {
const status = 'FINISHED';
$scope.paragraph.executor = ParagraphExecutor.NONE;
$scope.paragraph.status = status;
$scope.paragraph.results.code = status;

Expand All @@ -283,8 +290,9 @@ function ParagraphCtrl($scope, $rootScope, $route, $window, $routeParams, $locat

$scope.runParagraphUsingSpell = function(paragraphText,
magic, digestRequired, propagated) {
$scope.paragraph.results = {};
$scope.paragraph.status = 'RUNNING';
$scope.paragraph.executor = ParagraphExecutor.SPELL;
$scope.paragraph.results = {};
$scope.paragraph.errorMessage = '';
if (digestRequired) { $scope.$digest(); }

Expand Down

0 comments on commit 56986c2

Please sign in to comment.