ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [11/50] [abbrv] ignite git commit: IGNITE-6376 Web console: Enable task and job events in demo mode by default. (cherry picked from commit ff17783)
Date Tue, 26 Sep 2017 10:48:24 GMT
IGNITE-6376 Web console: Enable task and job events in demo mode by default.
(cherry picked from commit ff17783)


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

Branch: refs/heads/ignite-gg-12822
Commit: 6318c1a15f05e952c22e42e6e238816d7ffdb0ca
Parents: 4338799
Author: vsisko <vsisko@gridgain.com>
Authored: Wed Sep 20 17:19:58 2017 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Wed Sep 20 17:25:00 2017 +0700

----------------------------------------------------------------------
 .../internal/visor/node/VisorNodeDataCollectorTask.java     | 2 +-
 .../visor/node/VisorNodeDataCollectorTaskResult.java        | 4 ++--
 modules/web-console/backend/routes/demo/domains.json        | 5 +++++
 .../configuration/generator/JavaTransformer.service.js      | 5 +++--
 .../org/apache/ignite/console/demo/AgentClusterDemo.java    | 9 ++++++++-
 5 files changed, 19 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6318c1a1/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java
index 80664a1..abd9ce2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java
@@ -89,7 +89,7 @@ public class VisorNodeDataCollectorTask extends VisorMultiNodeTask<VisorNodeData
 
         taskRes.getTopologyVersions().put(nid, jobRes.getTopologyVersion());
 
-        taskRes.isTaskMonitoringEnabled().put(nid, jobRes.isTaskMonitoringEnabled());
+        taskRes.getTaskMonitoringEnabled().put(nid, jobRes.isTaskMonitoringEnabled());
 
         taskRes.getErrorCounts().put(nid, jobRes.getErrorCount());
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6318c1a1/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskResult.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskResult.java
index c1e2f1f..6e10b84 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskResult.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskResult.java
@@ -169,7 +169,7 @@ public class VisorNodeDataCollectorTaskResult extends VisorDataTransferObject
{
     /**
      * @return All task monitoring state collected from nodes.
      */
-    public Map<UUID, Boolean> isTaskMonitoringEnabled() {
+    public Map<UUID, Boolean> getTaskMonitoringEnabled() {
         return taskMonitoringEnabled;
     }
 
@@ -283,7 +283,7 @@ public class VisorNodeDataCollectorTaskResult extends VisorDataTransferObject
{
         unhandledEx.putAll(res.getUnhandledEx());
         gridNames.putAll(res.getGridNames());
         topVersions.putAll(res.getTopologyVersions());
-        taskMonitoringEnabled.putAll(res.isTaskMonitoringEnabled());
+        taskMonitoringEnabled.putAll(res.getTaskMonitoringEnabled());
         errCnts.putAll(res.getErrorCounts());
         evts.addAll(res.getEvents());
         evtsEx.putAll(res.getEventsEx());

http://git-wip-us.apache.org/repos/asf/ignite/blob/6318c1a1/modules/web-console/backend/routes/demo/domains.json
----------------------------------------------------------------------
diff --git a/modules/web-console/backend/routes/demo/domains.json b/modules/web-console/backend/routes/demo/domains.json
index ae46758..25f5019 100644
--- a/modules/web-console/backend/routes/demo/domains.json
+++ b/modules/web-console/backend/routes/demo/domains.json
@@ -17,6 +17,7 @@
         "className": "Integer"
       }
     ],
+    "keyFieldName": "id",
     "valueFields": [
       {
         "databaseFieldName": "NAME",
@@ -60,6 +61,7 @@
         "className": "String"
       }
     ],
+    "keyFieldName": "id",
     "valueFields": [
       {
         "databaseFieldName": "COUNTRY_ID",
@@ -156,6 +158,7 @@
         "className": "Double"
       }
     ],
+    "keyFieldName": "id",
     "valueFields": [
       {
         "databaseFieldName": "DEPARTMENT_ID",
@@ -241,6 +244,7 @@
         "className": "Integer"
       }
     ],
+    "keyFieldName": "id",
     "valueFields": [
       {
         "databaseFieldName": "NAME",
@@ -284,6 +288,7 @@
         "className": "String"
       }
     ],
+    "keyFieldName": "id",
     "valueFields": [
       {
         "databaseFieldName": "PARKING_ID",

http://git-wip-us.apache.org/repos/asf/ignite/blob/6318c1a1/modules/web-console/frontend/app/modules/configuration/generator/JavaTransformer.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/configuration/generator/JavaTransformer.service.js
b/modules/web-console/frontend/app/modules/configuration/generator/JavaTransformer.service.js
index 64fc172..4e6204f 100644
--- a/modules/web-console/frontend/app/modules/configuration/generator/JavaTransformer.service.js
+++ b/modules/web-console/frontend/app/modules/configuration/generator/JavaTransformer.service.js
@@ -1606,6 +1606,9 @@ export default class IgniteJavaTransformer extends AbstractTransformer
{
             shortFactoryCls = this.javaTypes.shortClassName(factoryCls);
         }
 
+        if ((_.nonEmpty(clientNearCaches) || demo) && shortFactoryCls)
+            imports.push('org.apache.ignite.Ignite');
+
         sb.append(`package ${pkg};`)
             .emptyLine();
 
@@ -1651,8 +1654,6 @@ export default class IgniteJavaTransformer extends AbstractTransformer
{
         }
 
         if ((_.nonEmpty(clientNearCaches) || demo) && shortFactoryCls) {
-            imports.push('org.apache.ignite.Ignite');
-
             sb.append(`Ignite ignite = Ignition.start(${cfgRef});`);
 
             _.forEach(clientNearCaches, (cache, idx) => {

http://git-wip-us.apache.org/repos/asf/ignite/blob/6318c1a1/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/AgentClusterDemo.java
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/AgentClusterDemo.java
b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/AgentClusterDemo.java
index 73577b5..886888b 100644
--- a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/AgentClusterDemo.java
+++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/AgentClusterDemo.java
@@ -55,6 +55,7 @@ import static org.apache.ignite.IgniteSystemProperties.IGNITE_QUIET;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_UPDATE_NOTIFIER;
 import static org.apache.ignite.console.demo.AgentDemoUtils.newScheduledThreadPool;
 import static org.apache.ignite.events.EventType.EVTS_DISCOVERY;
+import static org.apache.ignite.internal.visor.util.VisorTaskUtils.VISOR_TASK_EVTS;
 import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_REST_JETTY_ADDRS;
 import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_REST_JETTY_PORT;
 
@@ -92,7 +93,13 @@ public class AgentClusterDemo {
         cfg.setIgniteInstanceName((client ? "demo-client-" : "demo-server-" ) + gridIdx);
         cfg.setLocalHost("127.0.0.1");
         cfg.setEventStorageSpi(new MemoryEventStorageSpi());
-        cfg.setIncludeEventTypes(EVTS_DISCOVERY);
+
+        int[] evts = new int[EVTS_DISCOVERY.length + VISOR_TASK_EVTS.length];
+
+        System.arraycopy(EVTS_DISCOVERY, 0, evts, 0, EVTS_DISCOVERY.length);
+        System.arraycopy(VISOR_TASK_EVTS, 0, evts, EVTS_DISCOVERY.length, VISOR_TASK_EVTS.length);
+
+        cfg.setIncludeEventTypes(evts);
 
         cfg.getConnectorConfiguration().setPort(basePort);
 


Mime
View raw message