ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [1/2] ignite git commit: IGNITE-2283 Improved Summary screen.
Date Wed, 30 Dec 2015 09:24:26 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 d643efeff -> 783ca5215


IGNITE-2283 Improved Summary screen.


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

Branch: refs/heads/ignite-843-rc2
Commit: aa3d3300ba0aec355f6ae4bec784b1762b9f3b31
Parents: d643efe
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Wed Dec 30 16:20:08 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Wed Dec 30 16:20:08 2015 +0700

----------------------------------------------------------------------
 .../configuration/summary/summary.controller.js | 50 +++++++++++++++++++-
 .../js/helpers/generator/generator-readme.js    |  4 +-
 .../main/js/views/configuration/summary.jade    | 20 +++++---
 3 files changed, 63 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/aa3d3300/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
index 12ade31..3a9d42f 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/summary/summary.controller.js
@@ -129,6 +129,46 @@ export default [
         $scope.tabsServer = { activeTab: 0 };
         $scope.tabsClient = { activeTab: 0 };
 
+        function findFolder(node, name) {
+            if (node.name === name)
+                return node;
+
+            if (node.children) {
+                let folder = null;
+
+                for (let i = 0; folder === null && i < node.children.length; i++)
+                    folder = findFolder(node.children[i], name);
+
+                return folder;
+            }
+
+            return null;
+        }
+
+        function addChildren(fullClsName) {
+            const parts = fullClsName.split('.');
+
+            const shortClsName = parts.pop() + '.java';
+
+            let lastFolder = javaFolder;
+
+            _.forEach(parts, (part) => {
+                const folder = findFolder(javaFolder, part);
+
+                if (!folder) {
+                    const newLastFolder = {type: 'folder', name: part, children: []};
+
+                    lastFolder.children.push(newLastFolder);
+
+                    lastFolder = newLastFolder;
+                }
+                else
+                    lastFolder = folder;
+            });
+
+            lastFolder.children.push({type: 'file', name: shortClsName});
+        }
+
         $scope.selectItem = (cluster) => {
             delete ctrl.cluster;
 
@@ -146,9 +186,15 @@ export default [
 
             _.forEach(cluster.caches, (cache) => {
                 _.forEach(cache.metadatas, (metadata) => {
-                    javaFolder.children.push({type: 'folder', name: 'test' + cluster.name,
children: [{type: 'file', name: 'test-1'}]});
+                    if (!$common.isEmptyArray(metadata.keyFields)) {
+                        const keyType = metadata.keyType;
+                        const valType = metadata.valueType;
+
+                        addChildren(keyType);
+                        addChildren(valType);
+                    }
                 });
-            }) ;
+            });
 
 
         };

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa3d3300/modules/control-center-web/src/main/js/helpers/generator/generator-readme.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/helpers/generator/generator-readme.js
b/modules/control-center-web/src/main/js/helpers/generator/generator-readme.js
index 945547d..debf6c6 100644
--- a/modules/control-center-web/src/main/js/helpers/generator/generator-readme.js
+++ b/modules/control-center-web/src/main/js/helpers/generator/generator-readme.js
@@ -34,9 +34,9 @@ $generatorReadme.readme = function (res) {
     res.needEmptyLine = true;
 
     res.line('Project structure:');
-    res.line('    /config - this folder will contains client and server XML configurations.');
+    res.line('    /config - this folder will contain client and server XML configurations.');
     res.line('    /jdbc-drivers - this folder should contains proprietary JDBC drivers.');
-    res.line('    /src - this folder will contains generated java code.');
+    res.line('    /src - this folder will contain generated java code.');
     res.line('    /src/main/java/config - this folder will contain generated java classes
with cluster configuration from code.');
     res.line('    /src/main/java/startup - this folder will contain generated java classes
with server and client nodes startup code.');
     res.line('    /src/main/java/[model] - this folder will be named as package name for
your POJO classes and contain generated POJO files.');

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa3d3300/modules/control-center-web/src/main/js/views/configuration/summary.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/summary.jade b/modules/control-center-web/src/main/js/views/configuration/summary.jade
index e2b74a7..1f73f48 100644
--- a/modules/control-center-web/src/main/js/views/configuration/summary.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/summary.jade
@@ -33,13 +33,19 @@ mixin ignite-form-field-tooltip(message)
                 ignite-dialog More info
                     ignite-dialog-title Summary screen
                     ignite-dialog-content 
-                        | Configurations available in XML, Java and Dockerfile format for
Server and Client mode.#[br]
-                        | Database table POJO classes for cluster's metadata available on
"POJO" tab.#[br]
-                        | Use "Download project" button to receive configurations in ZIP
file.#[br]
-                        | Go back to change configuration on #[a(ui-sref='base.configuration.clusters')
clusters],&nbsp;
-                        | #[a(ui-sref='base.configuration.caches') caches] or #[a(ui-sref='base.configuration.metadata')
metadata] screen.#[br]
-                        | Read #[a(href='https://apacheignite.readme.io/docs' target='_blank')
Ignite Documentation].#[br]
-                        | Download #[a(href='https://ignite.apache.org/download.cgi#binaries'
target='_blank') Ignite Binary Release].
+                        | On this screen you can preview:
+                        | <ul>
+                        | <li>XML configurations for server and client nodes.</li>
+                        | <li>Java classes with server and client nodes configuration
from code.</li>
+                        | <li>POJO classes generated from database metadata.</li>
+                        | <li>Maven pom.xml for generated project.</li>
+                        | <li>Dockerfile for server node.</li>
+                        | </ul>
+                        | Also you can:
+                        | <ul>
+                        | <li>Read #[a(href='https://apacheignite.readme.io/docs' target='_blank')
Ignite Documentation].</li>
+                        | <li>Download #[a(href='https://ignite.apache.org/download.cgi#binaries'
target='_blank') Ignite Binary Release].</li>
+                        | </ul>
 
         ignite-callout-cel(data-title='Next Steps')
             li Deploy Ignite Servers


Mime
View raw message