incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cr...@apache.org
Subject [1/4] Standardized the tabs and spaces usage (2 spaces per tab)
Date Tue, 08 Jul 2014 20:57:01 GMT
Repository: incubator-blur
Updated Branches:
  refs/heads/apache-blur-0.2 696bba3c4 -> 79786acad


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/79786aca/blur-console/src/main/webapp/js/blurconsole.tables.js
----------------------------------------------------------------------
diff --git a/blur-console/src/main/webapp/js/blurconsole.tables.js b/blur-console/src/main/webapp/js/blurconsole.tables.js
index 2803e4c..e78c250 100644
--- a/blur-console/src/main/webapp/js/blurconsole.tables.js
+++ b/blur-console/src/main/webapp/js/blurconsole.tables.js
@@ -20,206 +20,206 @@ under the License.
 
 /*global blurconsole:false */
 blurconsole.tables = (function () {
-	'use strict';
+  'use strict';
     
     //------------------------ Configuration and State ----------------------
-	var configMap = {
-		view : 'views/tables.tpl.html',
-		enabledDef : [
-			{label:'Table Name', key: function(row){
-				return row.name + ' <i class="glyphicon glyphicon-exclamation-sign" data-table="'
+ row.name + '" style="display:none" title="Activity detected"></i>';
-			}},
-			{label:'Row Count', key: 'rowCount'},
-			{label:'Record Count', key: 'recordCount'},
-			{label:'Actions', key: function(row) {
-				var actions = '', table = row.name;
-				actions += '<a href="#" class="schemaTrigger btn btn-default" data-name="' + table
+ '"><i class="glyphicon glyphicon-list-alt"></i> Schema</a> ';
-				actions += '<a href="#" class="disableTrigger btn btn-danger" data-name="' + table
+ '"><i class="glyphicon glyphicon-cloud-download"></i> Disable</a> ';
-				return actions;
-			}}
-		],
-		disabledDef : [
-			{label:'Table Name', key:'name'},
-			{label:'Actions', key: function(row) {
-				var actions = '', table = row.name;
-				actions += '<a href="#" class="enableTrigger btn btn-default" data-name="' + table
+ '"><i class="glyphicon glyphicon-cloud-upload"></i> Enable</a> ';
-				actions += '<a href="#" class="deleteTrigger btn btn-danger" data-name="' + table
+ '"><i class="glyphicon glyphicon-trash"></i> Delete</a> ';
-				return actions;
-			}}
-		]
-	},
-	stateMap = { $container : null },
-	jqueryMap = {};
+  var configMap = {
+    view : 'views/tables.tpl.html',
+    enabledDef : [
+      {label:'Table Name', key: function(row){
+        return row.name + ' <i class="glyphicon glyphicon-exclamation-sign" data-table="'
+ row.name + '" style="display:none" title="Activity detected"></i>';
+      }},
+      {label:'Row Count', key: 'rowCount'},
+      {label:'Record Count', key: 'recordCount'},
+      {label:'Actions', key: function(row) {
+        var actions = '', table = row.name;
+        actions += '<a href="#" class="schemaTrigger btn btn-default" data-name="' + table
+ '"><i class="glyphicon glyphicon-list-alt"></i> Schema</a> ';
+        actions += '<a href="#" class="disableTrigger btn btn-danger" data-name="' + table
+ '"><i class="glyphicon glyphicon-cloud-download"></i> Disable</a> ';
+        return actions;
+      }}
+    ],
+    disabledDef : [
+      {label:'Table Name', key:'name'},
+      {label:'Actions', key: function(row) {
+        var actions = '', table = row.name;
+        actions += '<a href="#" class="enableTrigger btn btn-default" data-name="' + table
+ '"><i class="glyphicon glyphicon-cloud-upload"></i> Enable</a> ';
+        actions += '<a href="#" class="deleteTrigger btn btn-danger" data-name="' + table
+ '"><i class="glyphicon glyphicon-trash"></i> Delete</a> ';
+        return actions;
+      }}
+    ]
+  },
+  stateMap = { $container : null },
+  jqueryMap = {};
 
     //----------------------------- Private Methods ----------------------------
-	function _setJqueryMap() {
-		var $container = stateMap.$container;
-		jqueryMap = {
-			$container : $container,
-			$tableInfoHolder : $('#tableInfoHolder'),
-			$tables : {}
-		};
-	}
-
-	function _waitForData() {
-		if (blurconsole.model.tables.getClusters().length > 0) {
-			_buildTabs();
-		} else {
-			setTimeout(_waitForData, 100);
-		}
-	}
+  function _setJqueryMap() {
+    var $container = stateMap.$container;
+    jqueryMap = {
+      $container : $container,
+      $tableInfoHolder : $('#tableInfoHolder'),
+      $tables : {}
+    };
+  }
+
+  function _waitForData() {
+    if (blurconsole.model.tables.getClusters().length > 0) {
+      _buildTabs();
+    } else {
+      setTimeout(_waitForData, 100);
+    }
+  }
     
     function _registerPageEvents() {
-		// Tab control
-		jqueryMap.$tableInfoHolder.on('click', 'ul.nav a', function(e) {
-			e.preventDefault();
-			$(this).tab('show');
-		});
-
-		// View Schema
-		jqueryMap.$tableInfoHolder.on('click', 'a.schemaTrigger', function() {
-			$.gevent.publish('schema-show', $(this).data('name'));
-			return false;
-		});
-
-		// Disable Table
-		jqueryMap.$tableInfoHolder.on('click', 'a.disableTrigger', function() {
-			blurconsole.model.tables.disableTable($(this).data('name'));
-			return false;
-		});
-
-		// Enable Table
-		jqueryMap.$tableInfoHolder.on('click', 'a.enableTrigger', function() {
-			blurconsole.model.tables.enableTable($(this).data('name'));
-			return false;
-		});
-
-		// Delete Table
-		jqueryMap.$tableInfoHolder.on('click', 'a.deleteTrigger', function() {
-			var tableName = $(this).data('name');
-			var modalContent = blurconsole.browserUtils.modal('confirmDelete', 'Confirm Table Deletion',
'You are about to delete table ' + tableName + '.  Are you sure you want to do this? If so,
do you also want to delete the underlying table data?', [
-				{classes: 'btn-warning tableOnly', label: 'Table Only'},
-				{classes: 'btn-danger tableAndData', label: 'Table And Data'},
-				{classes: 'btn-default cancel', label: 'Cancel', data: {dismiss:'modal'}}
-			], 'medium');
-
-			var modal = $(modalContent).modal().on('shown.bs.modal', function(e){
-				$(e.currentTarget).on('click', '.tableOnly', function() {
-					blurconsole.model.tables.deleteTable(tableName, false);
-					modal.modal('hide');
-				}).on('click', '.tableAndData', function() {
-					blurconsole.model.tables.deleteTable(tableName, true);
-					modal.modal('hide');
-				});
-			}).on('hidden.bs.modal', function(e) {
-				$(e.currentTarget).remove();
-			});
-			return false;
-		});
-	}
-
-	function _unregisterPageEvents() {
-		if (jqueryMap.$tableInfoHolder) {
-			jqueryMap.$tableInfoHolder.off();
-		}
-	}
+    // Tab control
+    jqueryMap.$tableInfoHolder.on('click', 'ul.nav a', function(e) {
+      e.preventDefault();
+      $(this).tab('show');
+    });
+
+    // View Schema
+    jqueryMap.$tableInfoHolder.on('click', 'a.schemaTrigger', function() {
+      $.gevent.publish('schema-show', $(this).data('name'));
+      return false;
+    });
+
+    // Disable Table
+    jqueryMap.$tableInfoHolder.on('click', 'a.disableTrigger', function() {
+      blurconsole.model.tables.disableTable($(this).data('name'));
+      return false;
+    });
+
+    // Enable Table
+    jqueryMap.$tableInfoHolder.on('click', 'a.enableTrigger', function() {
+      blurconsole.model.tables.enableTable($(this).data('name'));
+      return false;
+    });
+
+    // Delete Table
+    jqueryMap.$tableInfoHolder.on('click', 'a.deleteTrigger', function() {
+      var tableName = $(this).data('name');
+      var modalContent = blurconsole.browserUtils.modal('confirmDelete', 'Confirm Table Deletion',
'You are about to delete table ' + tableName + '.  Are you sure you want to do this? If so,
do you also want to delete the underlying table data?', [
+        {classes: 'btn-warning tableOnly', label: 'Table Only'},
+        {classes: 'btn-danger tableAndData', label: 'Table And Data'},
+        {classes: 'btn-default cancel', label: 'Cancel', data: {dismiss:'modal'}}
+      ], 'medium');
+
+      var modal = $(modalContent).modal().on('shown.bs.modal', function(e){
+        $(e.currentTarget).on('click', '.tableOnly', function() {
+          blurconsole.model.tables.deleteTable(tableName, false);
+          modal.modal('hide');
+        }).on('click', '.tableAndData', function() {
+          blurconsole.model.tables.deleteTable(tableName, true);
+          modal.modal('hide');
+        });
+      }).on('hidden.bs.modal', function(e) {
+        $(e.currentTarget).remove();
+      });
+      return false;
+    });
+  }
+
+  function _unregisterPageEvents() {
+    if (jqueryMap.$tableInfoHolder) {
+      jqueryMap.$tableInfoHolder.off();
+    }
+  }
     
     //------------------------- Event Handling and DOM Methods ---------------------------
