incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [4/6] git commit: Fixed the bugs with indicating offline nodes and forgetting them
Date Tue, 04 Jun 2013 13:33:03 GMT
Fixed the bugs with indicating offline nodes and forgetting them

Signed-off-by: Aaron McCurry <amccurry@gmail.com>


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

Branch: refs/heads/0.1.5
Commit: 5173251c3ee3daf1e6774c087e7d044b4bef4f79
Parents: bb15f3b
Author: Chris Rohr <crohr@nearinfinity.com>
Authored: Fri May 31 23:02:41 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Tue Jun 4 09:30:46 2013 -0400

----------------------------------------------------------------------
 .../assets/javascripts/environment/controller.js   |    4 ++--
 .../app/assets/javascripts/environment/shard.js    |    6 +++---
 .../templates/environment/controller.jst.ejs       |    2 +-
 .../templates/environment/shard.jst.ejs            |    2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/5173251c/src/contrib/blur-console/blur-admin/app/assets/javascripts/environment/controller.js
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/javascripts/environment/controller.js
b/src/contrib/blur-console/blur-admin/app/assets/javascripts/environment/controller.js
index 580329c..6f40294 100644
--- a/src/contrib/blur-console/blur-admin/app/assets/javascripts/environment/controller.js
+++ b/src/contrib/blur-console/blur-admin/app/assets/javascripts/environment/controller.js
@@ -37,7 +37,7 @@ var ControllerCollection = Backbone.StreamCollection.extend({
       }
     });
     this.on('remove', function(controller){
-      if (this.length == 1){
+      if (this.length == 0){
         $('#controllers .no_children').show();
         controller.view.destroy();
       } else {
@@ -59,7 +59,7 @@ var ControllerView = Backbone.View.extend({
     return this;
   },
   setRowStatus: function(){
-    switch(this.model.get('status'))
+    switch(this.model.get('controller_status'))
     {
       case 0:
         this.$el.attr('class', 'error');

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/5173251c/src/contrib/blur-console/blur-admin/app/assets/javascripts/environment/shard.js
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/javascripts/environment/shard.js
b/src/contrib/blur-console/blur-admin/app/assets/javascripts/environment/shard.js
index dd8ef30..8463c62 100644
--- a/src/contrib/blur-console/blur-admin/app/assets/javascripts/environment/shard.js
+++ b/src/contrib/blur-console/blur-admin/app/assets/javascripts/environment/shard.js
@@ -6,10 +6,10 @@ var ShardModel = Backbone.Model.extend({
     return '/blur_shards/' + this.get('id') + '.json';
   },
   status: function(){
-    var statusString = "Shard: " + this.get('node_name');
+    var statusString = this.get('node_name');
     statusString += " | Blur Version: " + this.get('blur_version');
     statusString += " | Status: " + this.onlineStatus();
-    if (this.get('status') != 1) {
+    if (this.get('shard_status') != 1) {
       statusString += " at " + this.offlineDate();
     }
     return statusString;
@@ -59,7 +59,7 @@ var ShardCollection = Backbone.Collection.extend({
     });
   },
   comparator: function(shard){
-    return shard.get('node_name');
+    return [shard.get('shard_status'), shard.get('node_name')];
   }
 });
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/5173251c/src/contrib/blur-console/blur-admin/app/assets/javascripts/templates/environment/controller.jst.ejs
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/javascripts/templates/environment/controller.jst.ejs
b/src/contrib/blur-console/blur-admin/app/assets/javascripts/templates/environment/controller.jst.ejs
index 5b60ca9..9600d59 100644
--- a/src/contrib/blur-console/blur-admin/app/assets/javascripts/templates/environment/controller.jst.ejs
+++ b/src/contrib/blur-console/blur-admin/app/assets/javascripts/templates/environment/controller.jst.ejs
@@ -1,7 +1,7 @@
 <td><%= controller.get('node_name') %></td>
 <td><%= controller.get('blur_version') %></td>
 <td>
-  <% if(controller.get('status') == 0){ %>
+  <% if(controller.get('controller_status') == 0){ %>
     <i class="icon-remove-sign icon-white destroy-controller confirm-action" title="Remove
This Controller" />
   <% } %>
 </td>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/5173251c/src/contrib/blur-console/blur-admin/app/assets/javascripts/templates/environment/shard.jst.ejs
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/javascripts/templates/environment/shard.jst.ejs
b/src/contrib/blur-console/blur-admin/app/assets/javascripts/templates/environment/shard.jst.ejs
index 670e113..6677357 100644
--- a/src/contrib/blur-console/blur-admin/app/assets/javascripts/templates/environment/shard.jst.ejs
+++ b/src/contrib/blur-console/blur-admin/app/assets/javascripts/templates/environment/shard.jst.ejs
@@ -1,4 +1,4 @@
-<% if (shard.get('status') == 0){%>
+<% if (shard.get('shard_status') == 0){%>
   <div class="icon" title="Remove This Shard" data-id="<%= shard.get('id') %>">
     <i class="icon-remove-sign"/>
   </div>


Mime
View raw message