ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject ignite git commit: IGNITE-2280 Select first cluster / cache by default.
Date Wed, 30 Dec 2015 03:15:41 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 1c7247402 -> e9c9d1a3f


IGNITE-2280 Select first cluster / cache by default.


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

Branch: refs/heads/ignite-843-rc2
Commit: e9c9d1a3f6d55ad403255ccf6df0b5e461b04dff
Parents: 1c72474
Author: vsisko <vsisko@gridgain.com>
Authored: Wed Dec 30 10:15:25 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Wed Dec 30 10:15:25 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/caches-controller.js          | 10 +++-------
 .../src/main/js/controllers/igfs-controller.js            | 10 +++-------
 .../src/main/js/controllers/metadata-controller.js        |  3 ++-
 3 files changed, 8 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e9c9d1a3/modules/control-center-web/src/main/js/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/caches-controller.js b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index 4d6ec0a..e67b312 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -470,7 +470,8 @@ consoleModule.controller('cachesController', [
                     atomicityMode: 'ATOMIC',
                     readFromBackup: true,
                     copyOnRead: true,
-                    clusters: id && _.find($scope.clusters, {value: id}) ? [id] :
[],
+                    clusters: id && _.find($scope.clusters, {value: id}) ? [id] :
+                        (!$common.isEmptyArray($scope.clusters) ? [$scope.clusters[0].value]
: []),
                     metadatas: id && _.find($scope.metadatas, {value: id}) ? [id]
: [],
                     get label() { return angular.bind(this, _cacheLbl)(); }
                 };
@@ -483,12 +484,7 @@ consoleModule.controller('cachesController', [
                         $common.ensureActivePanel($scope.panels, 'general', 'cacheName');
                     });
 
-                    var newItem = prepareNewItem(id);
-
-                    if ($common.isEmptyArray(newItem.clusters) && !$common.isEmptyArray($scope.clusters))
-                        newItem.clusters.push($scope.clusters[0].value);
-
-                    $scope.selectItem(undefined, newItem);
+                    $scope.selectItem(undefined, prepareNewItem(id));
                 }
             };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/e9c9d1a3/modules/control-center-web/src/main/js/controllers/igfs-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/igfs-controller.js b/modules/control-center-web/src/main/js/controllers/igfs-controller.js
index 8ddc932..9ee65d1 100644
--- a/modules/control-center-web/src/main/js/controllers/igfs-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/igfs-controller.js
@@ -288,7 +288,8 @@ consoleModule.controller('igfsController', [
                     space: $scope.spaces[0]._id,
                     ipcEndpointEnabled: true,
                     fragmentizerEnabled: true,
-                    clusters: id && _.find($scope.clusters, {value: id}) ? [id] :
[]
+                    clusters: id && _.find($scope.clusters, {value: id}) ? [id] :
+                        (!$common.isEmptyArray($scope.clusters) ? [$scope.clusters[0].value]
: [])
                 };
             }
 
@@ -299,12 +300,7 @@ consoleModule.controller('igfsController', [
                         $common.ensureActivePanel($scope.panels, 'general', 'igfsName');
                     });
 
-                    var newItem = prepareNewItem(id);
-
-                    if ($common.isEmptyArray(newItem.clusters) && !$common.isEmptyArray($scope.clusters))
-                        newItem.clusters.push($scope.clusters[0].value);
-
-                    $scope.selectItem(undefined, newItem);
+                    $scope.selectItem(undefined, prepareNewItem(id));
                 }
             };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/e9c9d1a3/modules/control-center-web/src/main/js/controllers/metadata-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/metadata-controller.js b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
index b12dbd4..3d1edcc 100644
--- a/modules/control-center-web/src/main/js/controllers/metadata-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
@@ -909,7 +909,8 @@ consoleModule.controller('metadataController', function ($filter, $http,
$timeou
             function prepareNewItem(cacheId) {
                 return {
                     space: $scope.spaces[0]._id,
-                    caches: cacheId && _.find($scope.caches, {value: cacheId}) ?
[cacheId] : []
+                    caches: cacheId && _.find($scope.caches, {value: cacheId}) ?
[cacheId] :
+                        (!$common.isEmptyArray($scope.caches) ? [$scope.caches[0].value]
: [])
                 };
             }
 


Mime
View raw message