ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [19/29] ignite git commit: IGNITE-4472 Minor fix.
Date Mon, 20 Feb 2017 11:46:43 GMT
IGNITE-4472 Minor fix.


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

Branch: refs/heads/ignite-2.0
Commit: 7cb3e687efbbfe7e72a8d7b047d03235b8f7ba72
Parents: 7f74458
Author: Andrey Novikov <anovikov@gridgain.com>
Authored: Fri Feb 17 18:02:48 2017 +0700
Committer: Andrey Novikov <anovikov@gridgain.com>
Committed: Fri Feb 17 18:02:48 2017 +0700

----------------------------------------------------------------------
 .../web-console/backend/services/activities.js  |  7 +++--
 .../list-of-registered-users.controller.js      | 14 ++++------
 .../configuration/configuration.module.js       |  6 ++---
 .../configuration/summary/summary.worker.js     | 28 ++++++++++----------
 .../console/agent/handlers/RestListener.java    |  9 ++++++-
 5 files changed, 33 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7cb3e687/modules/web-console/backend/services/activities.js
----------------------------------------------------------------------
diff --git a/modules/web-console/backend/services/activities.js b/modules/web-console/backend/services/activities.js
index 124c775..afde8e7 100644
--- a/modules/web-console/backend/services/activities.js
+++ b/modules/web-console/backend/services/activities.js
@@ -37,10 +37,10 @@ module.exports.factory = (_, mongo) => {
          * @param {String} owner - User ID
          * @param {String} action - Action string presentation.
          * @param {String} group - Action group string presentation.
-         * @param {Date} [date] - Optional date to save in activity.
+         * @param {Date} [now] - Optional date to save in activity.
          * @returns {Promise.<mongo.ObjectId>} that resolve activity
          */
-        static merge(owner, {action, group}, date = new Date()) {
+        static merge(owner, {action, group}, now = new Date()) {
             mongo.Account.findById(owner)
                 .then((user) => {
                     user.lastActivity = new Date();
@@ -48,8 +48,7 @@ module.exports.factory = (_, mongo) => {
                     return user.save();
                 });
 
-            date.setDate(1);
-            date.setHours(0, 0, 0, 0);
+            const date = Date.UTC(now.getFullYear(), now.getMonth(), 1);
 
             return mongo.Activities.findOne({owner, action, date}).exec()
                 .then((activity) => {

http://git-wip-us.apache.org/repos/asf/ignite/blob/7cb3e687/modules/web-console/frontend/app/components/list-of-registered-users/list-of-registered-users.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/list-of-registered-users/list-of-registered-users.controller.js
b/modules/web-console/frontend/app/components/list-of-registered-users/list-of-registered-users.controller.js
index 272681a..f65958b 100644
--- a/modules/web-console/frontend/app/components/list-of-registered-users/list-of-registered-users.controller.js
+++ b/modules/web-console/frontend/app/components/list-of-registered-users/list-of-registered-users.controller.js
@@ -44,9 +44,6 @@ export default class IgniteListOfRegisteredUsersCtrl {
             startDate: new Date()
         };
 
-        $ctrl.params.startDate.setDate(1);
-        $ctrl.params.startDate.setHours(0, 0, 0, 0);
-
         const columnCompany = _.find(columnDefs, { displayName: 'Company' });
         const columnCountry = _.find(columnDefs, { displayName: 'Country' });
 
@@ -151,7 +148,7 @@ export default class IgniteListOfRegisteredUsersCtrl {
         };
 
         /**
-         * @param {{startDate: Date, endDate: Date}} params
+         * @param {{startDate: number, endDate: number}} params
          */
         const reloadUsers = (params) => {
             AdminData.loadUsers(params)
@@ -174,11 +171,10 @@ export default class IgniteListOfRegisteredUsersCtrl {
         $scope.$watch(() => $ctrl.params.startDate, (dt) => {
             $ctrl.gridOptions.exporterCsvFilename = `web_console_users_${dtFilter(dt, 'yyyy_MM')}.csv`;
 
-            const endDate = new Date(dt);
-
-            endDate.setMonth(endDate.getMonth() + 1);
+            const startDate = Date.UTC(dt.getFullYear(), dt.getMonth(), 1);
+            const endDate = Date.UTC(dt.getFullYear(), dt.getMonth() + 1, 1);
 
-            reloadUsers({startDate: dtFilter(dt, 'yyyy-MM-dd'), endDate: dtFilter(endDate,
'yyyy-MM-dd')});
+            reloadUsers({ startDate, endDate });
         });
     }
 
@@ -234,6 +230,6 @@ export default class IgniteListOfRegisteredUsersCtrl {
     }
 
     exportCsv() {
-        this.gridApi.exporter.csvExport('all', 'visible');
+        this.gridApi.exporter.csvExport('visible', 'visible');
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/7cb3e687/modules/web-console/frontend/app/modules/configuration/configuration.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/configuration/configuration.module.js
b/modules/web-console/frontend/app/modules/configuration/configuration.module.js
index 4288ff7..51306c6 100644
--- a/modules/web-console/frontend/app/modules/configuration/configuration.module.js
+++ b/modules/web-console/frontend/app/modules/configuration/configuration.module.js
@@ -49,10 +49,10 @@ angular
 ])
 .provider(...igniteSidebar)
 .directive(...igniteSidebarDirective)
-.service('IgniteConfigurationGenerator', IgniteConfigurationGenerator)
+.service('IgniteConfigurationGenerator', () => IgniteConfigurationGenerator)
 .service('IgnitePlatformGenerator', IgnitePlatformGenerator)
-.service('SpringTransformer', IgniteSpringTransformer)
-.service('JavaTransformer', IgniteJavaTransformer)
+.service('SpringTransformer', () => IgniteSpringTransformer)
+.service('JavaTransformer', () => IgniteJavaTransformer)
 .service('IgniteSharpTransformer', SharpTransformer)
 .service('IgniteVersion', IgniteVersion)
 .service('IgniteEventGroups', IgniteEventGroups)

http://git-wip-us.apache.org/repos/asf/ignite/blob/7cb3e687/modules/web-console/frontend/app/modules/states/configuration/summary/summary.worker.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/summary/summary.worker.js
b/modules/web-console/frontend/app/modules/states/configuration/summary/summary.worker.js
index 070b6ce..7ea1d5a 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/summary/summary.worker.js
+++ b/modules/web-console/frontend/app/modules/states/configuration/summary/summary.worker.js
@@ -17,24 +17,24 @@
 
 import JSZip from 'jszip';
 
-import MavenGenerator from 'app/modules/configuration/generator/Maven.service';
-import DockerGenerator from 'app/modules/configuration/generator/Docker.service';
-import ReadmeGenerator from 'app/modules/configuration/generator/Readme.service';
-import PropertiesGenerator from 'app/modules/configuration/generator/Properties.service';
-import ConfigurationGenerator from 'app/modules/configuration/generator/ConfigurationGenerator';
+import IgniteMavenGenerator from 'app/modules/configuration/generator/Maven.service';
+import IgniteDockerGenerator from 'app/modules/configuration/generator/Docker.service';
+import IgniteReadmeGenerator from 'app/modules/configuration/generator/Readme.service';
+import IgnitePropertiesGenerator from 'app/modules/configuration/generator/Properties.service';
+import IgniteConfigurationGenerator from 'app/modules/configuration/generator/ConfigurationGenerator';
 
-import JavaTransformer from 'app/modules/configuration/generator/JavaTransformer.service';
-import SpringTransformer from 'app/modules/configuration/generator/SpringTransformer.service';
+import IgniteJavaTransformer from 'app/modules/configuration/generator/JavaTransformer.service';
+import IgniteSpringTransformer from 'app/modules/configuration/generator/SpringTransformer.service';
 
-const maven = new MavenGenerator();
-const docker = new DockerGenerator();
-const readme = new ReadmeGenerator();
-const properties = new PropertiesGenerator();
+const maven = new IgniteMavenGenerator();
+const docker = new IgniteDockerGenerator();
+const readme = new IgniteReadmeGenerator();
+const properties = new IgnitePropertiesGenerator();
 
-const java = new JavaTransformer[0]();
-const spring = new SpringTransformer[0]();
+const java = IgniteJavaTransformer;
+const spring = IgniteSpringTransformer;
 
-const generator = new ConfigurationGenerator[0]();
+const generator = IgniteConfigurationGenerator;
 
 const escapeFileName = (name) => name.replace(/[\\\/*\"\[\],\.:;|=<>?]/g, '-').replace(/
/g, '_');
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/7cb3e687/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/RestListener.java
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/RestListener.java
b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/RestListener.java
index 1e86549..fcacc88 100644
--- a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/RestListener.java
+++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/RestListener.java
@@ -38,6 +38,7 @@ import org.apache.http.client.utils.URIBuilder;
 import org.apache.http.entity.StringEntity;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
 import org.apache.ignite.console.agent.AgentConfiguration;
 import org.apache.ignite.console.demo.AgentClusterDemo;
 import org.apache.log4j.Logger;
@@ -65,7 +66,13 @@ public class RestListener extends AbstractListener {
 
         this.cfg = cfg;
 
-        httpClient = HttpClientBuilder.create().build();
+        // Create a connection manager with custom configuration.
+        PoolingHttpClientConnectionManager connMgr = new PoolingHttpClientConnectionManager();
+
+        connMgr.setDefaultMaxPerRoute(Integer.MAX_VALUE);
+        connMgr.setMaxTotal(Integer.MAX_VALUE);
+
+        httpClient = HttpClientBuilder.create().setConnectionManager(connMgr).build();
     }
 
     /** {@inheritDoc} */


Mime
View raw message