aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [18/50] [abbrv] git commit: Added button to show and hide active task summary.
Date Sat, 05 Apr 2014 00:05:04 GMT
Added button to show and hide active task summary.


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

Branch: refs/heads/mansu/job_page
Commit: 7f7da2a3c1b9008b8b4052d1ac2b13b8efcf96ba
Parents: 9e6346b
Author: Suman Karumuri <skarumuri@twitter.com>
Authored: Fri Mar 28 19:13:04 2014 -0700
Committer: Suman Karumuri <skarumuri@twitter.com>
Committed: Fri Mar 28 19:13:04 2014 -0700

----------------------------------------------------------------------
 .../apache/aurora/scheduler/http/ui/job.html    | 34 ++++++++++++--------
 .../aurora/scheduler/http/ui/js/controllers.js  | 11 +++++++
 2 files changed, 32 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/7f7da2a3/src/main/resources/org/apache/aurora/scheduler/http/ui/job.html
----------------------------------------------------------------------
diff --git a/src/main/resources/org/apache/aurora/scheduler/http/ui/job.html b/src/main/resources/org/apache/aurora/scheduler/http/ui/job.html
index 08f479a..e8ea278 100644
--- a/src/main/resources/org/apache/aurora/scheduler/http/ui/job.html
+++ b/src/main/resources/org/apache/aurora/scheduler/http/ui/job.html
@@ -16,21 +16,29 @@
         </div>
       </div>
 
-      <div class='span8 center'>
-        <smart-table config='taskSummaryTableConfig'
-                     columns='taskSummaryTableColumns'
-                     rows='taskSummary'
-                     class='table table-striped table-hover table-bordered table-condensed'>
-        </smart-table>
-      </div>
 
       <div class='container-fluid'>
-        <h3>Active tasks</h3>
-        <smart-table config='activeTasksTableConfig'
-                     columns='activeTasksTableColumns'
-                     rows='activeTasks'
-                     class='table table-striped table-hover table-bordered table-condensed'>
-        </smart-table>
+        <h3>Active tasks
+          <button class="btn" ng-click='toggleSummaryVisibility()'>{{summaryButtonText}}</button>
+        </h3>
+
+        <div ng-if='showSummary'>
+          <div class='span8 center'>
+            <smart-table config='taskSummaryTableConfig'
+                         columns='taskSummaryTableColumns'
+                         rows='taskSummary'
+                         class='table table-striped table-hover table-bordered table-condensed'>
+            </smart-table>
+          </div>
+        </div>
+
+        <div>
+          <smart-table config='activeTasksTableConfig'
+                       columns='activeTasksTableColumns'
+                       rows='activeTasks'
+                       class='table table-striped table-hover table-bordered table-condensed'>
+          </smart-table>
+        </div>
       </div>
 
       <div class='container-fluid'>

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/7f7da2a3/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 3c28407..0ffdb18 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
@@ -295,6 +295,7 @@ auroraUIControllers.controller('JobController',
         cellTemplateUrl: '/schedulingDetail.html'}
     ];
 
+    // TODO: BUG showing dates.
     //TODO: Share?
     $scope.taskSummaryTableConfig = {
       isPaginationEnabled: false,
@@ -302,6 +303,16 @@ auroraUIControllers.controller('JobController',
       selectionMode: 'none'
     };
 
+    var showSummary = 'Show Summary';
+    var hideSummary = 'Hide Summary';
+    $scope.summaryButtonText = showSummary;
+    $scope.showSummary = false;
+
+    $scope.toggleSummaryVisibility = function() {
+      $scope.showSummary = !$scope.showSummary;
+      $scope.summaryButtonText = $scope.showSummary ? hideSummary : showSummary;
+    };
+
     $scope.activeTasksTableConfig = globalTableConfig;
     $scope.completedTasksTableConfig = globalTableConfig;
 


Mime
View raw message