aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jco...@apache.org
Subject aurora git commit: Remove redundancy between breadcrumbs and page headers. Also make job dashboard link more prominent.
Date Fri, 11 Sep 2015 17:08:57 GMT
Repository: aurora
Updated Branches:
  refs/heads/master e0c9e4d80 -> 0fc7c5a0e


Remove redundancy between breadcrumbs and page headers. Also make job dashboard link more
prominent.

Bugs closed: AURORA-1474, AURORA-783

Reviewed at https://reviews.apache.org/r/38270/


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

Branch: refs/heads/master
Commit: 0fc7c5a0e5c82bce52185be3c5dd0686fc595f18
Parents: e0c9e4d
Author: Joshua Cohen <jcohen@apache.org>
Authored: Fri Sep 11 12:08:37 2015 -0500
Committer: Joshua Cohen <jcohen@apache.org>
Committed: Fri Sep 11 12:08:37 2015 -0500

----------------------------------------------------------------------
 examples/vagrant/upstart/aurora-scheduler.conf  |  2 +-
 .../resources/scheduler/assets/breadcrumb.html  | 24 ++++++++++++--------
 src/main/resources/scheduler/assets/css/app.css | 15 +++++++-----
 src/main/resources/scheduler/assets/home.html   |  4 ----
 .../resources/scheduler/assets/instance.html    | 11 ---------
 src/main/resources/scheduler/assets/job.html    | 16 -------------
 .../scheduler/assets/js/controllers.js          |  2 --
 .../resources/scheduler/assets/js/services.js   |  9 ++++++--
 src/main/resources/scheduler/assets/role.html   | 11 ---------
 9 files changed, 32 insertions(+), 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/0fc7c5a0/examples/vagrant/upstart/aurora-scheduler.conf
----------------------------------------------------------------------
diff --git a/examples/vagrant/upstart/aurora-scheduler.conf b/examples/vagrant/upstart/aurora-scheduler.conf
index f710295..4033184 100644
--- a/examples/vagrant/upstart/aurora-scheduler.conf
+++ b/examples/vagrant/upstart/aurora-scheduler.conf
@@ -26,7 +26,7 @@ env JAVA_OPTS='-Djava.library.path=/usr/lib -Dlog4j.configuration="file:///etc/z
 
 chdir /home/vagrant/aurora/dist/install/aurora-scheduler
 exec bin/aurora-scheduler \
-  -cluster_name=example \
+  -cluster_name=devcluster \
   -hostname=aurora.local \
   -http_port=8081 \
   -native_log_quorum_size=1 \

http://git-wip-us.apache.org/repos/asf/aurora/blob/0fc7c5a0/src/main/resources/scheduler/assets/breadcrumb.html
----------------------------------------------------------------------
diff --git a/src/main/resources/scheduler/assets/breadcrumb.html b/src/main/resources/scheduler/assets/breadcrumb.html
index 9265277..6bb3974 100644
--- a/src/main/resources/scheduler/assets/breadcrumb.html
+++ b/src/main/resources/scheduler/assets/breadcrumb.html
@@ -14,22 +14,28 @@
    -->
   <div class='col-md-12'>
   <ul class='breadcrumb'>
-    <li><a href='/scheduler'>Home</a></li>
+    <li><a href='/scheduler'>{{clusterName}}</a></li>
 
-    <li ng-if='role && !environment' class='active'>Role: {{role}}</a></li>
-    <li ng-if='role && environment'><a href='/scheduler/{{role}}'>Role:
{{role}}</a></li>
+    <li ng-if='role && !environment' class='active'>{{role}}</a></li>
+    <li ng-if='role && environment'><a href='/scheduler/{{role}}'>{{role}}</a></li>
 
-    <li ng-if='environment && !job' class='active'>Environment: {{environment}}</li>
+    <li ng-if='environment && !job' class='active'>{{environment}}</li>
     <li ng-if='environment && job'>
-      <a href='/scheduler/{{role}}/{{environment}}'>Environment: {{environment}}</a>
+      <a href='/scheduler/{{role}}/{{environment}}'>{{environment}}</a>
     </li>
 
