aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [37/50] [abbrv] git commit: Now links point to scheduler jobs page.
Date Wed, 15 Jan 2014 21:38:00 GMT
Now links point to scheduler jobs page.


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

Branch: refs/heads/mansu/AURORA-4187_scheduler_home_page-no-seed
Commit: b6f559878c332fdd724347c51cde16b514cac876
Parents: a20de36
Author: Suman Karumuri <skarumuri@twitter.com>
Authored: Tue Dec 31 01:56:22 2013 -0800
Committer: Suman Karumuri <skarumuri@twitter.com>
Committed: Mon Jan 13 15:24:39 2014 -0800

----------------------------------------------------------------------
 .../org/apache/aurora/scheduler/http/ServletModule.java     | 9 ++++-----
 .../com/twitter/aurora/scheduler/http/ui/index.html         | 7 +++++--
 .../com/twitter/aurora/scheduler/http/ui/js/controllers.js  | 4 ++--
 .../com/twitter/aurora/scheduler/http/ui/js/directives.js   | 2 +-
 4 files changed, 12 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b6f55987/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 18fa9d5..df1739c 100644
--- a/src/main/java/org/apache/aurora/scheduler/http/ServletModule.java
+++ b/src/main/java/org/apache/aurora/scheduler/http/ServletModule.java
@@ -89,8 +89,7 @@ public class ServletModule extends AbstractModule {
         registerJerseyEndpoint("/pendingtasks", PendingTasks.class);
         registerJerseyEndpoint("/quotas", Quotas.class);
         registerJerseyEndpoint(
-            "/scheduler",
-            SchedulerzHome.class,
+            "/scheduler/",
             SchedulerzRole.class,
             SchedulerzJob.class);
         registerJerseyEndpoint("/slaves", Slaves.class);
@@ -183,8 +182,8 @@ public class ServletModule extends AbstractModule {
     registerAsset("api_types.js", "/js/apiTypes.js", false);
     registerAsset("thrift.js", "/js/thrift.js", false);
 
-    registerAsset("ui/index.html", "/ui/index.html");
-    registerAsset("ui/roleLink.html", "/ui/roleLink.html");
+    registerAsset("ui/index.html", "/scheduler");
+    registerAsset("ui/roleLink.html", "/roleLink.html");
 
     registerAsset("ui/css/app.css", "/css/app.css");
 
@@ -207,7 +206,7 @@ public class ServletModule extends AbstractModule {
   }
 
   private void registerAsset(String resourceLocation, String registerLocation, boolean isRelative)
{
-    String mediaType = getMediaType(registerLocation).toString();
+    String mediaType = getMediaType(resourceLocation).toString();
 
     if (isRelative) {
       Registration.registerHttpAsset(

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b6f55987/src/main/resources/com/twitter/aurora/scheduler/http/ui/index.html
----------------------------------------------------------------------
diff --git a/src/main/resources/com/twitter/aurora/scheduler/http/ui/index.html b/src/main/resources/com/twitter/aurora/scheduler/http/ui/index.html
index 1f3f41c..71d6c16 100644
--- a/src/main/resources/com/twitter/aurora/scheduler/http/ui/index.html
+++ b/src/main/resources/com/twitter/aurora/scheduler/http/ui/index.html
@@ -2,14 +2,13 @@
 <html lang="en" ng-app="auroraUI">
 <head>
   <meta charset="utf-8">
-  <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title>Aurora UI</title>
   <link rel="stylesheet" href="/css/app.css"/>
 </head>
 <body class='ng-cloak'>
 
 <div class='container'>
-  <div ng-controller='AuroraUI.JobSummaryController'>
+  <div ng-controller='JobSummaryController'>
     <div class='page-header'>
       <h2 class="text-center">{{title}}</h2>
     </div>
@@ -22,9 +21,13 @@
 </div>
 
 <!-- Scripts -->
+
+<!-- Thrift -->
 <script src="/js/thrift.js"></script>
 <script src="/js/apiTypes.js"></script>
 <script src="/js/readOnlyScheduler.js"></script>
+
+<!-- Angular -->
 <script src="/js/angular.js"></script>
 <script src="/js/app.js"></script>
 <script src="/js/controllers.js"></script>

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b6f55987/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/controllers.js
----------------------------------------------------------------------
diff --git a/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/controllers.js b/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/controllers.js
index f33ec19..69b165e 100644
--- a/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/controllers.js
+++ b/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/controllers.js
@@ -3,7 +3,7 @@
 /* Controllers */
 
 angular.module('auroraUI.controllers', []).
-    controller('AuroraUI.JobSummaryController',
+    controller('JobSummaryController',
     function ($scope, $window, auroraClient) {
       $scope.title = 'Scheduled Jobs Summary';
 
@@ -24,6 +24,6 @@ angular.module('auroraUI.controllers', []).
       };
 
       $scope.$on('selectionChange', function (event, args) {
-        $window.location.href = args.item.role;
+        $window.location.href = "/scheduler/" + args.item.role;
       });
    });

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b6f55987/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/directives.js
----------------------------------------------------------------------
diff --git a/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/directives.js b/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/directives.js
index 939ec08..d2b2017 100644
--- a/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/directives.js
+++ b/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/directives.js
@@ -3,6 +3,6 @@
 auroraUI.directive('roleLink', function () {
   return {
     restrict: 'C',
-    template: "<a ng-href='/{{formatedValue}}'>{{formatedValue}}</a>"
+    template: "<a ng-href='/scheduler/{{formatedValue}}'>{{formatedValue}}</a>"
   };
 });
\ No newline at end of file


Mime
View raw message