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:04:53 UTC
[07/50] [abbrv] git commit: Added a cog-wheel to point to the
task-config.
Added a cog-wheel to point to the task-config.
Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/118973d5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/118973d5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/118973d5
Branch: refs/heads/mansu/job_page
Commit: 118973d587f2f0dadc2358596578d9372969c7d3
Parents: bedea90
Author: Suman Karumuri <sk...@twitter.com>
Authored: Wed Mar 26 20:50:05 2014 -0700
Committer: Suman Karumuri <sk...@twitter.com>
Committed: Wed Mar 26 21:24:18 2014 -0700
----------------------------------------------------------------------
.../aurora/scheduler/http/ServletModule.java | 1 +
.../apache/aurora/scheduler/http/ui/index.html | 1 +
.../aurora/scheduler/http/ui/js/controllers.js | 33 ++++++++++----------
.../aurora/scheduler/http/ui/js/directives.js | 8 +++++
.../aurora/scheduler/http/ui/taskLink.html | 1 +
.../aurora/scheduler/http/ui/taskStatus.html | 2 +-
6 files changed, 28 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/118973d5/src/main/java/org/apache/aurora/scheduler/http/ServletModule.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/http/ServletModule.java b/src/main/java/org/apache/aurora/scheduler/http/ServletModule.java
index 822f34e..1286c76 100644
--- a/src/main/java/org/apache/aurora/scheduler/http/ServletModule.java
+++ b/src/main/java/org/apache/aurora/scheduler/http/ServletModule.java
@@ -202,6 +202,7 @@ public class ServletModule extends AbstractModule {
registerAsset("ui/job.html", "/job.html");
registerAsset("ui/taskSandbox.html", "/taskSandbox.html");
registerAsset("ui/taskStatus.html", "/taskStatus.html");
+ registerAsset("ui/taskLink.html", "/taskLink.html");
registerAsset("ui/css/app.css", "/css/app.css");
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/118973d5/src/main/resources/org/apache/aurora/scheduler/http/ui/index.html
----------------------------------------------------------------------
diff --git a/src/main/resources/org/apache/aurora/scheduler/http/ui/index.html b/src/main/resources/org/apache/aurora/scheduler/http/ui/index.html
index fa51c03..f7c3d6e 100644
--- a/src/main/resources/org/apache/aurora/scheduler/http/ui/index.html
+++ b/src/main/resources/org/apache/aurora/scheduler/http/ui/index.html
@@ -30,6 +30,7 @@
<script src='/js/jquery.min.js'></script>
<script src='/js/bootstrap.min.js'></script>
<link href='/css/bootstrap.min.css' rel='stylesheet'>
+<link href='/img/glyphicons-halflings.png' rel='stylesheet'>
<!-- smart table -->
<script src='/js/smartTable.js'></script>
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/118973d5/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 b8419e1..d8182be 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
@@ -291,32 +291,31 @@ auroraUIControllers.controller('JobController',
$scope.job = $routeParams.job;
$scope.activeTasksTableConfig = globalTableConfig;
+ $scope.completedTasksTableConfig = globalTableConfig;
- $scope.activeTasksTableColumns = [
+ var taskColumns = [
{label: 'Instance', map: 'instanceId'},
{label: 'Status', map: 'status'},
{label: 'Last Active', map: 'latestActivity',
formatFunction: function (date) {
return fromNow(date);
}},
- {label: 'Host', map: 'host', cellTemplateUrl: '/taskSandbox.html'}
+ {label: 'Host', map: 'host', cellTemplateUrl: '/taskSandbox.html'},
+ {label: '', map: 'taskId', cellTemplateUrl: '/taskLink.html'}
];
- $scope.completedTasksTableConfig = globalTableConfig;
-
- $scope.completedTasksTableColumns = [
- {label: 'Instance', map: 'instanceId'},
- {label: 'Status', map: 'status', cellTemplateUrl: '/taskStatus.html'},
- {label: 'Running duration', map: 'duration',
- formatFunction: function (duration) {
- return fromNow(moment().subtract(duration), true);
- }},
- {label: 'Last Active', map: 'latestActivity',
- formatFunction: function (date) {
- return fromNow(date);
- }},
- {label: 'Host', map: 'host', cellTemplateUrl: '/taskSandbox.html'}
- ];
+ $scope.activeTasksTableColumns = taskColumns;
+
+ $scope.completedTasksTableColumns = _.union(
+ _.first(taskColumns, 2),
+ [
+ {label: 'Running duration', map: 'duration',
+ formatFunction: function (duration) {
+ return fromNow(moment().subtract(duration), true);
+ }}
+ ],
+ _.last(taskColumns, taskColumns.length - 3)
+ );
$scope.completedTasks = [];
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/118973d5/src/main/resources/org/apache/aurora/scheduler/http/ui/js/directives.js
----------------------------------------------------------------------
diff --git a/src/main/resources/org/apache/aurora/scheduler/http/ui/js/directives.js b/src/main/resources/org/apache/aurora/scheduler/http/ui/js/directives.js
index fb0324e..b8a22aa 100644
--- a/src/main/resources/org/apache/aurora/scheduler/http/ui/js/directives.js
+++ b/src/main/resources/org/apache/aurora/scheduler/http/ui/js/directives.js
@@ -50,3 +50,11 @@ auroraUI.directive('taskStatus', function () {
template: '<span title="TEST">{{formatedValue}}</span>'
};
});
+
+auroraUI.directive('taskLink', function () {
+ return {
+ restrict: 'C',
+ template:
+ '<a ng-href="/scheduler/structdump/task/{{formatedValue}}"><i class="icon-cog"></i></a>'
+ };
+});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/118973d5/src/main/resources/org/apache/aurora/scheduler/http/ui/taskLink.html
----------------------------------------------------------------------
diff --git a/src/main/resources/org/apache/aurora/scheduler/http/ui/taskLink.html b/src/main/resources/org/apache/aurora/scheduler/http/ui/taskLink.html
new file mode 100644
index 0000000..3779b7e
--- /dev/null
+++ b/src/main/resources/org/apache/aurora/scheduler/http/ui/taskLink.html
@@ -0,0 +1 @@
+<div class='task-link'></div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/118973d5/src/main/resources/org/apache/aurora/scheduler/http/ui/taskStatus.html
----------------------------------------------------------------------
diff --git a/src/main/resources/org/apache/aurora/scheduler/http/ui/taskStatus.html b/src/main/resources/org/apache/aurora/scheduler/http/ui/taskStatus.html
index 0d925f0..4205db4 100644
--- a/src/main/resources/org/apache/aurora/scheduler/http/ui/taskStatus.html
+++ b/src/main/resources/org/apache/aurora/scheduler/http/ui/taskStatus.html
@@ -1 +1 @@
-<div class="task-status task-status-tooltip"></div>
\ No newline at end of file
+<div class='task-status task-status-tooltip'></div>
\ No newline at end of file