-    <li ng-if='job && (!update && !(instance >= 0))' class='active'>Job:
{{job}}</li>
+    <li ng-if='job && (!update && !(instance >= 0))' class='active'>{{job}}</li>
 
-    <li ng-if='job && (update || instance >= 0)'><a href='/scheduler/{{role}}/{{environment}}/{{job}}'>Job:
{{job}}</a></li>
+    <li ng-if='job && (update || instance >= 0)'><a href='/scheduler/{{role}}/{{environment}}/{{job}}'>{{job}}</a></li>
 
-    <li ng-if='instance >= 0' class='active'>Instance: {{instance}}</li>
-    <li ng-if='update' class='active'>Update: {{update.update.summary.key.id}}</li>
+    <li ng-if='instance >= 0' class='active'>{{instance}}</li>
+    <li ng-if='update' class='active'>{{update.update.summary.key.id}}</li>
+
+    <li ng-if='job && (!update && !(instance >= 0))' class='right'>
+      <a ng-href='{{jobDashboardUrl}}' title='External dashboard for this job'>
+        <span class='glyphicon glyphicon-stats'></span> Dashboard
+      </a>
+    </li>
   </ul>
   </div>
 </div>

http://git-wip-us.apache.org/repos/asf/aurora/blob/0fc7c5a0/src/main/resources/scheduler/assets/css/app.css
----------------------------------------------------------------------
diff --git a/src/main/resources/scheduler/assets/css/app.css b/src/main/resources/scheduler/assets/css/app.css
index faa387b..a1e2fbf 100644
--- a/src/main/resources/scheduler/assets/css/app.css
+++ b/src/main/resources/scheduler/assets/css/app.css
@@ -29,11 +29,6 @@ a {
   width: 150px;
 }
 
-.dashboard-url {
-  font-size: .85em;
-  color: darkslategray;
-}
-
 .sort-ascent:before {
   content: "\25BE";
 }
