You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by ma...@apache.org on 2014/04/05 02:05:21 UTC

[35/50] [abbrv] git commit: Fixed error handling.

Fixed error handling.


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/c8f1897b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/c8f1897b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/c8f1897b

Branch: refs/heads/mansu/job_page
Commit: c8f1897bd0f28418e759b89169f7ec5117f359ea
Parents: f6306ab
Author: Suman Karumuri <sk...@twitter.com>
Authored: Sun Mar 30 21:59:07 2014 -0700
Committer: Suman Karumuri <sk...@twitter.com>
Committed: Sun Mar 30 21:59:07 2014 -0700

----------------------------------------------------------------------
 .../org/apache/aurora/scheduler/http/ui/js/controllers.js    | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/c8f1897b/src/main/resources/org/apache/aurora/scheduler/http/ui/js/controllers.js
----------------------------------------------------------------------
diff --git a/src/main/resources/org/apache/aurora/scheduler/http/ui/js/controllers.js b/src/main/resources/org/apache/aurora/scheduler/http/ui/js/controllers.js
index 7bdb16f..3318b4c 100644
--- a/src/main/resources/org/apache/aurora/scheduler/http/ui/js/controllers.js
+++ b/src/main/resources/org/apache/aurora/scheduler/http/ui/js/controllers.js
@@ -327,17 +327,13 @@ auroraUIControllers.controller('JobController',
     function getTasksForJob(role, environment, job) {
       var response = auroraClient.getTasks(role, environment, job);
 
-      $scope.error = response.error;
-      $scope.errorMsg = response.errorMsg;
+      $scope.error = response.error ? 'Error fetching tasks: ' + response.error : '';
 
-      if (response.error) {
+      if ($scope.error) {
         return [];
       }
 
-      console.log(response);
-
       $scope.taskSummary = summarizeActiveTaskConfigs(response.tasks);
-      console.log($scope.taskSummary);
 
       var tasks = _.map(response.tasks, function (task) {
         return summarizeTask(task);