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:04 UTC
[18/50] [abbrv] git commit: Added button to show and hide active task
summary.
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 <sk...@twitter.com>
Authored: Fri Mar 28 19:13:04 2014 -0700
Committer: Suman Karumuri <sk...@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;