IGNITE-7927 Web Console: Fixed demo for non-collocated joins.

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

Branch: refs/heads/ignite-8201
Commit: 647620b3ccf204c7bf11c4ff540584d0c99d9a15
Parents: 139c2af
Author: Vasiliy Sisko <vsi...@gridgain.com>
Authored: Tue Apr 10 17:48:52 2018 +0700
Committer: Alexey Kuznetsov <akuznet...@apache.org>
Committed: Tue Apr 10 17:48:52 2018 +0700

----------------------------------------------------------------------
 modules/web-console/backend/routes/demo.js      |  2 ++
 .../demo/service/DemoCachesLoadService.java     | 22 ++++++++++++++++++--
 2 files changed, 22 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/647620b3/modules/web-console/backend/routes/demo.js
----------------------------------------------------------------------
diff --git a/modules/web-console/backend/routes/demo.js 
b/modules/web-console/backend/routes/demo.js
index a18fa7a..b081d0c 100644
--- a/modules/web-console/backend/routes/demo.js
+++ b/modules/web-console/backend/routes/demo.js
@@ -95,10 +95,12 @@ module.exports.factory = (errors, settings, mongo, 
spacesService) => {
 
                                             domain.space = cacheDoc.space;
                                             domain.caches.push(cacheDoc._id);
+                                            domain.clusters.push(cluster._id);
 
                                             return domain.save()
                                                 .then((domainDoc) => {
                                                     
cacheDoc.domains.push(domainDoc._id);
+                                                    
cluster.models.push(domainDoc._id);
 
                                                     return cacheDoc.save();
                                                 });

http://git-wip-us.apache.org/repos/asf/ignite/blob/647620b3/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/service/DemoCachesLoadService.java
----------------------------------------------------------------------
diff --git 
a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/service/DemoCachesLoadService.java
 
b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/service/DemoCachesLoadService.java
index 6691d1d..2aace06 100644
--- 
a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/service/DemoCachesLoadService.java
+++ 
b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/service/DemoCachesLoadService.java
@@ -269,6 +269,14 @@ public class DemoCachesLoadService implements Service {
 
         type.setFields(qryFlds);
 
+        // Indexes for DEPARTMENT.
+
+        ArrayList<QueryIndex> indexes = new ArrayList<>();
+
+        indexes.add(new QueryIndex("countryId", QueryIndexType.SORTED, false, 
"DEP_COUNTRY"));
+
+        type.setIndexes(indexes);
+
         ccfg.setQueryEntities(qryEntities);
 
         return ccfg;
@@ -312,6 +320,11 @@ public class DemoCachesLoadService implements Service {
 
         // Indexes for EMPLOYEE.
 
+        Collection<QueryIndex> indexes = new ArrayList<>();
+
+        indexes.add(new QueryIndex("departmentId", QueryIndexType.SORTED, 
false, "EMP_DEPARTMENT"));
+        indexes.add(new QueryIndex("managerId", QueryIndexType.SORTED, false, 
"EMP_MANAGER"));
+
         QueryIndex idx = new QueryIndex();
 
         idx.setName("EMP_NAMES");
@@ -323,8 +336,6 @@ public class DemoCachesLoadService implements Service {
 
         idx.setFields(indFlds);
 
-        Collection<QueryIndex> indexes = new ArrayList<>();
-
         indexes.add(idx);
         indexes.add(new QueryIndex("salary", QueryIndexType.SORTED, false, 
"EMP_SALARY"));
 
@@ -392,6 +403,13 @@ public class DemoCachesLoadService implements Service {
 
         type.setFields(qryFlds);
 
+        // Indexes for CAR.
+
+        ArrayList<QueryIndex> indexes = new ArrayList<>();
+
+        indexes.add(new QueryIndex("parkingId", QueryIndexType.SORTED, false, 
"CAR_PARKING"));
+        type.setIndexes(indexes);
+
         ccfg.setQueryEntities(qryEntities);
 
         return ccfg;

Reply via email to