aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [15/50] [abbrv] git commit: Rearranged code.
Date Sat, 05 Apr 2014 00:05:01 GMT
Rearranged code.


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

Branch: refs/heads/mansu/job_page
Commit: 72052ef08e40c29515e7580d4b992fb6da76e355
Parents: 940b6c6
Author: Suman Karumuri <skarumuri@twitter.com>
Authored: Fri Mar 28 11:15:14 2014 -0700
Committer: Suman Karumuri <skarumuri@twitter.com>
Committed: Fri Mar 28 11:15:14 2014 -0700

----------------------------------------------------------------------
 .../aurora/scheduler/http/ui/js/controllers.js  | 60 ++++++++++----------
 1 file changed, 30 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/72052ef0/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 3bed4b8..93a85d2 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
@@ -420,6 +420,36 @@ auroraUIControllers.controller('JobController',
       });
     }
 
+    function summarizeActiveTaskConfigs(tasks) {
+      return _.chain(tasks)
+        .filter(function (task) {
+          return isActiveTask(task)
+        })
+        .map(function (task) {
+          return {
+            instanceId: task.assignedTask.instanceId,
+            schedulingDetail: configToDetails(task.assignedTask.task)
+          };
+        })
+        .groupBy(function (task) {
+          return JSON.stringify(task.schedulingDetail);
+        })
+        .map(function (tasks, schedulingDetail) {
+          var schedulingDetail = _.first(tasks).schedulingDetail;
+          return _.map(toRanges(_.pluck(tasks, 'instanceId')), function (range) {
+            return {
+              range: range,
+              schedulingDetail: schedulingDetail
+            }
+          });
+        })
+        .flatten(true)
+        .sortBy(function (scheduleDetail) {
+          return scheduleDetail.range.start;
+        })
+        .value();
+    }
+
     function configToDetails(task) {
       return {
         numCpus: task.numCpus,
@@ -455,35 +485,5 @@ auroraUIControllers.controller('JobController',
       }
       return result;
     }
-
-    function summarizeActiveTaskConfigs(tasks) {
-      return _.chain(tasks)
-        .filter(function (task) {
-          return isActiveTask(task)
-        })
-        .map(function (task) {
-          return {
-            instanceId: task.assignedTask.instanceId,
-            schedulingDetail: configToDetails(task.assignedTask.task)
-          };
-        })
-        .groupBy(function (task) {
-          return JSON.stringify(task.schedulingDetail);
-        })
-        .map(function (tasks, schedulingDetail) {
-          var schedulingDetail = _.first(tasks).schedulingDetail;
-          return _.map(toRanges(_.pluck(tasks, 'instanceId')), function (range) {
-            return {
-              range: range,
-              schedulingDetail: schedulingDetail
-            }
-          });
-        })
-        .flatten(true)
-        .sortBy(function (scheduleDetail) {
-          return scheduleDetail.range.start;
-        })
-        .value();
-    }
   }
 );


Mime
View raw message