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:07 UTC
[21/50] [abbrv] git commit: Added a tooltip explaining a schedule
status.
Added a tooltip explaining a schedule status.
Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/09972aa2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/09972aa2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/09972aa2
Branch: refs/heads/mansu/job_page
Commit: 09972aa27bb6f9a45e4ce4ad488ced2e3660db07
Parents: 5a7321f
Author: Suman Karumuri <sk...@twitter.com>
Authored: Sat Mar 29 00:36:43 2014 -0700
Committer: Suman Karumuri <sk...@twitter.com>
Committed: Sat Mar 29 00:36:43 2014 -0700
----------------------------------------------------------------------
.../aurora/scheduler/http/ServletModule.java | 1 +
.../apache/aurora/scheduler/http/ui/index.html | 11 +-------
.../aurora/scheduler/http/ui/js/filters.js | 29 ++++++++++++++++++++
.../aurora/scheduler/http/ui/taskStatus.html | 5 ++--
4 files changed, 34 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/09972aa2/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 1531ed8..ba2ed4e 100644
--- a/src/main/java/org/apache/aurora/scheduler/http/ServletModule.java
+++ b/src/main/java/org/apache/aurora/scheduler/http/ServletModule.java
@@ -211,6 +211,7 @@ public class ServletModule extends AbstractModule {
registerAsset("ui/js/controllers.js", "/js/controllers.js");
registerAsset("ui/js/directives.js", "/js/directives.js");
registerAsset("ui/js/services.js", "/js/services.js");
+ registerAsset("ui/js/filters.js", "/js/filters.js");
}
private void registerAsset(String resourceLocation, String registerLocation) {
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/09972aa2/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 f6399c3..b918542 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
@@ -24,6 +24,7 @@
<script src='/js/controllers.js'></script>
<script src='/js/directives.js'></script>
<script src='/js/services.js'></script>
+<script src='/js/filters.js'></script>
<!-- Bootstrap -->
<script src='/js/jquery.min.js'></script>
@@ -40,16 +41,6 @@
<!-- moment.js -->
<script src='/js/moment.js'></script>
-<!-- Intitalize bootstrap tooltips -->
-<script>
- var options = {
- placement: 'right',
- trigger: 'hover'
- };
-
- $('.task-status-tooltip').tooltip(options);
-</script>
-
<!-- Load our css at the end so we can override bootstrap css properties as needed -->
<link rel='stylesheet' href='/css/app.css'/>
</body>
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/09972aa2/src/main/resources/org/apache/aurora/scheduler/http/ui/js/filters.js
----------------------------------------------------------------------
diff --git a/src/main/resources/org/apache/aurora/scheduler/http/ui/js/filters.js b/src/main/resources/org/apache/aurora/scheduler/http/ui/js/filters.js
new file mode 100644
index 0000000..ac7e2a5
--- /dev/null
+++ b/src/main/resources/org/apache/aurora/scheduler/http/ui/js/filters.js
@@ -0,0 +1,29 @@
+'use strict';
+
+auroraUI.filter('scheduleStatusTooltip',
+ function () {
+ return function (value) {
+ var states = {
+ PENDING: 'The scheduler is searching for a machine that satisfies the resources and '
+ + 'constraints for this task.',
+
+ THROTTLED: 'The task will be rescheduled, but is being throttled for restarting too ' +
+ 'frequently.',
+
+ ASSIGNED: 'The scheduler has selected a machine to run the task and is instructing the '
+ + 'slave to launch it.',
+
+ STARTING: 'The executor is preparing to launch the task.',
+ RUNNING: 'The user process(es) are running.',
+ FAILED: 'The task ran, but did not exit indicating success.',
+ FINISHED: 'The task ran and exited successfully.',
+ KILLED: 'A user or cron invocation terminated the task.',
+ PREEMPTING: 'This task is being killed to make resources available for a production task.',
+ KILLING: 'A user request or cron invocation has requested the task be killed.',
+ LOST: 'The task cannot be accounted for, usually a result of slave process or machine ' +
+ 'failure.'
+ };
+
+ return states[value] ? states[value] : value;
+ }
+ });
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/09972aa2/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 4530389..f68d0ff 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,9 +1,10 @@
<task-status>
<div>
- <a href='#' title='{{formatedValue}}'>{{formatedValue}}</a>
+ <a href='#' title='{{formatedValue | scheduleStatusTooltip}}'>{{formatedValue}}</a>
<ul>
<li ng-repeat='taskEvent in dataRow.taskEvents'>
- {{taskEvent.date}} UTC - {{taskEvent.status}}
+ {{taskEvent.date}} UTC -
+ <a href='#' title='{{taskEvent.status | scheduleStatusTooltip}}'>{{taskEvent.status}}</a>
<span ng-if='taskEvent.message'> - {{taskEvent.message}}</span>
</li>
</ul>