ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [17/50] [abbrv] incubator-ignite git commit: IGNITE-843 Code format.
Date Thu, 23 Jul 2015 08:40:48 GMT
IGNITE-843 Code format.


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

Branch: refs/heads/ignite-1121
Commit: 576c87d2f9688fca8b94a6f95ec12a8e599d9728
Parents: 27b6f95
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Tue Jul 21 13:11:19 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Tue Jul 21 13:11:19 2015 +0700

----------------------------------------------------------------------
 .../nodejs/controllers/caches-controller.js     |  4 +-
 .../nodejs/controllers/common-module.js         |  4 +-
 .../nodejs/controllers/metadata-controller.js   | 36 +++++++++------
 .../nodejs/controllers/models/clusters.json     | 24 +++++++---
 .../nodejs/controllers/models/metadata.json     | 47 +++++++++++++++-----
 .../nodejs/controllers/profile-controller.js    |  2 +-
 .../nodejs/controllers/summary-controller.js    | 26 ++++++-----
 7 files changed, 96 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/576c87d2/modules/web-control-center/nodejs/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/caches-controller.js b/modules/web-control-center/nodejs/controllers/caches-controller.js
index 3cef598..b050103 100644
--- a/modules/web-control-center/nodejs/controllers/caches-controller.js
+++ b/modules/web-control-center/nodejs/controllers/caches-controller.js
@@ -147,7 +147,9 @@ controlCenterModule.controller('cachesController', ['$scope', '$http',
'$common'
             var model = item[field.model];
 
             if ($common.isDefined(model)) {
-                var idx = _.findIndex(model, function (pair) {return pair.keyClass == keyCls});
+                var idx = _.findIndex(model, function (pair) {
+                    return pair.keyClass == keyCls
+                });
 
                 // Found itself.
                 if (index >= 0 && index == idx)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/576c87d2/modules/web-control-center/nodejs/controllers/common-module.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/common-module.js b/modules/web-control-center/nodejs/controllers/common-module.js
index f011a59..5118af8 100644
--- a/modules/web-control-center/nodejs/controllers/common-module.js
+++ b/modules/web-control-center/nodejs/controllers/common-module.js
@@ -256,7 +256,7 @@ controlCenterModule.service('$table', ['$common', function ($common) {
                     _model(item, field)[field.model][index] = newValue;
             }
         },
-        tableSimpleSaveVisible: function(newValue) {
+        tableSimpleSaveVisible: function (newValue) {
             return $common.isNonEmpty(newValue);
         },
         tableSimpleUp: function (item, field, index) {
@@ -295,7 +295,7 @@ controlCenterModule.service('$table', ['$common', function ($common) {
                 }
             }
         },
-        tablePairSaveVisible: function(newKey, newValue) {
+        tablePairSaveVisible: function (newKey, newValue) {
             return $common.isNonEmpty(newKey) && $common.isNonEmpty(newValue);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/576c87d2/modules/web-control-center/nodejs/controllers/metadata-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/metadata-controller.js b/modules/web-control-center/nodejs/controllers/metadata-controller.js
index 1064f3a..f577dea 100644
--- a/modules/web-control-center/nodejs/controllers/metadata-controller.js
+++ b/modules/web-control-center/nodejs/controllers/metadata-controller.js
@@ -387,7 +387,9 @@ controlCenterModule.controller('metadataController', ['$scope', '$http',
'$commo
 
                             var metadatas = $scope.metadatas;
 
-                            var idx = _.findIndex(metadatas, function (metadata) { return
metadata._id == _id; });
+                            var idx = _.findIndex(metadatas, function (metadata) {
+                                return metadata._id == _id;
+                            });
 
                             if (idx >= 0) {
                                 metadatas.splice(i, idx);
@@ -431,7 +433,9 @@ controlCenterModule.controller('metadataController', ['$scope', '$http',
'$commo
             var model = item[field.model];
 
             if ($common.isDefined(model)) {
-                var idx = _.findIndex(model, function (pair) {return pair.name == name});
+                var idx = _.findIndex(model, function (pair) {
+                    return pair.name == name
+                });
 
                 // Found itself.
                 if (index >= 0 && index == idx)
@@ -448,12 +452,12 @@ controlCenterModule.controller('metadataController', ['$scope', '$http',
'$commo
             return true;
         };
 
-        $scope.tableDbFieldSaveVisible = function(dbName, dbType, javaName, javaType){
+        $scope.tableDbFieldSaveVisible = function (dbName, dbType, javaName, javaType) {
             return $common.isNonEmpty(dbName) && $common.isDefined(dbType) &&
                 $common.isNonEmpty(javaName) && $common.isDefined(javaType);
         };
 
-        $scope.tableDbFieldSave = function(field, newDbName, newDbType, newJavaName, newJavaType,
index) {
+        $scope.tableDbFieldSave = function (field, newDbName, newDbType, newJavaName, newJavaType,
index) {
             var item = $scope.backupItem;
 
             var model = item[field.model];
@@ -461,7 +465,9 @@ controlCenterModule.controller('metadataController', ['$scope', '$http',
'$commo
             var newItem = {dbName: newDbName, dbType: newDbType, javaName: newJavaName, javaType:
newJavaType};
 
             if ($common.isDefined(model)) {
-                var idx = _.findIndex(model, function (dbMeta) {return dbMeta.dbName == newDbName});
+                var idx = _.findIndex(model, function (dbMeta) {
+                    return dbMeta.dbName == newDbName
+                });
 
                 // Found duplicate.
                 if (idx >= 0 && index != idx) {
@@ -491,7 +497,7 @@ controlCenterModule.controller('metadataController', ['$scope', '$http',
'$commo
             $table.tableReset();
         };
 
-        $scope.tableGroupSaveVisible = function(group) {
+        $scope.tableGroupSaveVisible = function (group) {
             return $common.isNonEmpty(group);
         };
 
@@ -499,7 +505,9 @@ controlCenterModule.controller('metadataController', ['$scope', '$http',
'$commo
             var groups = $scope.backupItem.groups;
 
             if ($common.isDefined(groups)) {
-                var idx = _.findIndex(groups, function (group) {return group.name == groupName});
+                var idx = _.findIndex(groups, function (group) {
+                    return group.name == groupName
+                });
 
                 // Found itself.
                 if (index >= 0 && index == idx)
@@ -516,7 +524,7 @@ controlCenterModule.controller('metadataController', ['$scope', '$http',
'$commo
             return true;
         }
 
-        $scope.tableGroupSave = function(groupName, index) {
+        $scope.tableGroupSave = function (groupName, index) {
             if (tableGroupValid(groupName, index)) {
                 $table.tableReset();
 
@@ -535,13 +543,13 @@ controlCenterModule.controller('metadataController', ['$scope', '$http',
'$commo
             }
         };
 
-        $scope.tableGroupNewItem = function(groupIndex) {
+        $scope.tableGroupNewItem = function (groupIndex) {
             var groupName = $scope.backupItem.groups[groupIndex].name;
 
             return $table.tableNewItem({model: groupName});
         };
 
-        $scope.tableGroupNewItemActive = function(groupIndex) {
+        $scope.tableGroupNewItemActive = function (groupIndex) {
             var groupName = $scope.backupItem.groups[groupIndex].name;
 
             return $table.tableNewItemActive({model: groupName});
@@ -556,7 +564,7 @@ controlCenterModule.controller('metadataController', ['$scope', '$http',
'$commo
             return false;
         };
 
-        $scope.tableGroupItemStartEdit = function(groupIndex, index) {
+        $scope.tableGroupItemStartEdit = function (groupIndex, index) {
             var groups = $scope.backupItem.groups;
 
             $table.tableState(groups[groupIndex].name, index);
@@ -564,11 +572,11 @@ controlCenterModule.controller('metadataController', ['$scope', '$http',
'$commo
             return groups[groupIndex].fields[index];
         };
 
-        $scope.tableGroupItemSaveVisible = function(fieldName, className) {
+        $scope.tableGroupItemSaveVisible = function (fieldName, className) {
             return $common.isNonEmpty(fieldName) && $common.isNonEmpty(className);
         };
 
-        $scope.tableGroupItemSave = function(fieldName, className, direction, groupIndex,
index) {
+        $scope.tableGroupItemSave = function (fieldName, className, direction, groupIndex,
index) {
             $table.tableReset();
 
             var group = $scope.backupItem.groups[groupIndex];
@@ -590,7 +598,7 @@ controlCenterModule.controller('metadataController', ['$scope', '$http',
'$commo
             }
         };
 
-        $scope.tableRemoveGroupItem = function(group, index) {
+        $scope.tableRemoveGroupItem = function (group, index) {
             $table.tableReset();
 
             group.fields.splice(index, 1);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/576c87d2/modules/web-control-center/nodejs/controllers/models/clusters.json
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/models/clusters.json b/modules/web-control-center/nodejs/controllers/models/clusters.json
index fbafc59..b1955d1 100644
--- a/modules/web-control-center/nodejs/controllers/models/clusters.json
+++ b/modules/web-control-center/nodejs/controllers/models/clusters.json
@@ -546,7 +546,9 @@
     },
     {
       "label": "Metrics",
-      "tip": ["Cluster runtime metrics settings."],
+      "tip": [
+        "Cluster runtime metrics settings."
+      ],
       "fields": [
         {
           "label": "Elapsed time",
@@ -595,7 +597,9 @@
     },
     {
       "label": "Peer Class Loading",
-      "tip": ["Cluster peer class loading settings."],
+      "tip": [
+        "Cluster peer class loading settings."
+      ],
       "fields": [
         {
           "label": "Enable peer class loading",
@@ -638,7 +642,9 @@
     },
     {
       "label": "Swap",
-      "tip": ["Settings for overflow data to disk if it cannot fit in memory."],
+      "tip": [
+        "Settings for overflow data to disk if it cannot fit in memory."
+      ],
       "fields": [
         {
           "label": "Swap space SPI",
@@ -715,7 +721,9 @@
     },
     {
       "label": "Time configuration",
-      "tip": ["Time settings for CLOCK write ordering mode."],
+      "tip": [
+        "Time settings for CLOCK write ordering mode."
+      ],
       "fields": [
         {
           "label": "Samples size",
@@ -761,7 +769,9 @@
     },
     {
       "label": "Thread pools size",
-      "tip": ["Settings for node thread pools."],
+      "tip": [
+        "Settings for node thread pools."
+      ],
       "fields": [
         {
           "label": "Public",
@@ -803,7 +813,9 @@
     },
     {
       "label": "Transactions",
-      "tip": ["Settings for transactions."],
+      "tip": [
+        "Settings for transactions."
+      ],
       "fields": [
         {
           "label": "Concurrency",

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/576c87d2/modules/web-control-center/nodejs/controllers/models/metadata.json
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/models/metadata.json b/modules/web-control-center/nodejs/controllers/models/metadata.json
index d32d546..d2d0bea 100644
--- a/modules/web-control-center/nodejs/controllers/models/metadata.json
+++ b/modules/web-control-center/nodejs/controllers/models/metadata.json
@@ -40,7 +40,9 @@
       "model": "databaseSchema",
       "hide": "backupItem.kind == 'query'",
       "placeholder": "Input DB schema name",
-      "tip": ["Schema name in database."]
+      "tip": [
+        "Schema name in database."
+      ]
     },
     {
       "label": "Database table",
@@ -48,7 +50,9 @@
       "model": "databaseTable",
       "hide": "backupItem.kind == 'query'",
       "placeholder": "Input DB table name",
-      "tip": ["Table name in database."]
+      "tip": [
+        "Table name in database."
+      ]
     },
     {
       "label": "Key type",
@@ -56,7 +60,9 @@
       "model": "keyType",
       "required": true,
       "placeholder": "Full class name for Key",
-      "tip": ["Key class used to store key in cache."]
+      "tip": [
+        "Key class used to store key in cache."
+      ]
     },
     {
       "label": "Value type",
@@ -64,7 +70,9 @@
       "model": "valueType",
       "required": true,
       "placeholder": "Full class name for Value",
-      "tip": ["Value class used to store value in cache."]
+      "tip": [
+        "Value class used to store value in cache."
+      ]
     },
     {
       "label": "Key fields",
@@ -73,7 +81,9 @@
       "keyName": "name",
       "valueName": "className",
       "hide": "backupItem.kind == 'query'",
-      "tip": ["Collection of key fields descriptions for CacheJdbcPojoStore."]
+      "tip": [
+        "Collection of key fields descriptions for CacheJdbcPojoStore."
+      ]
     },
     {
       "label": "Value fields",
@@ -82,7 +92,9 @@
       "keyName": "name",
       "valueName": "className",
       "hide": "backupItem.kind == 'query'",
-      "tip": ["Collection of value fields descriptions for CacheJdbcPojoStore.."]
+      "tip": [
+        "Collection of value fields descriptions for CacheJdbcPojoStore.."
+      ]
     },
     {
       "label": "Query fields",
@@ -91,7 +103,9 @@
       "keyName": "name",
       "valueName": "className",
       "hide": "backupItem.kind != 'query'",
-      "tip": ["Collection of name-to-type mappings to be queried, in addition to indexed
fields."]
+      "tip": [
+        "Collection of name-to-type mappings to be queried, in addition to indexed fields."
+      ]
     },
     {
       "label": "Ascending fields",
@@ -100,7 +114,9 @@
       "keyName": "name",
       "valueName": "className",
       "hide": "backupItem.kind != 'query'",
-      "tip": ["Collection of name-to-type mappings to index in ascending order."]
+      "tip": [
+        "Collection of name-to-type mappings to index in ascending order."
+      ]
     },
     {
       "label": "Descending fields",
@@ -109,7 +125,9 @@
       "keyName": "name",
       "valueName": "className",
       "hide": "backupItem.kind != 'query'",
-      "tip": ["Collection of name-to-type mappings to index in descending order."]
+      "tip": [
+        "Collection of name-to-type mappings to index in descending order."
+      ]
     },
     {
       "label": "Text fields",
@@ -117,14 +135,21 @@
       "model": "textFields",
       "hide": "backupItem.kind != 'query'",
       "placeholder": "Field name",
-      "tip": ["Fields to index as text."]
+      "tableTip": [
+        "Fields to index as text."
+      ],
+      "tip": [
+        "Field to index as text."
+      ]
     },
     {
       "label": "Groups",
       "type": "queryGroups",
       "model": "groups",
       "hide": "backupItem.kind != 'query'",
-      "tip": ["Collection of group indexes."]
+      "tip": [
+        "Collection of group indexes."
+      ]
     }
   ],
   "metadataDb": [

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/576c87d2/modules/web-control-center/nodejs/controllers/profile-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/profile-controller.js b/modules/web-control-center/nodejs/controllers/profile-controller.js
index 2f57274..a67df63 100644
--- a/modules/web-control-center/nodejs/controllers/profile-controller.js
+++ b/modules/web-control-center/nodejs/controllers/profile-controller.js
@@ -18,7 +18,7 @@
 controlCenterModule.controller('profileController', ['$scope', '$http', '$common', function
($scope, $http, $common) {
     $scope.profileUser = angular.copy($scope.user);
 
-    $scope.saveUser = function() {
+    $scope.saveUser = function () {
         var profile = $scope.profileUser;
 
         if (profile) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/576c87d2/modules/web-control-center/nodejs/controllers/summary-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/summary-controller.js b/modules/web-control-center/nodejs/controllers/summary-controller.js
index 7761bb4..2872a58 100644
--- a/modules/web-control-center/nodejs/controllers/summary-controller.js
+++ b/modules/web-control-center/nodejs/controllers/summary-controller.js
@@ -20,8 +20,8 @@ controlCenterModule.controller('summaryController', ['$scope', '$http',
'$common
     $scope.getModel = $common.getModel;
 
     $scope.javaClassItems = [
-        { label: 'snippet',value: false},
-        { label: 'factory class',value: true}
+        {label: 'snippet', value: false},
+        {label: 'factory class', value: true}
     ];
 
     $scope.evictionPolicies = [
@@ -49,14 +49,14 @@ controlCenterModule.controller('summaryController', ['$scope', '$http',
'$common
 
     $scope.clusters = [];
 
-    $scope.aceInit = function(editor) {
+    $scope.aceInit = function (editor) {
         editor.setReadOnly(true);
         editor.setOption("highlightActiveLine", false);
 
         editor.setTheme('ace/theme/chrome');
     };
 
-    $scope.reloadServer = function() {
+    $scope.reloadServer = function () {
         $scope.javaServer = $scope.configServer.javaClassServer ? $scope.configServer.javaClass
: $scope.configServer.javaSnippet;
 
         if ($scope.configServer.docker) {
@@ -66,7 +66,7 @@ controlCenterModule.controller('summaryController', ['$scope', '$http',
'$common
         }
     };
 
-    $scope.selectItem = function(cluster) {
+    $scope.selectItem = function (cluster) {
         if (!cluster)
             return;
 
@@ -79,16 +79,16 @@ controlCenterModule.controller('summaryController', ['$scope', '$http',
'$common
 
         $scope.reloadServer();
 
-        $scope.$watch('configServer', function() {
+        $scope.$watch('configServer', function () {
             $scope.reloadServer();
         }, true);
 
-        $scope.$watch('backupItem', function() {
+        $scope.$watch('backupItem', function () {
             $scope.generateClient();
         }, true);
     };
 
-    $scope.generateServer = function(cluster) {
+    $scope.generateServer = function (cluster) {
         $http.post('summary/generator', {_id: cluster._id})
             .success(function (data) {
                 $scope.xmlServer = data.xmlServer;
@@ -101,9 +101,11 @@ controlCenterModule.controller('summaryController', ['$scope', '$http',
'$common
             });
     };
 
-    $scope.generateClient = function() {
-        $http.post('summary/generator', {_id: $scope.selectedItem._id, javaClass: $scope.backupItem.javaClassClient,
-            clientNearConfiguration: $scope.backupItem.nearConfiguration})
+    $scope.generateClient = function () {
+        $http.post('summary/generator', {
+            _id: $scope.selectedItem._id, javaClass: $scope.backupItem.javaClassClient,
+            clientNearConfiguration: $scope.backupItem.nearConfiguration
+        })
             .success(function (data) {
                 $scope.xmlClient = data.xmlClient;
                 $scope.javaClient = data.javaClient;
@@ -112,7 +114,7 @@ controlCenterModule.controller('summaryController', ['$scope', '$http',
'$common
             });
     };
 
-    $scope.download = function() {
+    $scope.download = function () {
         $http.post('summary/download', {_id: $scope.selectedItem._id, javaClass: $scope.javaClass,
os: $scope.os})
             .success(function (data) {
                 var file = document.createElement('a');


Mime
View raw message