-	function _buildTabs() {
-		var clusters = blurconsole.model.tables.getClusters();
-		var needsTabs = clusters.length > 1;
-
-		if (needsTabs) {
-			var tabMarkup = '<ul class="nav nav-tabs">';
-			tabMarkup += $.map(clusters, function(cluster, idx) {
-				return '<li class="' + (idx === 0 ? 'active' : '') + '"><a href="#' + cluster
+ '_pane" data-toggle="tab">' + cluster + ' <i class="glyphicon glyphicon-exclamation-sign"
style="display:none" title="Activity detected"></i></a></li>';
-			}).join('');
-			tabMarkup += '</ul>';
-
-			jqueryMap.$tableInfoHolder.html($(tabMarkup));
-		}
-
-		var paneMarkup = needsTabs ? '<div class="tab-content">' : '';
-		paneMarkup += $.map(clusters, function(cluster, idx) {
-			return '<div id="' + cluster + '_pane" class="tab-pane' + (idx === 0 ? ' active' :
'') + '"><h3>Enabled Tables</h3><div class="enabledSection"></div><h3>Disabled
Tables</h3><div class="disabledSection"></div></div>';
-		}).join('');
-		paneMarkup += needsTabs ? '</div>' : '';
-
-		if (needsTabs) {
-			jqueryMap.$tableInfoHolder.append(paneMarkup);
-		} else {
-			jqueryMap.$tableInfoHolder.html(paneMarkup);
-		}
-
-		$.each(clusters, function(idx, cluster){
-			var clusterPane = $('#' + cluster + '_pane');
-			clusterPane.find('.enabledSection').html(blurconsole.browserUtils.table(configMap.enabledDef,
blurconsole.model.tables.getEnabledTables(cluster)));
-			clusterPane.find('.disabledSection').html(blurconsole.browserUtils.table(configMap.disabledDef,
blurconsole.model.tables.getDisabledTables(cluster)));
-		});
-	}
-
-	function _updateTableList() {
-		var clusters = blurconsole.model.tables.getClusters();
-
-		$.each(clusters, function(idx, cluster) {
-			var clusterPane = $('#' + cluster + '_pane'), enabledSection, disabledSection;
-			enabledSection = clusterPane.find('.enabledSection');
-			disabledSection = clusterPane.find('.disabledSection');
-
-			if (enabledSection.length > 0) {
-				enabledSection.html(blurconsole.browserUtils.table(configMap.enabledDef, blurconsole.model.tables.getEnabledTables(cluster)));
-			}
-			if (disabledSection.length > 0) {
-				disabledSection.html(blurconsole.browserUtils.table(configMap.disabledDef, blurconsole.model.tables.getDisabledTables(cluster)));
-			}
-		});
-	}
-	
-	function _updateActivityIndicators() {
-		var clusters = blurconsole.model.tables.getClusters();
-
-		$.each(clusters, function(i, cluster) {
-			var clusterHasActivity = false,
-				tables = blurconsole.model.tables.getEnabledTables(cluster);
-
-			$.each(tables, function(i, table){
-				if (blurconsole.model.queries.tableHasActivity(table.name)) {
-					clusterHasActivity = true;
-					$('i[data-table="' + table.name + '"]').show();
-				} else {
-					$('i[data-table="' + table.name + '"]').hide();
-				}
-			});
-
-			if (clusterHasActivity) {
-				$('a[href="#' + cluster +'_pane"] i').show();
-			} else {
-				$('a[href="#' + cluster +'_pane"] i').hide();
-			}
-		});
-	}
+  function _buildTabs() {
+    var clusters = blurconsole.model.tables.getClusters();
+    var needsTabs = clusters.length > 1;
+
+    if (needsTabs) {
+      var tabMarkup = '<ul class="nav nav-tabs">';
+      tabMarkup += $.map(clusters, function(cluster, idx) {
+        return '<li class="' + (idx === 0 ? 'active' : '') + '"><a href="#' + cluster
+ '_pane" data-toggle="tab">' + cluster + ' <i class="glyphicon glyphicon-exclamation-sign"
style="display:none" title="Activity detected"></i></a></li>';
+      }).join('');
+      tabMarkup += '</ul>';
+
+      jqueryMap.$tableInfoHolder.html($(tabMarkup));
+    }
+
+    var paneMarkup = needsTabs ? '<div class="tab-content">' : '';
+    paneMarkup += $.map(clusters, function(cluster, idx) {
+      return '<div id="' + cluster + '_pane" class="tab-pane' + (idx === 0 ? ' active'
: '') + '"><h3>Enabled Tables</h3><div class="enabledSection"></div><h3>Disabled
Tables</h3><div class="disabledSection"></div></div>';
+    }).join('');
+    paneMarkup += needsTabs ? '</div>' : '';
+
+    if (needsTabs) {
+      jqueryMap.$tableInfoHolder.append(paneMarkup);
+    } else {
+      jqueryMap.$tableInfoHolder.html(paneMarkup);
+    }
+
+    $.each(clusters, function(idx, cluster){
+      var clusterPane = $('#' + cluster + '_pane');
+      clusterPane.find('.enabledSection').html(blurconsole.browserUtils.table(configMap.enabledDef,
blurconsole.model.tables.getEnabledTables(cluster)));
+      clusterPane.find('.disabledSection').html(blurconsole.browserUtils.table(configMap.disabledDef,
blurconsole.model.tables.getDisabledTables(cluster)));
+    });
+  }
+
+  function _updateTableList() {
+    var clusters = blurconsole.model.tables.getClusters();
+
+    $.each(clusters, function(idx, cluster) {
+      var clusterPane = $('#' + cluster + '_pane'), enabledSection, disabledSection;
+      enabledSection = clusterPane.find('.enabledSection');
+      disabledSection = clusterPane.find('.disabledSection');
+
+      if (enabledSection.length > 0) {
+        enabledSection.html(blurconsole.browserUtils.table(configMap.enabledDef, blurconsole.model.tables.getEnabledTables(cluster)));
+      }
+      if (disabledSection.length > 0) {
+        disabledSection.html(blurconsole.browserUtils.table(configMap.disabledDef, blurconsole.model.tables.getDisabledTables(cluster)));
+      }
+    });
+  }
+  
+  function _updateActivityIndicators() {
+    var clusters = blurconsole.model.tables.getClusters();
+
+    $.each(clusters, function(i, cluster) {
+      var clusterHasActivity = false,
+        tables = blurconsole.model.tables.getEnabledTables(cluster);
+
+      $.each(tables, function(i, table){
+        if (blurconsole.model.queries.tableHasActivity(table.name)) {
+          clusterHasActivity = true;
+          $('i[data-table="' + table.name + '"]').show();
+        } else {
+          $('i[data-table="' + table.name + '"]').hide();
+        }
+      });
+
+      if (clusterHasActivity) {
+        $('a[href="#' + cluster +'_pane"] i').show();
+      } else {
+        $('a[href="#' + cluster +'_pane"] i').hide();
+      }
+    });
+  }
     
     //-------------------------- Public API ------------------------------
     function unloadModule() {
-		$.gevent.unsubscribe(jqueryMap.$container, 'tables-updated');
-		$.gevent.unsubscribe(jqueryMap.$container, 'queries-updated');
-		_unregisterPageEvents();
-	}
-
-	function initModule($container) {
-		$container.load(configMap.view, function() {
-			stateMap.$container = $container;
-			_setJqueryMap();
-			$.gevent.subscribe(jqueryMap.$container, 'tables-updated', _updateTableList);
-			$.gevent.subscribe(jqueryMap.$container, 'queries-updated', _updateActivityIndicators);
-			_waitForData();
-			_registerPageEvents();
-		});
-		return true;
-	}
-
-	return {
-		initModule : initModule,
-		unloadModule : unloadModule
-	};
+    $.gevent.unsubscribe(jqueryMap.$container, 'tables-updated');
+    $.gevent.unsubscribe(jqueryMap.$container, 'queries-updated');
+    _unregisterPageEvents();
+  }
+
+  function initModule($container) {
+    $container.load(configMap.view, function() {
+      stateMap.$container = $container;
+      _setJqueryMap();
+      $.gevent.subscribe(jqueryMap.$container, 'tables-updated', _updateTableList);
+      $.gevent.subscribe(jqueryMap.$container, 'queries-updated', _updateActivityIndicators);
+      _waitForData();
+      _registerPageEvents();
+    });
+    return true;
+  }
+
+  return {
+    initModule : initModule,
+    unloadModule : unloadModule
+  };
 }());
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/79786aca/blur-console/src/main/webapp/js/blurconsole.utils.js
----------------------------------------------------------------------
diff --git a/blur-console/src/main/webapp/js/blurconsole.utils.js b/blur-console/src/main/webapp/js/blurconsole.utils.js
index d7b290c..d3a3043 100644
--- a/blur-console/src/main/webapp/js/blurconsole.utils.js
+++ b/blur-console/src/main/webapp/js/blurconsole.utils.js
@@ -19,78 +19,78 @@ under the License.
 */
 /*global blurconsole:false */
 blurconsole.utils = (function(){
-	'use strict';
+  'use strict';
     
     //-------------------------- Public API ----------------------------
-	function inject(collection, initial, block) {
-		if (collection === null || collection.length === 0) {
-			return initial;
-		}
-
-		var accumulator = initial == null ? collection[0] : initial;
-		$.each(collection, function(idx, item) {
-			accumulator = block(accumulator, item);
-		});
-
-		return accumulator;
-	}
-
-	function unique(collection, sort) {
-		var uniqueList = [];
-
-		$.each(collection, function(idx, item){
-			if (uniqueList.indexOf(item) === -1) {
-				uniqueList.push(item);
-			}
-		});
-
-		if (sort) {
-			uniqueList.sort();
-		}
-
-		return uniqueList;
-	}
-
-	function equals(obj1, obj2) {
-		return JSON.stringify(obj1) === JSON.stringify(obj2);
-	}
-
-	function keys(map) {
-		return $.map(map, function(v, key){ return key; });
-	}
-
-	function findFamilies(query) {
-		// Determine regex to find column families in lucene query
-		var matches = query.match(/[^ \(\)\+\-]+(\w+)\.\w+:/g);
-
-		if (matches === null) {
-			return [];
-		}
-
-		var families = [];
-		$.each(matches, function(idx, match) {
-			families.push(match.split('.')[0]);
-		});
-		return families;
-	}
-
-	function reject(collection, block) {
-		var newArray = [];
-		$.each(collection, function(i, item){
-			if (!block(item)) {
-				newArray.push(item);
-			}
-		});
-		return newArray;
-	}
-
-	return {
-		inject: inject,
-		reduce: inject,
-		unique: unique,
-		equals: equals,
-		keys: keys,
-		findFamilies: findFamilies,
-		reject: reject
-	};
+  function inject(collection, initial, block) {
+    if (collection === null || collection.length === 0) {
+      return initial;
+    }
+
+    var accumulator = initial == null ? collection[0] : initial;
+    $.each(collection, function(idx, item) {
+      accumulator = block(accumulator, item);
+    });
+
+    return accumulator;
+  }
+
+  function unique(collection, sort) {
+    var uniqueList = [];
+
+    $.each(collection, function(idx, item){
+      if (uniqueList.indexOf(item) === -1) {
+        uniqueList.push(item);
+      }
+    });
+
+    if (sort) {
+      uniqueList.sort();
+    }
+
+    return uniqueList;
+  }
+
+  function equals(obj1, obj2) {
+    return JSON.stringify(obj1) === JSON.stringify(obj2);
+  }
+
+  function keys(map) {
+    return $.map(map, function(v, key){ return key; });
+  }
+
+  function findFamilies(query) {
+    // Determine regex to find column families in lucene query
+    var matches = query.match(/[^ \(\)\+\-]+(\w+)\.\w+:/g);
+
+    if (matches === null) {
+      return [];
+    }
+
+    var families = [];
+    $.each(matches, function(idx, match) {
+      families.push(match.split('.')[0]);
+    });
+    return families;
+  }
+
+  function reject(collection, block) {
+    var newArray = [];
+    $.each(collection, function(i, item){
+      if (!block(item)) {
+        newArray.push(item);
+      }
+    });
+    return newArray;
+  }
+
+  return {
+    inject: inject,
+    reduce: inject,
+    unique: unique,
+    equals: equals,
+    keys: keys,
+    findFamilies: findFamilies,
+    reject: reject
+  };
 }());
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/79786aca/blur-console/src/main/webapp/less/blurconsole.dashboard.less
----------------------------------------------------------------------
diff --git a/blur-console/src/main/webapp/less/blurconsole.dashboard.less b/blur-console/src/main/webapp/less/blurconsole.dashboard.less
index 1b583ec..d53eebb 100644
--- a/blur-console/src/main/webapp/less/blurconsole.dashboard.less
+++ b/blur-console/src/main/webapp/less/blurconsole.dashboard.less
@@ -18,33 +18,33 @@ specific language governing permissions and limitations
 under the License.
  */
 .simple-chart {
-	min-height : 200px;
-	min-width : 200px;
-	max-height : 300px;
-	max-width : 300px;
-	margin-left : auto;
-	margin-right : auto;
+  min-height : 200px;
+  min-width : 200px;
+  max-height : 300px;
+  max-width : 300px;
+  margin-left : auto;
+  margin-right : auto;
 }
 
 .wide-chart {
-	min-height : 100px;
-	min-width : 200px;
-	max-height : 200px;
-	max-width : 1000px;
-	margin-left : auto;
-	margin-right : auto;
+  min-height : 100px;
+  min-width : 200px;
+  max-height : 200px;
+  max-width : 1000px;
+  margin-left : auto;
+  margin-right : auto;
 }
 
 .swapper-trigger {
-	cursor : pointer;
+  cursor : pointer;
 }
 
 .swapper-info {
-	min-height : 200px;
-	min-width : 200px;
-	max-height : 300px;
-	max-width : 300px;
-	margin-left : auto;
-	margin-right : auto;
-	overflow: auto;
+  min-height : 200px;
+  min-width : 200px;
+  max-height : 300px;
+  max-width : 300px;
+  margin-left : auto;
+  margin-right : auto;
+  overflow: auto;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/79786aca/blur-console/src/main/webapp/less/blurconsole.queries.less
----------------------------------------------------------------------
diff --git a/blur-console/src/main/webapp/less/blurconsole.queries.less b/blur-console/src/main/webapp/less/blurconsole.queries.less
index e473517..35e8200 100644
--- a/blur-console/src/main/webapp/less/blurconsole.queries.less
+++ b/blur-console/src/main/webapp/less/blurconsole.queries.less
@@ -18,5 +18,5 @@ under the License.
 */
 
 #filterOptions {
-	margin-bottom: 5px;
+  margin-bottom: 5px;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/79786aca/blur-console/src/main/webapp/less/blurconsole.schema.less
----------------------------------------------------------------------
diff --git a/blur-console/src/main/webapp/less/blurconsole.schema.less b/blur-console/src/main/webapp/less/blurconsole.schema.less
index 072d5d3..73f1b66 100644
--- a/blur-console/src/main/webapp/less/blurconsole.schema.less
+++ b/blur-console/src/main/webapp/less/blurconsole.schema.less
@@ -17,32 +17,32 @@ specific language governing permissions and limitations
 under the License.
 */
 .modal {
-	.schemaColumnDef {
-		display: none;
-		&.in {
-			display: block;
-		}
-		strong {
-			width: 140px;
-			display: inline-block;
-		}
-	}
+  .schemaColumnDef {
+    display: none;
+    &.in {
+      display: block;
+    }
+    strong {
+      width: 140px;
+      display: inline-block;
+    }
+  }
 
-	.schemaColumn {
-		cursor: pointer;
-	}
+  .schemaColumn {
+    cursor: pointer;
+  }
 
-	.schemaColumnTerms {
-		display: none;
-		.termList {
-			margin-top: 5px;
-			.searchTrigger {
-				cursor: pointer;
-			}
-		}
-	}
+  .schemaColumnTerms {
+    display: none;
+    .termList {
+      margin-top: 5px;
+      .searchTrigger {
+        cursor: pointer;
+      }
+    }
+  }
 
-	.schemaList .panel-heading {
-		cursor: pointer;
-	}
+  .schemaList .panel-heading {
+    cursor: pointer;
+  }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/79786aca/blur-console/src/main/webapp/less/blurconsole.search.less
----------------------------------------------------------------------
diff --git a/blur-console/src/main/webapp/less/blurconsole.search.less b/blur-console/src/main/webapp/less/blurconsole.search.less
index 3eaa3b2..305f2ba 100644
--- a/blur-console/src/main/webapp/less/blurconsole.search.less
+++ b/blur-console/src/main/webapp/less/blurconsole.search.less
@@ -19,41 +19,41 @@ under the License.
  */
 
 #results {
-	.panel {
-		display:inline-block;
-		margin-right: 10px;
-		min-width: 100%;
-	}
-	.panel-heading {
-		cursor: pointer;
-	}
-	.panel-collapse {
-		padding: 5px;
-	}
+  .panel {
+    display:inline-block;
+    margin-right: 10px;
+    min-width: 100%;
+  }
+  .panel-heading {
+    cursor: pointer;
+  }
+  .panel-collapse {
+    padding: 5px;
+  }
 }
 
 #resultCount {
-	padding-left: 30px;
-	font-style: italic;
+  padding-left: 30px;
+  font-style: italic;
 }
 
 #resultInfo {
