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-843 WIP on preview java.
Date Wed, 26 Aug 2015 09:51:58 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 c708316c0 -> f428931fb


IGNITE-843 WIP on preview java.


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

Branch: refs/heads/ignite-843
Commit: f428931fb3e5e893273c7a785781f5be96d9d2f1
Parents: c708316
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Wed Aug 26 16:52:21 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Wed Aug 26 16:52:21 2015 +0700

----------------------------------------------------------------------
 .../main/js/controllers/caches-controller.js    |  2 +-
 .../main/js/controllers/clusters-controller.js  | 20 ++--
 .../src/main/js/controllers/common-module.js    | 16 ++--
 .../main/js/controllers/metadata-controller.js  |  2 +-
 modules/control-center-web/src/main/js/db.js    |  8 ++
 .../src/main/js/routes/clusters.js              |  2 +-
 .../main/js/routes/generator/generator-java.js  | 99 ++++++++++++++++++--
 .../main/js/routes/generator/generator-xml.js   |  2 +-
 .../src/main/js/views/configuration/caches.jade |  2 +-
 .../main/js/views/configuration/clusters.jade   |  2 +-
 .../main/js/views/configuration/metadata.jade   |  2 +-
 11 files changed, 125 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f428931f/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 184adef..55c586e 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
@@ -316,7 +316,7 @@ controlCenterModule.controller('cachesController', [
                 $table.tableReset();
 
                 $timeout(function () {
-                    $common.ensureActivePanel($scope.panels, 'general-data');
+                    $common.ensureActivePanel($scope.panels, 'general-data', 'cacheName');
                 });
 
                 var newItem = {

http://git-wip-us.apache.org/repos/asf/ignite/blob/f428931f/modules/control-center-web/src/main/js/controllers/clusters-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/clusters-controller.js b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
index a87bc23..8ea6314 100644
--- a/modules/control-center-web/src/main/js/controllers/clusters-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
@@ -217,15 +217,15 @@ controlCenterModule.controller('clustersController', ['$scope', '$http',
'$timeo
                         $scope.preview.generalJava = $generatorJava.clusterCaches(clusterCaches,
$generatorJava.clusterGeneral(val)).join('');
                         $scope.preview.atomicsJava = $generatorJava.clusterAtomics(val).join('');
                         $scope.preview.communicationJava = $generatorJava.clusterCommunication(val).join('');
-                        //$scope.preview.deploymentJava = $generatorJava.clusterDeployment(val).join('');
-                        //$scope.preview.eventsJava = $generatorJava.clusterEvents(val).join('');
-                        //$scope.preview.marshallerJava = $generatorJava.clusterMarshaller(val).join('');
-                        //$scope.preview.metricsJava = $generatorJava.clusterMetrics(val).join('');
-                        //$scope.preview.p2pJava = $generatorJava.clusterP2p(val).join('');
-                        //$scope.preview.swapJava = $generatorJava.clusterSwap(val).join('');
-                        //$scope.preview.timeJava = $generatorJava.clusterTime(val).join('');
-                        //$scope.preview.poolsJava = $generatorJava.clusterPools(val).join('');
-                        //$scope.preview.transactionsJava = $generatorJava.clusterTransactions(val).join('');
+                        $scope.preview.deploymentJava = $generatorJava.clusterDeployment(val).join('');
+                        $scope.preview.eventsJava = $generatorJava.clusterEvents(val).join('');
+                        $scope.preview.marshallerJava = $generatorJava.clusterMarshaller(val).join('');
+                        $scope.preview.metricsJava = $generatorJava.clusterMetrics(val).join('');
+                        $scope.preview.p2pJava = $generatorJava.clusterP2p(val).join('');
+                        $scope.preview.swapJava = $generatorJava.clusterSwap(val).join('');
+                        $scope.preview.timeJava = $generatorJava.clusterTime(val).join('');
+                        $scope.preview.poolsJava = $generatorJava.clusterPools(val).join('');
+                        $scope.preview.transactionsJava = $generatorJava.clusterTransactions(val).join('');
                     }
                 }, true);
 
@@ -264,7 +264,7 @@ controlCenterModule.controller('clustersController', ['$scope', '$http',
'$timeo
             $table.tableReset();
 
             $timeout(function () {
-                $common.ensureActivePanel($scope.panels, "general-data");
+                $common.ensureActivePanel($scope.panels, "general-data", 'clusterName');
             });
 
             var newItem = angular.copy($scope.template);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f428931f/modules/control-center-web/src/main/js/controllers/common-module.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/common-module.js b/modules/control-center-web/src/main/js/controllers/common-module.js
index 4413612..e85dedf 100644
--- a/modules/control-center-web/src/main/js/controllers/common-module.js
+++ b/modules/control-center-web/src/main/js/controllers/common-module.js
@@ -432,7 +432,7 @@ controlCenterModule.service('$common', [
 
         var popover = null;
 
-        function ensureActivePanel(panels, id) {
+        function ensureActivePanel(panels, id, focusId) {
             if (panels) {
                 var idx = _.findIndex($('div.panel-collapse'), function(pnl) {
                     return pnl.id == id;
@@ -451,11 +451,14 @@ controlCenterModule.service('$common', [
                         panels.activePanels = newActivePanels;
                     }
                 }
+
+                if (isDefined(focusId))
+                    $focus(focusId)
             }
         }
 
         function showPopoverMessage(panels, panelId, id, message) {
-            ensureActivePanel(panels, panelId);
+            ensureActivePanel(panels, panelId, id);
 
             var el = $('body').find('#' + id);
 
@@ -465,10 +468,9 @@ controlCenterModule.service('$common', [
             var newPopover = $popover(el, {content: message});
 
             $timeout(function () {
-                $focus(id);
-            }, 50);
+                // Workaround for FireFox browser.
+                newPopover.$options.container;
 
-            $timeout(function () {
                 newPopover.show();
 
                 popover = newPopover;
@@ -638,8 +640,8 @@ controlCenterModule.service('$common', [
 
                 return result;
             },
-            ensureActivePanel: function (panels, id) {
-                ensureActivePanel(panels, id);
+            ensureActivePanel: function (panels, id, focusId) {
+                ensureActivePanel(panels, id, focusId);
             },
             showPopoverMessage: function (panels, panelId, id, message) {
                 return showPopoverMessage(panels, panelId, id, message)

http://git-wip-us.apache.org/repos/asf/ignite/blob/f428931f/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 b37969b..f649920 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
@@ -545,7 +545,7 @@ controlCenterModule.controller('metadataController', [
                 $table.tableReset();
 
                 $timeout(function () {
-                    $common.ensureActivePanel($scope.panels, 'metadata-data');
+                    $common.ensureActivePanel($scope.panels, 'metadata-data', 'metadataName');
                 });
 
                 $scope.selectedItem = undefined;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f428931f/modules/control-center-web/src/main/js/db.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/db.js b/modules/control-center-web/src/main/js/db.js
index d461cf7..cd3e83f 100644
--- a/modules/control-center-web/src/main/js/db.js
+++ b/modules/control-center-web/src/main/js/db.js
@@ -210,6 +210,14 @@ var CacheSchema = new Schema({
     }
 });
 
+// Install deep populate plugin.
+CacheSchema.plugin(deepPopulate, {
+    whitelist: [
+        'queryMetadata',
+        'storeMetadata'
+    ]
+});
+
 // Define Cache model.
 exports.Cache = mongoose.model('Cache', CacheSchema);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f428931f/modules/control-center-web/src/main/js/routes/clusters.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/clusters.js b/modules/control-center-web/src/main/js/routes/clusters.js
index 0e3b6bf..6bb8b19 100644
--- a/modules/control-center-web/src/main/js/routes/clusters.js
+++ b/modules/control-center-web/src/main/js/routes/clusters.js
@@ -41,7 +41,7 @@ router.post('/list', function (req, res) {
             });
 
             // Get all caches for spaces.
-            db.Cache.find({space: {$in: space_ids}}).sort('name').exec(function (err, caches)
{
+            db.Cache.find({space: {$in: space_ids}}).sort('name').deepPopulate('queryMetadata
storeMetadata').exec(function (err, caches) {
                 if (db.processed(err, res)) {
                     // Get all clusters for spaces.
                     db.Cluster.find({space: {$in: space_ids}}).sort('name').exec(function
(err, clusters) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/f428931f/modules/control-center-web/src/main/js/routes/generator/generator-java.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/generator/generator-java.js b/modules/control-center-web/src/main/js/routes/generator/generator-java.js
index 5a4c2f2..96b955c 100644
--- a/modules/control-center-web/src/main/js/routes/generator/generator-java.js
+++ b/modules/control-center-web/src/main/js/routes/generator/generator-java.js
@@ -726,6 +726,96 @@ $generatorJava.clusterCommunication = function (cluster, res) {
     if (!res)
         res = $generatorCommon.builder();
 
+    $generatorJava._addProperty(res, 'cfg', cluster, 'networkTimeout');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'networkSendRetryDelay');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'networkSendRetryCount');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'segmentCheckFrequency');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'waitForSegmentOnStart');
+    $generatorJava._addProperty(res, 'cfg', cluster, 'discoveryStartupDelay');
+
+    res.needEmptyLine = true;
+
+    return res;
+};
+
+$generatorJava.clusterDeployment = function (cluster, res) {
+    if (!res)
+        res = $generatorCommon.builder();
+
+    res.needEmptyLine = true;
+
+    return res;
+};
+
+$generatorJava.clusterEvents = function (cluster, res) {
+    if (!res)
+        res = $generatorCommon.builder();
+
+    res.needEmptyLine = true;
+
+    return res;
+};
+
+$generatorJava.clusterMarshaller = function (cluster, res) {
+    if (!res)
+        res = $generatorCommon.builder();
+
+    res.needEmptyLine = true;
+
+    return res;
+};
+
+$generatorJava.clusterMetrics = function (cluster, res) {
+    if (!res)
+        res = $generatorCommon.builder();
+
+    res.needEmptyLine = true;
+
+    return res;
+};
+
+$generatorJava.clusterP2p = function (cluster, res) {
+    if (!res)
+        res = $generatorCommon.builder();
+
+    res.needEmptyLine = true;
+
+    return res;
+};
+
+$generatorJava.clusterSwap = function (cluster, res) {
+    if (!res)
+        res = $generatorCommon.builder();
+
+    res.needEmptyLine = true;
+
+    return res;
+};
+
+$generatorJava.clusterTime = function (cluster, res) {
+    if (!res)
+        res = $generatorCommon.builder();
+
+    res.needEmptyLine = true;
+
+    return res;
+};
+
+$generatorJava.clusterPools = function (cluster, res) {
+    if (!res)
+        res = $generatorCommon.builder();
+
+    res.needEmptyLine = true;
+
+    return res;
+};
+
+$generatorJava.clusterTransactions = function (cluster, res) {
+    if (!res)
+        res = $generatorCommon.builder();
+
+    res.needEmptyLine = true;
+
     return res;
 };
 
@@ -807,14 +897,7 @@ $generatorJava.cluster = function (cluster, javaClass, clientNearConfiguration)
 
     $generatorJava.clusterAtomics(cluster, res);
 
-    $generatorJava._addProperty(res, 'cfg', cluster, 'networkTimeout');
-    $generatorJava._addProperty(res, 'cfg', cluster, 'networkSendRetryDelay');
-    $generatorJava._addProperty(res, 'cfg', cluster, 'networkSendRetryCount');
-    $generatorJava._addProperty(res, 'cfg', cluster, 'segmentCheckFrequency');
-    $generatorJava._addProperty(res, 'cfg', cluster, 'waitForSegmentOnStart');
-    $generatorJava._addProperty(res, 'cfg', cluster, 'discoveryStartupDelay');
-
-    res.needEmptyLine = true;
+    $generatorJava.clusterCommunication(cluster, res);
 
     $generatorJava._addProperty(res, 'cfg', cluster, 'deploymentMode', 'DeploymentMode');
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f428931f/modules/control-center-web/src/main/js/routes/generator/generator-xml.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/generator/generator-xml.js b/modules/control-center-web/src/main/js/routes/generator/generator-xml.js
index d5ad4fd..abd85aa 100644
--- a/modules/control-center-web/src/main/js/routes/generator/generator-xml.js
+++ b/modules/control-center-web/src/main/js/routes/generator/generator-xml.js
@@ -908,7 +908,7 @@ $generatorXml.cache = function(cache, res) {
 
     $generatorXml.cacheStatistics(cache, res);
 
-    $generatorXml.cacheMetadatas(cache.queryMetadata, cache.storeMetadata);
+    $generatorXml.cacheMetadatas(cache.queryMetadata, cache.storeMetadata, res);
 
     res.endBlock('</bean>');
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f428931f/modules/control-center-web/src/main/js/views/configuration/caches.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/caches.jade b/modules/control-center-web/src/main/js/views/configuration/caches.jade
index e35669f..d8719c2 100644
--- a/modules/control-center-web/src/main/js/views/configuration/caches.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/caches.jade
@@ -29,7 +29,7 @@ block content
         +block-callout('{{screenTip.workflowTitle}}', 'joinTip(screenTip.workflowContent)',
'{{screenTip.whatsNextTitle}}', 'joinTip(screenTip.whatsNextContent)')
         +main-table('Caches:', 'caches', 'cacheName', 'selectItem(row)', '{{$index + 1}})
{{row.name}}, {{row.mode | displayValue:modes:"Cache mode not set"}}, {{row.atomicityMode
| displayValue:atomicities:"Cache atomicity not set"}}')
         .padding-top-dflt
-            button.btn.btn-primary(on-click-focus='cacheName' ng-click='createItem()') Add
cache
+            button.btn.btn-primary(ng-click='createItem()') Add cache
         hr
         form.form-horizontal(name='ui.inputForm' ng-if='backupItem' novalidate)
             .panel-group(bs-collapse ng-model='panels.activePanels' data-allow-multiple='true')

http://git-wip-us.apache.org/repos/asf/ignite/blob/f428931f/modules/control-center-web/src/main/js/views/configuration/clusters.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/clusters.jade b/modules/control-center-web/src/main/js/views/configuration/clusters.jade
index fe848a1..92045b7 100644
--- a/modules/control-center-web/src/main/js/views/configuration/clusters.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/clusters.jade
@@ -29,7 +29,7 @@ block content
         +block-callout('{{screenTip.workflowTitle}}', 'joinTip(screenTip.workflowContent)',
'{{screenTip.whatsNextTitle}}', 'joinTip(screenTip.whatsNextContent)')
         +main-table('Clusters:', 'clusters', 'clusterName', 'selectItem(row)', '{{$index
+ 1}}) {{row.name}}, {{row.discovery.kind | displayValue:discoveries:"Discovery not set"}}')
         .padding-top-dflt
-            button.btn.btn-primary(on-click-focus='clusterName' ng-click='createItem()')
Add cluster
+            button.btn.btn-primary(ng-click='createItem()') Add cluster
             label(style='margin-left: 10px; margin-right: 10px') Use template:
             button.form-control.line-control(ng-model='template' bs-options='item.value as
item.label for item in templates' bs-select)
             i.tipLabel.fa.fa-question-circle(bs-tooltip data-title='{{joinTip(templateTip)}}'
type='button')

http://git-wip-us.apache.org/repos/asf/ignite/blob/f428931f/modules/control-center-web/src/main/js/views/configuration/metadata.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/metadata.jade b/modules/control-center-web/src/main/js/views/configuration/metadata.jade
index bcd13ab..a6b71bd 100644
--- a/modules/control-center-web/src/main/js/views/configuration/metadata.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/metadata.jade
@@ -29,7 +29,7 @@ block content
         +block-callout('{{screenTip.workflowTitle}}', 'joinTip(screenTip.workflowContent)',
'{{screenTip.whatsNextTitle}}', 'joinTip(screenTip.whatsNextContent)')
         +main-table('Types metadata:', 'metadatas', 'metadataName', 'selectItem(row)', '{{$index
+ 1}}) {{row.name}}')
         .padding-top-dflt
-            button.btn.btn-primary(ng-click='createItem()' on-click-focus='metadataName')
Add metadata
+            button.btn.btn-primary(ng-click='createItem()') Add metadata
             button.btn.btn-primary(ng-click='showLoadMetadataModal()') Load from database
         hr
         form.form-horizontal(name='ui.inputForm' ng-if='backupItem' novalidate)


Mime
View raw message