@@ -43,7 +38,15 @@ a {
 }
 
 ul.breadcrumb {
-  margin: 0 0 0;
+  font-size: 20px;
+}
+
+ul.breadcrumb>li.right {
+  float: right;
+}
+
+ul.breadcrumb>li.right:before {
+  content: none;
 }
 
 .page-header {

http://git-wip-us.apache.org/repos/asf/aurora/blob/0fc7c5a0/src/main/resources/scheduler/assets/home.html
----------------------------------------------------------------------
diff --git a/src/main/resources/scheduler/assets/home.html b/src/main/resources/scheduler/assets/home.html
index fadf00d..932b7c2 100644
--- a/src/main/resources/scheduler/assets/home.html
+++ b/src/main/resources/scheduler/assets/home.html
@@ -21,10 +21,6 @@
       <breadcrumb/>
     </div>
 
-    <div class='page-header'>
-      <h2 class='text-center'>{{title}}</h2>
-    </div>
-
     <div>
       <smart-table config='roleSummaryTableConfig'
                    columns='roleSummaryColumns'

http://git-wip-us.apache.org/repos/asf/aurora/blob/0fc7c5a0/src/main/resources/scheduler/assets/instance.html
----------------------------------------------------------------------
diff --git a/src/main/resources/scheduler/assets/instance.html b/src/main/resources/scheduler/assets/instance.html
index 317e2ce..775417f 100644
--- a/src/main/resources/scheduler/assets/instance.html
+++ b/src/main/resources/scheduler/assets/instance.html
@@ -19,17 +19,6 @@
   <div ng-hide='error'>
     <breadcrumb></breadcrumb>
 
-    <div class='row'>
-      <div class='col-md-12'>
-        <div class='page-header'>
-          <h2 class='text-center'>
-            Instance <em>{{instance}}</em> of job <em>{{job}}</em>
in role <em>{{role}}</em> and
-            environment <em>{{environment}}</em>
-          </h2>
-        </div>
-      </div>
-    </div>
-
     <div ng-if="!tasksReady">
       <div class="row">
         <div class="col-md-12">

http://git-wip-us.apache.org/repos/asf/aurora/blob/0fc7c5a0/src/main/resources/scheduler/assets/job.html
----------------------------------------------------------------------
diff --git a/src/main/resources/scheduler/assets/job.html b/src/main/resources/scheduler/assets/job.html
index a8be604..4321c82 100644
--- a/src/main/resources/scheduler/assets/job.html
+++ b/src/main/resources/scheduler/assets/job.html
@@ -19,22 +19,6 @@
   <div ng-hide='error'>
     <breadcrumb></breadcrumb>
 
-    <div class='row'>
-      <div class='col-md-12'>
-        <div class='page-header'>
-          <h2 class='text-center'>
-            Job <em>{{job}}</em> in role <em>{{role}}</em> and environment
<em>{{environment}}</em>
-            <span ng-if='jobDashboardUrl'>
-            <a class='dashboard-url' ng-href='{{jobDashboardUrl}}'
-               title='Container stats for this job'>
-              <i class='glyphicon glyphicon-stats'></i>
-            </a>
-            </span>
-          </h2>
-        </div>
-      </div>
-    </div>
-
     <!-- begin update progress preview -->
     <div ng-if="updateInProgress" class="content-box in-progress-alert">
       <div class="row">

http://git-wip-us.apache.org/repos/asf/aurora/blob/0fc7c5a0/src/main/resources/scheduler/assets/js/controllers.js
----------------------------------------------------------------------
diff --git a/src/main/resources/scheduler/assets/js/controllers.js b/src/main/resources/scheduler/assets/js/controllers.js
index 9ac62c8..511f5c3 100644
--- a/src/main/resources/scheduler/assets/js/controllers.js
+++ b/src/main/resources/scheduler/assets/js/controllers.js
@@ -40,8 +40,6 @@
 
   auroraUIControllers.controller('RoleSummaryController',
     function ($scope, auroraClient) {
-      $scope.title = 'Scheduled Jobs Summary';
-
       $scope.error = '';
 
       auroraClient.getRoleSummary().then(function (roleSummaries) {

http://git-wip-us.apache.org/repos/asf/aurora/blob/0fc7c5a0/src/main/resources/scheduler/assets/js/services.js
----------------------------------------------------------------------
diff --git a/src/main/resources/scheduler/assets/js/services.js b/src/main/resources/scheduler/assets/js/services.js
index dbad59b..b7699fe 100644
--- a/src/main/resources/scheduler/assets/js/services.js
+++ b/src/main/resources/scheduler/assets/js/services.js
@@ -45,8 +45,9 @@
 
   auroraUI.factory(
     'auroraClient',
-    ['$window', '$q',
-      function ($window, $q) {
+    ['$window', '$q', '$rootScope',
+      function ($window, $q, $rootScope) {
+
         function async(fn) {
           var deferred = $q.defer();
           fn(deferred);
@@ -211,6 +212,10 @@
           },
 
           processResponse: function (response) {
+            if (response.serverInfo && response.serverInfo.clusterName) {
+              $rootScope.clusterName = response.serverInfo.clusterName;
+            }
+
             auroraClient.setPageTitle(response.serverInfo);
             var error = response.responseCode !== 1 ?
                 (response.message || 'No error message returned by the scheduler') : '',

http://git-wip-us.apache.org/repos/asf/aurora/blob/0fc7c5a0/src/main/resources/scheduler/assets/role.html
----------------------------------------------------------------------
diff --git a/src/main/resources/scheduler/assets/role.html b/src/main/resources/scheduler/assets/role.html
index 3072ae3..d3a4c7d 100644
--- a/src/main/resources/scheduler/assets/role.html
+++ b/src/main/resources/scheduler/assets/role.html
@@ -19,17 +19,6 @@
   <div ng-hide='error'>
     <breadcrumb></breadcrumb>
 
-    <div class='row'>
-      <div class='col-md-12'>
-          <div class='page-header'>
-            <h2 class='text-center'>
-              Jobs for role <em>{{role}}</em>
-              <span ng-if='environment'> and environment <em>{{environment}}</em></span>
-            </h2>
-          </div>
-      </div>
-    </div>
-
     <div class='row' ng-show='!environment'>
       <div ng-controller="QuotaController">
         <div class={{resourceClass}}>


Mime
View raw message