-	margin-top: 3px;
+  margin-top: 3px;
 }
 
 tr.row-separator {
-	th {
-		background-color: @search-row-background;
-	}
-	&:hover th {
-		background-color: @search-row-background !important;
-	}
+  th {
+    background-color: @search-row-background;
+  }
+  &:hover th {
+    background-color: @search-row-background !important;
+  }
 }
 
 .input-group .twitter-typeahead {
-	float: left;
-	width: 100%;
-	.form-control {
-	  border-radius: 4px 0px 0px 4px;
-	}
+  float: left;
+  width: 100%;
+  .form-control {
+    border-radius: 4px 0px 0px 4px;
+  }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/79786aca/blur-console/src/main/webapp/test/unit/utilsTest.js
----------------------------------------------------------------------
diff --git a/blur-console/src/main/webapp/test/unit/utilsTest.js b/blur-console/src/main/webapp/test/unit/utilsTest.js
index 6544f65..554a810 100644
--- a/blur-console/src/main/webapp/test/unit/utilsTest.js
+++ b/blur-console/src/main/webapp/test/unit/utilsTest.js
@@ -24,11 +24,11 @@ under the License.
 describe('Test blurconsole.utils', function () {
     describe('inject', function () {
         it('[1,2,3,4,5] should be 15 with simple summing', function () {
-			expect(blurconsole.utils.inject([1,2,3,4,5], 0, function(sum, item){ return sum + item;
})).to.equal(15);
+      expect(blurconsole.utils.inject([1,2,3,4,5], 0, function(sum, item){ return sum + item;
})).to.equal(15);
         });
 
         it('null collection should return initial value', function() {
-			expect(blurconsole.utils.inject(null, 0, function(sum, item){ return item; })).to.equal(0);
+      expect(blurconsole.utils.inject(null, 0, function(sum, item){ return item; })).to.equal(0);
         });
     });
 });
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/79786aca/blur-console/src/test/java/org/apache/blur/console/util/ConfigTest.java
----------------------------------------------------------------------
diff --git a/blur-console/src/test/java/org/apache/blur/console/util/ConfigTest.java b/blur-console/src/test/java/org/apache/blur/console/util/ConfigTest.java
index 3d2c922..efec10a 100644
--- a/blur-console/src/test/java/org/apache/blur/console/util/ConfigTest.java
+++ b/blur-console/src/test/java/org/apache/blur/console/util/ConfigTest.java
@@ -30,30 +30,30 @@ import org.junit.Before;
 import org.junit.Test;
 
 public class ConfigTest extends ConsoleTestBase {
-	
-	@Before
-	public void setup() throws IOException {
-		Config.setupConfig();
-	}
+  
+  @Before
+  public void setup() throws IOException {
+    Config.setupConfig();
+  }
 
-	@Test
-	public void testGetConsolePort() {
-		assertEquals(8080, Config.getConsolePort());
-	}
+  @Test
+  public void testGetConsolePort() {
+    assertEquals(8080, Config.getConsolePort());
+  }
 
-	@Test
-	public void testGetBlurConfig() {
-		BlurConfiguration blurConfig = Config.getBlurConfig();
-		assertNotNull(blurConfig);
-	}
+  @Test
+  public void testGetBlurConfig() {
+    BlurConfiguration blurConfig = Config.getBlurConfig();
+    assertNotNull(blurConfig);
+  }
 
-	@Test
-	public void testGetConnectionString() throws IOException {
-		assertTrue(StringUtils.contains(Config.getConnectionString(), InetAddress.getLocalHost().getHostName()));
-	}
-	
-	@Test
-	public void testGetZookeeper() {
-		assertNotNull(Config.getZookeeper());
-	}
+  @Test
+  public void testGetConnectionString() throws IOException {
+    assertTrue(StringUtils.contains(Config.getConnectionString(), InetAddress.getLocalHost().getHostName()));
+  }
+  
+  @Test
+  public void testGetZookeeper() {
+    assertNotNull(Config.getZookeeper());
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/79786aca/blur-console/src/test/java/org/apache/blur/console/util/NodeUtilTest.java
----------------------------------------------------------------------
diff --git a/blur-console/src/test/java/org/apache/blur/console/util/NodeUtilTest.java b/blur-console/src/test/java/org/apache/blur/console/util/NodeUtilTest.java
index 1d56b92..6403ea6 100644
--- a/blur-console/src/test/java/org/apache/blur/console/util/NodeUtilTest.java
+++ b/blur-console/src/test/java/org/apache/blur/console/util/NodeUtilTest.java
@@ -30,35 +30,35 @@ import org.junit.Before;
 import org.junit.Test;
 
 public class NodeUtilTest extends ConsoleTestBase {
-	@Before
-	public void setup() throws BlurException, TException, IOException {
-		setupConfigIfNeeded();
-	}
-	
-	@SuppressWarnings("unchecked")
-	@Test
-	public void testGetControllerStatus() throws BlurException, IOException, TException {
-		Map<String, Object> nodeStatus = NodeUtil.getControllerStatus();
-		
-		assertEquals(2, ((List<String>) nodeStatus.get("online")).size());
-		assertEquals(0, ((List<String>) nodeStatus.get("offline")).size());
-	}
-	
-	@SuppressWarnings("unchecked")
-	@Test
-	public void testGetZookeeperStatus() throws BlurException, IOException, TException {
-		Map<String, Object> nodeStatus = NodeUtil.getZookeeperStatus();
-		
-		assertEquals(0, ((HashSet<String>) nodeStatus.get("online")).size());
-		assertEquals(1, ((HashSet<String>) nodeStatus.get("offline")).size());
-	}
-	
-	@SuppressWarnings("unchecked")
-	@Test
-	public void testGetClusterStatus() throws BlurException, IOException, TException {
-		List<Map<String, Object>> nodeStatus = NodeUtil.getClusterStatus();
-		
-		assertEquals(3, ((List<String>) nodeStatus.get(0).get("online")).size());
-		assertEquals(0, ((List<String>) nodeStatus.get(0).get("offline")).size());
-	}
+  @Before
+  public void setup() throws BlurException, TException, IOException {
+    setupConfigIfNeeded();
+  }
+  
+  @SuppressWarnings("unchecked")
+  @Test
+  public void testGetControllerStatus() throws BlurException, IOException, TException {
+    Map<String, Object> nodeStatus = NodeUtil.getControllerStatus();
+    
+    assertEquals(2, ((List<String>) nodeStatus.get("online")).size());
+    assertEquals(0, ((List<String>) nodeStatus.get("offline")).size());
+  }
+  
+  @SuppressWarnings("unchecked")
+  @Test
+  public void testGetZookeeperStatus() throws BlurException, IOException, TException {
+    Map<String, Object> nodeStatus = NodeUtil.getZookeeperStatus();
+    
+    assertEquals(0, ((HashSet<String>) nodeStatus.get("online")).size());
+    assertEquals(1, ((HashSet<String>) nodeStatus.get("offline")).size());
+  }
+  
+  @SuppressWarnings("unchecked")
+  @Test
+  public void testGetClusterStatus() throws BlurException, IOException, TException {
+    List<Map<String, Object>> nodeStatus = NodeUtil.getClusterStatus();
+    
+    assertEquals(3, ((List<String>) nodeStatus.get(0).get("online")).size());
+    assertEquals(0, ((List<String>) nodeStatus.get(0).get("offline")).size());
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/79786aca/blur-console/src/test/java/org/apache/blur/console/util/QueryUtilTest.java
----------------------------------------------------------------------
diff --git a/blur-console/src/test/java/org/apache/blur/console/util/QueryUtilTest.java b/blur-console/src/test/java/org/apache/blur/console/util/QueryUtilTest.java
index 0077cc8..c765a42 100644
--- a/blur-console/src/test/java/org/apache/blur/console/util/QueryUtilTest.java
+++ b/blur-console/src/test/java/org/apache/blur/console/util/QueryUtilTest.java
@@ -44,56 +44,56 @@ import org.junit.Before;
 import org.junit.Test;
 
 public class QueryUtilTest extends ConsoleTestBase {
-	@Before
-	public void setup() throws IOException, BlurException, TException {
-		setupConfigIfNeeded();
-		
-		Iface client = BlurClient.getClient(Config.getConnectionString());
-		
-		if (!client.tableList().contains("queryUnitTable")) {
-			TableDescriptor td = new TableDescriptor();
-			td.setShardCount(11);
-			td.setTableUri("file://" + TABLE_PATH + "/queryUnitTable");
-			td.setCluster("default");
-			td.setName("queryUnitTable");
-			td.setEnabled(true);
-			client.createTable(td);
-			
-			Record record = new Record("abcd", "fam0", Arrays.asList(new Column[]{ new Column("col0",
"testvalue")}));
-			RecordMutation recordMutation = new RecordMutation(RecordMutationType.REPLACE_ENTIRE_RECORD,
record);
-			RowMutation rowMutation = new RowMutation("queryUnitTable", "12345", RowMutationType.REPLACE_ROW,
Arrays.asList(new RecordMutation[]{ recordMutation }));
-			client.mutate(rowMutation);
-		}
-	}
-	
-	@Test
-	public void testGetCurrentQueryCount() throws BlurException, IOException, TException {
-		Iface client = BlurClient.getClient(Config.getConnectionString());
-		BlurQuery query = new BlurQuery(
-				new Query("fam0.col0:*", true, ScoreType.SUPER, null, null), 
-				null, 
-				null, //new Selector(false, null, null, null, null, null, 0, 10, null), 
-				false, 0, 10, 1, 2000, UUID.randomUUID().toString(), "testUser", false, System.currentTimeMillis(),null,null);
-		client.query("queryUnitTable", query);
-		
-		assertEquals(1, QueryUtil.getCurrentQueryCount());
-	}
-	
-	@SuppressWarnings("unchecked")
-	@Test
-	public void testGetQueries() throws IOException, BlurException, TException {
-		Iface client = BlurClient.getClient(Config.getConnectionString());
-		BlurQuery query = new BlurQuery(
-				new Query("fam0.col0:*", true, ScoreType.SUPER, null, null), 
-				null, 
-				null, //new Selector(false, null, null, null, null, null, 0, 10, null), 
-				false, 0, 10, 1, 2000, UUID.randomUUID().toString(), "testUser", false, System.currentTimeMillis(),null,null);
-		client.query("queryUnitTable", query);
-		
-		Map<String, Object> queries = QueryUtil.getQueries();
-		
-		assertEquals(0, queries.get("slowQueries"));
-		assertEquals(2, ((List<Map<String, Object>>) queries.get("queries")).size());
-		assertEquals("testUser", ((List<Map<String, Object>>)queries.get("queries")).get(0).get("user"));
-	}
+  @Before
+  public void setup() throws IOException, BlurException, TException {
+    setupConfigIfNeeded();
+    
+    Iface client = BlurClient.getClient(Config.getConnectionString());
+    
+    if (!client.tableList().contains("queryUnitTable")) {
+      TableDescriptor td = new TableDescriptor();
+      td.setShardCount(11);
+      td.setTableUri("file://" + TABLE_PATH + "/queryUnitTable");
+      td.setCluster("default");
+      td.setName("queryUnitTable");
+      td.setEnabled(true);
+      client.createTable(td);
+      
+      Record record = new Record("abcd", "fam0", Arrays.asList(new Column[]{ new Column("col0",
"testvalue")}));
+      RecordMutation recordMutation = new RecordMutation(RecordMutationType.REPLACE_ENTIRE_RECORD,
record);
+      RowMutation rowMutation = new RowMutation("queryUnitTable", "12345", RowMutationType.REPLACE_ROW,
Arrays.asList(new RecordMutation[]{ recordMutation }));
+      client.mutate(rowMutation);
+    }
+  }
+  
+  @Test
+  public void testGetCurrentQueryCount() throws BlurException, IOException, TException {
+    Iface client = BlurClient.getClient(Config.getConnectionString());
+    BlurQuery query = new BlurQuery(
+        new Query("fam0.col0:*", true, ScoreType.SUPER, null, null), 
+        null, 
+        null, //new Selector(false, null, null, null, null, null, 0, 10, null), 
+        false, 0, 10, 1, 2000, UUID.randomUUID().toString(), "testUser", false, System.currentTimeMillis(),null,null);
+    client.query("queryUnitTable", query);
+    
+    assertEquals(1, QueryUtil.getCurrentQueryCount());
+  }
+  
+  @SuppressWarnings("unchecked")
+  @Test
+  public void testGetQueries() throws IOException, BlurException, TException {
+    Iface client = BlurClient.getClient(Config.getConnectionString());
+    BlurQuery query = new BlurQuery(
+        new Query("fam0.col0:*", true, ScoreType.SUPER, null, null), 
+        null, 
+        null, //new Selector(false, null, null, null, null, null, 0, 10, null), 
+        false, 0, 10, 1, 2000, UUID.randomUUID().toString(), "testUser", false, System.currentTimeMillis(),null,null);
+    client.query("queryUnitTable", query);
+    
+    Map<String, Object> queries = QueryUtil.getQueries();
+    
+    assertEquals(0, queries.get("slowQueries"));
+    assertEquals(2, ((List<Map<String, Object>>) queries.get("queries")).size());
+    assertEquals("testUser", ((List<Map<String, Object>>)queries.get("queries")).get(0).get("user"));
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/79786aca/blur-console/src/test/java/org/apache/blur/console/util/TableUtilTest.java
----------------------------------------------------------------------
diff --git a/blur-console/src/test/java/org/apache/blur/console/util/TableUtilTest.java b/blur-console/src/test/java/org/apache/blur/console/util/TableUtilTest.java
index e3d580c..c0d1969 100644
--- a/blur-console/src/test/java/org/apache/blur/console/util/TableUtilTest.java
+++ b/blur-console/src/test/java/org/apache/blur/console/util/TableUtilTest.java
@@ -32,49 +32,49 @@ import org.junit.Before;
 import org.junit.Test;
 
 public class TableUtilTest extends ConsoleTestBase {
-	
-	@Before
-	public void ensureCleanTables() throws BlurException, TException, IOException {
-		setupConfigIfNeeded();
-		
-		Iface client = BlurClient.getClient(Config.getConnectionString());
-		List<String> tableList = client.tableList();
-		if (!tableList.isEmpty()) {
-			for (String table : tableList) {
-				client.disableTable(table);
-				client.removeTable(table, true);
-			}
-		}
-	}
-	
-	@SuppressWarnings("rawtypes")
-	@Test
-	public void testGetTableSummariesNoTables() throws BlurException, IOException, TException
{
-		Map<String, List> data = TableUtil.getTableSummaries();
-		
-		assertEquals(0, data.get("tables").size());
-	}
-	
-	@SuppressWarnings({ "unchecked", "rawtypes" })
-	@Test
-	public void testGetTableSummaries() throws BlurException, TException, IOException {
-		Iface client = BlurClient.getClient(Config.getConnectionString());
-		
-		TableDescriptor td = new TableDescriptor();
-		td.setShardCount(11);
-		td.setTableUri("file://" + TABLE_PATH + "/tableUnitTable");
-		td.setCluster("default");
-		td.setName("tableUnitTable");
-		td.setEnabled(true);
-		client.createTable(td);
-		
-		Map<String, List> data = TableUtil.getTableSummaries();
-		
-		assertEquals(1, data.get("tables").size());
-		assertEquals(0l, ((Map<String, Object>) data.get("tables").get(0)).get("rows"));
-		assertEquals(0l, ((Map<String,Object>) data.get("tables").get(0)).get("records"));
-		assertEquals("default", ((Map<String,Object>) data.get("tables").get(0)).get("cluster"));
-		assertEquals("tableUnitTable", ((Map<String,Object>) data.get("tables").get(0)).get("name"));
-		assertEquals(0, ((List<String>) ((Map<String,Object>) data.get("tables").get(0)).get("families")).size());
-	}
+  
+  @Before
+  public void ensureCleanTables() throws BlurException, TException, IOException {
+    setupConfigIfNeeded();
+    
+    Iface client = BlurClient.getClient(Config.getConnectionString());
+    List<String> tableList = client.tableList();
+    if (!tableList.isEmpty()) {
+      for (String table : tableList) {
+        client.disableTable(table);
+        client.removeTable(table, true);
+      }
+    }
+  }
+  
+  @SuppressWarnings("rawtypes")
+  @Test
+  public void testGetTableSummariesNoTables() throws BlurException, IOException, TException
{
+    Map<String, List> data = TableUtil.getTableSummaries();
+    
+    assertEquals(0, data.get("tables").size());
+  }
+  
+  @SuppressWarnings({ "unchecked", "rawtypes" })
+  @Test
+  public void testGetTableSummaries() throws BlurException, TException, IOException {
+    Iface client = BlurClient.getClient(Config.getConnectionString());
+    
+    TableDescriptor td = new TableDescriptor();
+    td.setShardCount(11);
+    td.setTableUri("file://" + TABLE_PATH + "/tableUnitTable");
+    td.setCluster("default");
+    td.setName("tableUnitTable");
+    td.setEnabled(true);
+    client.createTable(td);
+    
+    Map<String, List> data = TableUtil.getTableSummaries();
+    
+    assertEquals(1, data.get("tables").size());
+    assertEquals(0l, ((Map<String, Object>) data.get("tables").get(0)).get("rows"));
+    assertEquals(0l, ((Map<String,Object>) data.get("tables").get(0)).get("records"));
+    assertEquals("default", ((Map<String,Object>) data.get("tables").get(0)).get("cluster"));
+    assertEquals("tableUnitTable", ((Map<String,Object>) data.get("tables").get(0)).get("name"));
+    assertEquals(0, ((List<String>) ((Map<String,Object>) data.get("tables").get(0)).get("families")).size());
+  }
 }


Mime
View raw message