ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [10/29] ignite git commit: IGNITE-843 Fixed eslint warnings.
Date Fri, 12 Feb 2016 09:54:36 GMT
IGNITE-843 Fixed eslint warnings.


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

Branch: refs/heads/ignite-843-rc3
Commit: a4a0ebdc55577786a05e069b02d9dd066ddf22c0
Parents: 9c0d808
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Fri Feb 12 10:20:16 2016 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Fri Feb 12 10:20:16 2016 +0700

----------------------------------------------------------------------
 .../src/main/js/serve/agent.js                  |  1 +
 .../src/main/js/serve/configure.js              | 12 ++++-----
 .../src/main/js/serve/mongo.js                  | 26 +++++++++++---------
 3 files changed, 21 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a0ebdc/modules/control-center-web/src/main/js/serve/agent.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/serve/agent.js b/modules/control-center-web/src/main/js/serve/agent.js
index 89497e7..f750047 100644
--- a/modules/control-center-web/src/main/js/serve/agent.js
+++ b/modules/control-center-web/src/main/js/serve/agent.js
@@ -16,6 +16,7 @@
  */
 
 // Fire me up!
+'use strict';
 
 module.exports = {
     implements: 'agent',

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a0ebdc/modules/control-center-web/src/main/js/serve/configure.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/serve/configure.js b/modules/control-center-web/src/main/js/serve/configure.js
index c16b516..ea8a484 100644
--- a/modules/control-center-web/src/main/js/serve/configure.js
+++ b/modules/control-center-web/src/main/js/serve/configure.js
@@ -16,6 +16,7 @@
  */
 
 // Fire me up!
+'use strict';
 
 module.exports = {
     implements: 'configure',
@@ -23,11 +24,10 @@ module.exports = {
         'require(express-session)', 'require(connect-mongo)', 'require(passport)', 'settings',
'mongo']
 };
 
-module.exports.factory = function (logger, cookieParser, bodyParser, forceSSL, session, connectMongo,
passport,
-                                   settings, mongo) {
+module.exports.factory = function(logger, cookieParser, bodyParser, forceSSL, session, connectMongo,
passport, settings, mongo) {
     return (app) => {
         app.use(logger('dev', {
-            skip: function (req, res) {
+            skip: function(req, res) {
                 return res.statusCode < 400;
             }
         }));
@@ -37,7 +37,7 @@ module.exports.factory = function (logger, cookieParser, bodyParser, forceSSL,
s
         app.use(bodyParser.json({limit: '50mb'}));
         app.use(bodyParser.urlencoded({limit: '50mb', extended: true}));
 
-        var mongoStore = connectMongo(session);
+        const mongoStore = connectMongo(session);
 
         app.use(session({
             secret: settings.sessionSecret,
@@ -46,8 +46,8 @@ module.exports.factory = function (logger, cookieParser, bodyParser, forceSSL,
s
             cookie: {
                 expires: new Date(Date.now() + settings.cookieTTL),
                 maxAge: settings.cookieTTL
-            }
-            , store: new mongoStore({mongooseConnection: mongo.connection})
+            },
+            store: new mongoStore({mongooseConnection: mongo.connection})
         }));
 
         app.use(passport.initialize());

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a0ebdc/modules/control-center-web/src/main/js/serve/mongo.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/serve/mongo.js b/modules/control-center-web/src/main/js/serve/mongo.js
index 26cccd8..d423098 100644
--- a/modules/control-center-web/src/main/js/serve/mongo.js
+++ b/modules/control-center-web/src/main/js/serve/mongo.js
@@ -16,14 +16,15 @@
  */
 
 // Fire me up!
+'use strict';
 
 module.exports = {
     implements: 'mongo',
     inject: ['require(mongoose-deep-populate)', 'require(passport-local-mongoose)', 'settings',
'ignite_modules/mongo:*']
 };
 
-module.exports.factory = function (deepPopulatePlugin, passportMongo, settings, pluginMongo)
{
-    var mongoose = require('mongoose');
+module.exports.factory = function(deepPopulatePlugin, passportMongo, settings, pluginMongo)
{
+    const mongoose = require('mongoose');
 
     const deepPopulate = deepPopulatePlugin(mongoose);
 
@@ -34,7 +35,7 @@ module.exports.factory = function (deepPopulatePlugin, passportMongo, settings,
         result = { connection: mongoose.connection };
 
     // Define Account schema.
-    var AccountSchema = new Schema({
+    const AccountSchema = new Schema({
         username: String,
         email: String,
         company: String,
@@ -53,7 +54,7 @@ module.exports.factory = function (deepPopulatePlugin, passportMongo, settings,
 
     // Configure transformation to JSON.
     AccountSchema.set('toJSON', {
-        transform: function (doc, ret) {
+        transform: function(doc, ret) {
             return {
                 _id: ret._id,
                 email: ret.email,
@@ -81,7 +82,7 @@ module.exports.factory = function (deepPopulatePlugin, passportMongo, settings,
     }));
 
     // Define Domain model schema.
-    var DomainModelSchema = new Schema({
+    const DomainModelSchema = new Schema({
         space: {type: ObjectId, ref: 'Space'},
         caches: [{type: ObjectId, ref: 'Cache'}],
         queryMetadata: {type: String, enum: ['Annotations', 'Configuration']},
@@ -116,7 +117,7 @@ module.exports.factory = function (deepPopulatePlugin, passportMongo,
settings,
     result.DomainModel = mongoose.model('DomainModel', DomainModelSchema);
 
     // Define Cache schema.
-    var CacheSchema = new Schema({
+    const CacheSchema = new Schema({
         space: {type: ObjectId, ref: 'Space'},
         name: String,
         clusters: [{type: ObjectId, ref: 'Cluster'}],
@@ -249,7 +250,7 @@ module.exports.factory = function (deepPopulatePlugin, passportMongo,
settings,
     // Define Cache model.
     result.Cache = mongoose.model('Cache', CacheSchema);
 
-    var IgfsSchema = new Schema({
+    const IgfsSchema = new Schema({
         space: {type: ObjectId, ref: 'Space'},
         name: String,
         clusters: [{type: ObjectId, ref: 'Cluster'}],
@@ -295,7 +296,7 @@ module.exports.factory = function (deepPopulatePlugin, passportMongo,
settings,
     result.Igfs = mongoose.model('Igfs', IgfsSchema);
 
     // Define Cluster schema.
-    var ClusterSchema = new Schema({
+    const ClusterSchema = new Schema({
         space: {type: ObjectId, ref: 'Space'},
         name: String,
         localHost: String,
@@ -497,7 +498,7 @@ module.exports.factory = function (deepPopulatePlugin, passportMongo,
settings,
     result.ClusterDefaultPopulate = '';
 
     // Define Notebook schema.
-    var NotebookSchema = new Schema({
+    const NotebookSchema = new Schema({
         space: {type: ObjectId, ref: 'Space'},
         name: String,
         expandedParagraphs: [Number],
@@ -521,9 +522,9 @@ module.exports.factory = function (deepPopulatePlugin, passportMongo,
settings,
     // Define Notebook model.
     result.Notebook = mongoose.model('Notebook', NotebookSchema);
 
-    result.upsert = function (model, data, cb) {
+    result.upsert = function(model, data, cb) {
         if (data._id) {
-            var id = data._id;
+            const id = data._id;
 
             delete data._id;
 
@@ -544,9 +545,10 @@ module.exports.factory = function (deepPopulatePlugin, passportMongo,
settings,
     };
 
     // Registering the routes of all plugin modules
-    for (var name in pluginMongo)
+    for (var name in pluginMongo) {
         if (pluginMongo.hasOwnProperty(name))
             pluginMongo[name].register(mongoose, deepPopulate, result);
+    }
 
     return result;
 };


Mime
View raw message