aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jco...@apache.org
Subject aurora git commit: Stop in-progress instances from pulsing when update has been aborted.
Date Wed, 02 Sep 2015 03:42:34 GMT
Repository: aurora
Updated Branches:
  refs/heads/master 07838c38e -> bf319ffef


Stop in-progress instances from pulsing when update has been aborted.

Also removed the "INSTANCE-" prefix from tooltip as it seemed superfluous and
added "ABORTED" to the tooltip for instances that were "UPDATING" when the
update was aborted. An argument can be made for adding "ABORTED" to the tooltip
for all non-terminal states (PENDING, etc.), let me know if you think we
should add it for those as well.

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


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

Branch: refs/heads/master
Commit: bf319ffeffd28b13ca4f2f1f398eb3c03504de10
Parents: 07838c3
Author: Joshua Cohen <jcohen@apache.org>
Authored: Tue Sep 1 22:42:11 2015 -0500
Committer: Joshua Cohen <jcohen@apache.org>
Committed: Tue Sep 1 22:42:11 2015 -0500

----------------------------------------------------------------------
 src/main/resources/scheduler/assets/css/app.css |  4 ++++
 .../resources/scheduler/assets/js/directives.js | 23 ++++++++++++++++----
 src/main/resources/scheduler/assets/update.html |  7 +++++-
 3 files changed, 29 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/bf319ffe/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 9437c53..faa387b 100644
--- a/src/main/resources/scheduler/assets/css/app.css
+++ b/src/main/resources/scheduler/assets/css/app.css
@@ -317,6 +317,10 @@ div.pagination {
   animation: pulse 2s infinite;
 }
 
+.aborted > .instance-updating {
+  animation: none !important;
+}
+
 .instance-updating, .instance-added, .instance-rolling-back {
   background-color: khaki;
   fill: rgba(240, 230, 140, 0.5);

http://git-wip-us.apache.org/repos/asf/aurora/blob/bf319ffe/src/main/resources/scheduler/assets/js/directives.js
----------------------------------------------------------------------
diff --git a/src/main/resources/scheduler/assets/js/directives.js b/src/main/resources/scheduler/assets/js/directives.js
index d8f722c..c02c26f 100644
--- a/src/main/resources/scheduler/assets/js/directives.js
+++ b/src/main/resources/scheduler/assets/js/directives.js
@@ -12,7 +12,7 @@
  * limitations under the License.
  */
 (function () {
-  /*global auroraUI:false */
+  /*global auroraUI:false,JobUpdateStatus:false */
   'use strict';
 
   auroraUI.directive('roleLink', function () {
@@ -152,12 +152,16 @@
   });
 
   auroraUI.directive('instanceSummary', function ($compile) {
+    var ABORTED = 'ABORTED';
+    var UPDATING = 'UPDATING';
+
     return {
       restrict: 'E',
       scope: {
         'instances': '=',
         'size': '=',
-        'stats': '='
+        'stats': '=',
+        'status': '='
       },
       link: function (scope, element, attrs) {
         scope.$watch('instances', function () {
@@ -165,12 +169,23 @@
           if (!scope.instances || scope.instances.length === 0) {
             return;
           }
-          var list = angular.element('<ul class="instance-grid ' + scope.size + '"></ul>');
+          var cssClasses = [ 'instance-grid', scope.size ];
+          var aborted = scope.status === JobUpdateStatus.ABORTED;
+          if (aborted) {
+            cssClasses.push(ABORTED.toLowerCase());
+          }
+
+          var list = angular.element('<ul class="' + cssClasses.join(' ') + '"></ul>');
 
           scope.instances.forEach(function (i) {
             var n = i.instanceId;
+            var statuses = [ i.className.toUpperCase().replace(/^INSTANCE\-/, '') ];
+            if (aborted && statuses[0] === UPDATING) {
+              statuses.push(ABORTED);
+            }
+
             list.append('<li class="' + i.className + '" tooltip="INSTANCE ' + n +
-              ': ' + i.className.toUpperCase() + '"><span class="instance-id">'
+ n +
+              ': ' + statuses.join(', ') + '"><span class="instance-id">' + n +
               '</span></li>');
           });
 

http://git-wip-us.apache.org/repos/asf/aurora/blob/bf319ffe/src/main/resources/scheduler/assets/update.html
----------------------------------------------------------------------
diff --git a/src/main/resources/scheduler/assets/update.html b/src/main/resources/scheduler/assets/update.html
index c886709..88ccb7a 100644
--- a/src/main/resources/scheduler/assets/update.html
+++ b/src/main/resources/scheduler/assets/update.html
@@ -52,7 +52,12 @@
             </div>
           </div>
 
-          <instance-summary instances="instanceSummary" stats="stats" size="instanceGridSize"></instance-summary>
+          <instance-summary
+              instances="instanceSummary"
+              stats="stats"
+              size="instanceGridSize"
+              status="update.update.summary.state.status">
+          </instance-summary>
         </div>
         <!-- end finished update box -->
 


Mime
View raw message