ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [26/50] [abbrv] ignite git commit: IGNITE-843 Fixed validation and code format.
Date Mon, 28 Mar 2016 08:48:06 GMT
http://git-wip-us.apache.org/repos/asf/ignite/blob/625dcefa/modules/control-center-web/src/main/js/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/caches-controller.js b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index 5ff8fe6..055417b 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -249,10 +249,10 @@ consoleModule.controller('cachesController', [
             $common.hidePopover();
 
             if ($common.isEmptyString(item.name))
-                return showPopoverMessage($scope.ui, 'general', 'cacheName', 'Name should
not be empty');
+                return showPopoverMessage($scope.ui, 'general', 'cacheName', 'Cache name
should not be empty!');
 
             if (item.memoryMode === 'ONHEAP_TIERED' && item.offHeapMaxMemory >
0 && !$common.isDefined(item.evictionPolicy.kind))
-                return showPopoverMessage($scope.ui, 'memory', 'evictionPolicyKind', 'Eviction
policy should not be configured');
+                return showPopoverMessage($scope.ui, 'memory', 'evictionPolicyKind', 'Eviction
policy should not be configured!');
 
             var form = $scope.ui.inputForm;
             var errors = form.$error;
@@ -278,11 +278,11 @@ consoleModule.controller('cachesController', [
 
             if (item.memoryMode === 'OFFHEAP_VALUES' && !$common.isEmptyArray(item.domains))
                 return showPopoverMessage($scope.ui, 'memory', 'memoryMode',
-                    'Cannot have query indexing enabled while values are stored off-heap');
+                    'Query indexing could not be enabled while values are stored off-heap!');
 
             if (item.memoryMode === 'OFFHEAP_TIERED' && !$common.isDefined(item.offHeapMaxMemory))
                 return showPopoverMessage($scope.ui, 'memory', 'offHeapMaxMemory',
-                    'Off-heap max memory should be specified');
+                    'Off-heap max memory should be specified!');
 
             var cacheStoreFactorySelected = item.cacheStoreFactory && item.cacheStoreFactory.kind;
 
@@ -292,14 +292,14 @@ consoleModule.controller('cachesController', [
                 if (item.cacheStoreFactory.kind === 'CacheJdbcPojoStoreFactory') {
                     if ($common.isEmptyString(storeFactory.dataSourceBean))
                         return showPopoverMessage($scope.ui, 'store', 'dataSourceBean',
-                            'Data source bean name should not be empty');
+                            'Data source bean name should not be empty!');
 
                     if (!$common.isValidJavaIdentifier('Data source bean', storeFactory.dataSourceBean,
'dataSourceBean', $scope.ui, 'store'))
                         return false;
 
                     if (!storeFactory.dialect)
                         return showPopoverMessage($scope.ui, 'store', 'pojoDialect',
-                            'Dialect should not be empty');
+                            'Dialect should not be empty!');
 
                     if (!checkDataSources())
                         return false;
@@ -309,23 +309,23 @@ consoleModule.controller('cachesController', [
                     if (storeFactory.connectVia === 'URL') {
                         if ($common.isEmptyString(storeFactory.connectionUrl))
                             return showPopoverMessage($scope.ui, 'store', 'connectionUrl',
-                                'Connection URL should not be empty');
+                                'Connection URL should not be empty!');
 
                         if ($common.isEmptyString(storeFactory.user))
                             return showPopoverMessage($scope.ui, 'store', 'user',
-                                'User should not be empty');
+                                'User should not be empty!');
                     }
                     else {
                         if ($common.isEmptyString(storeFactory.dataSourceBean))
                             return showPopoverMessage($scope.ui, 'store', 'dataSourceBean',
-                                'Data source bean name should not be empty');
+                                'Data source bean name should not be empty!');
 
                         if (!$common.isValidJavaIdentifier('Data source bean', storeFactory.dataSourceBean,
'dataSourceBean', $scope.ui, 'store'))
                             return false;
 
                         if (!storeFactory.dialect)
                             return showPopoverMessage($scope.ui, 'store', 'blobDialect',
-                                'Database should not be empty');
+                                'Database should not be empty!');
 
                         if (!checkDataSources())
                             return false;
@@ -349,11 +349,11 @@ consoleModule.controller('cachesController', [
 
             if (item.writeBehindFlushSize === 0 && item.writeBehindFlushFrequency
=== 0)
                 return showPopoverMessage($scope.ui, 'store', 'writeBehindFlushSize',
-                    'Both "Flush frequency" and "Flush size" are not allowed as 0');
+                    'Both "Flush frequency" and "Flush size" are not allowed as 0!');
 
             if (item.cacheMode !== 'LOCAL' && item.rebalanceMode !== 'NONE' &&
item.rebalanceBatchSize === 0)
                 return showPopoverMessage($scope.ui, 'rebalance', 'rebalanceBatchSize',
-                    'Batch size should be more than 0 for not "NONE" rebalance mode', 10000);
+                    'Batch size should be more than 0 if rebalance mode is "SYNC" or "ASYNC"
!', 10000);
 
             return true;
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/625dcefa/modules/control-center-web/src/main/js/controllers/clusters-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/clusters-controller.js b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
index e39be4f..ce133cf 100644
--- a/modules/control-center-web/src/main/js/controllers/clusters-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
@@ -245,7 +245,7 @@ consoleModule.controller('clustersController', [
             $common.hidePopover();
 
             if ($common.isEmptyString(item.name))
-                return showPopoverMessage($scope.ui, 'general', 'clusterName', 'Name should
not be empty');
+                return showPopoverMessage($scope.ui, 'general', 'clusterName', 'Cluster name
should not be empty!');
 
             var form = $scope.ui.inputForm;
             var errors = form.$error;
@@ -257,7 +257,7 @@ consoleModule.controller('clustersController', [
                 var firstError = errors[firstErrorKey][0];
                 var actualError = firstError.$error[firstErrorKey][0];
 
-                var msg = 'Invalid value';
+                var msg = 'Invalid value!';
 
                 try {
                     msg = errors[firstErrorKey][0].$errorMessages[actualError.$name][firstErrorKey];
@@ -302,10 +302,10 @@ consoleModule.controller('clustersController', [
                         var type = b.typeConfigurations[typeIx];
 
                         if ($common.isEmptyString(type.typeName))
-                            return showPopoverMessage($scope.ui, 'binary', 'typeName' + typeIx,
'Type name should be specified');
+                            return showPopoverMessage($scope.ui, 'binary', 'typeName' + typeIx,
'Type name should be specified!');
 
                         if (_.find(b.typeConfigurations, sameName))
-                            return showPopoverMessage($scope.ui, 'binary', 'typeName' + typeIx,
'Type with such name is already specified');
+                            return showPopoverMessage($scope.ui, 'binary', 'typeName' + typeIx,
'Type with such name is already specified!');
                     }
                 }
             }
@@ -316,56 +316,56 @@ consoleModule.controller('clustersController', [
                 if ($common.isDefined(c.unacknowledgedMessagesBufferSize)) {
                     if ($common.isDefined(c.messageQueueLimit))
                         if (c.unacknowledgedMessagesBufferSize < 5 * c.messageQueueLimit)
-                            return showPopoverMessage($scope.ui, 'communication', 'unacknowledgedMessagesBufferSize',
'Maximum number of stored unacknowledged messages should be at least 5 * message queue limit');
+                            return showPopoverMessage($scope.ui, 'communication', 'unacknowledgedMessagesBufferSize',
'Maximum number of stored unacknowledged messages should be at least 5 * message queue limit!');
 
                     if ($common.isDefined(c.ackSendThreshold))
                         if (c.unacknowledgedMessagesBufferSize < 5 * c.ackSendThreshold)
-                            return showPopoverMessage($scope.ui, 'communication', 'unacknowledgedMessagesBufferSize',
'Maximum number of stored unacknowledged messages should be at least 5 * ack send threshold');
+                            return showPopoverMessage($scope.ui, 'communication', 'unacknowledgedMessagesBufferSize',
'Maximum number of stored unacknowledged messages should be at least 5 * ack send threshold!');
                 }
 
                 if (c.sharedMemoryPort === 0)
-                    return showPopoverMessage($scope.ui, 'communication', 'sharedMemoryPort',
'Shared memory port should be more than 0 or -1');
+                    return showPopoverMessage($scope.ui, 'communication', 'sharedMemoryPort',
'Shared memory port should be more than "0" or equals to "-1"!');
             }
 
             var r = item.connector;
 
             if ($common.isDefined(r)) {
                 if (r.sslEnabled && $common.isEmptyString(r.sslFactory))
-                    return showPopoverMessage($scope.ui, 'connector', 'connectorSslFactory',
'SSL factory should not be empty');
+                    return showPopoverMessage($scope.ui, 'connector', 'connectorSslFactory',
'SSL factory should not be empty!');
             }
 
             var d = item.discovery;
 
             if (d) {
                 if ((d.maxAckTimeout != undefined ? d.maxAckTimeout : 600000) < (d.ackTimeout
|| 5000))
-                    return showPopoverMessage($scope.ui, 'discovery', 'ackTimeout', 'Acknowledgement
timeout should be less than max acknowledgement timeout');
+                    return showPopoverMessage($scope.ui, 'discovery', 'ackTimeout', 'Acknowledgement
timeout should be less than max acknowledgement timeout!');
 
                 if (d.kind === 'Vm' && d.Vm && d.Vm.addresses.length ===
0)
-                    return showPopoverMessage($scope.ui, 'general', 'addresses', 'Addresses
are not specified');
+                    return showPopoverMessage($scope.ui, 'general', 'addresses', 'Addresses
are not specified!');
 
                 if (d.kind === 'S3' && d.S3 && $common.isEmptyString(d.S3.bucketName))
-                    return showPopoverMessage($scope.ui, 'general', 'bucketName', 'Bucket
name should not be empty');
+                    return showPopoverMessage($scope.ui, 'general', 'bucketName', 'Bucket
name should not be empty!');
 
                 if (d.kind === 'Cloud' && d.Cloud) {
                     if ($common.isEmptyString(d.Cloud.identity))
-                        return showPopoverMessage($scope.ui, 'general', 'identity', 'Identity
should not be empty');
+                        return showPopoverMessage($scope.ui, 'general', 'identity', 'Identity
should not be empty!');
 
                     if ($common.isEmptyString(d.Cloud.provider))
-                        return showPopoverMessage($scope.ui, 'general', 'provider', 'Provider
should not be empty');
+                        return showPopoverMessage($scope.ui, 'general', 'provider', 'Provider
should not be empty!');
                 }
 
                 if (d.kind === 'GoogleStorage' && d.GoogleStorage) {
                     if ($common.isEmptyString(d.GoogleStorage.projectName))
-                        return showPopoverMessage($scope.ui, 'general', 'projectName', 'Project
name should not be empty');
+                        return showPopoverMessage($scope.ui, 'general', 'projectName', 'Project
name should not be empty!');
 
                     if ($common.isEmptyString(d.GoogleStorage.bucketName))
-                        return showPopoverMessage($scope.ui, 'general', 'bucketName', 'Bucket
name should not be empty');
+                        return showPopoverMessage($scope.ui, 'general', 'bucketName', 'Bucket
name should not be empty!');
 
                     if ($common.isEmptyString(d.GoogleStorage.serviceAccountP12FilePath))
-                        return showPopoverMessage($scope.ui, 'general', 'serviceAccountP12FilePath',
'Private key path should not be empty');
+                        return showPopoverMessage($scope.ui, 'general', 'serviceAccountP12FilePath',
'Private key path should not be empty!');
 
                     if ($common.isEmptyString(d.GoogleStorage.serviceAccountId))
-                        return showPopoverMessage($scope.ui, 'general', 'serviceAccountId',
'Account ID should not be empty');
+                        return showPopoverMessage($scope.ui, 'general', 'serviceAccountId',
'Account ID should not be empty!');
                 }
             }
 
@@ -377,20 +377,20 @@ consoleModule.controller('clustersController', [
                 var sparsity = swap.maximumSparsity;
 
                 if ($common.isDefined(sparsity) && (sparsity < 0 || sparsity >=
1))
-                    return showPopoverMessage($scope.ui, 'swap', 'maximumSparsity', 'Maximum
sparsity should be more or equal 0 and less than 1');
+                    return showPopoverMessage($scope.ui, 'swap', 'maximumSparsity', 'Maximum
sparsity should be more or equal 0 and less than 1!');
 
                 var readStripesNumber = swap.readStripesNumber;
 
                 if (readStripesNumber && !(readStripesNumber == -1 || (readStripesNumber
& (readStripesNumber - 1)) == 0))
-                    return showPopoverMessage($scope.ui, 'swap', 'readStripesNumber', 'Read
stripe size must be positive and power of two');
+                    return showPopoverMessage($scope.ui, 'swap', 'readStripesNumber', 'Read
stripe size must be positive and power of two!');
             }
 
             if (item.sslEnabled) {
                 if (!$common.isDefined(item.sslContextFactory) || $common.isEmptyString(item.sslContextFactory.keyStoreFilePath))
-                    return showPopoverMessage($scope.ui, 'sslConfiguration', 'keyStoreFilePath',
'Key store file should not be empty');
+                    return showPopoverMessage($scope.ui, 'sslConfiguration', 'keyStoreFilePath',
'Key store file should not be empty!');
 
                 if ($common.isEmptyString(item.sslContextFactory.trustStoreFilePath) &&
$common.isEmptyArray(item.sslContextFactory.trustManagers))
-                    return showPopoverMessage($scope.ui, 'sslConfiguration', 'sslConfiguration-title',
'Trust storage file or managers should be configured');
+                    return showPopoverMessage($scope.ui, 'sslConfiguration', 'sslConfiguration-title',
'Trust storage file or managers should be configured!');
             }
 
             if (!swapKind && item.caches) {
@@ -409,7 +409,7 @@ consoleModule.controller('clustersController', [
 
             if (item.rebalanceThreadPoolSize && item.systemThreadPoolSize &&
item.systemThreadPoolSize <= item.rebalanceThreadPoolSize)
                 return showPopoverMessage($scope.ui, 'pools', 'rebalanceThreadPoolSize',
-                    'Rebalance thread pool size exceed or equals System thread pool size');
+                    'Rebalance thread pool size exceed or equals System thread pool size!');
 
             return true;
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/625dcefa/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 adec011..91b047c 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
@@ -66,8 +66,8 @@ mixin hard-link(ref, txt)
 
                         .panel-collapse(id='client' role='tabpanel' bs-collapse-target)
                             form(name='clientForm' novalidate)
-                                - var nearCfg = 'ctrl.cluster.clientNearCfg'
-                                - var nearCfgEvictionPolicy = nearCfg + '.nearEvictionPolicy['
+ nearCfg + '.nearEvictionPolicy.kind]'
+                                -var nearCfg = 'ctrl.cluster.clientNearCfg'
+                                -var nearCfgEvictionPolicy = nearCfg + '.nearEvictionPolicy['
+ nearCfg + '.nearEvictionPolicy.kind]'
 
                                 .details-row
                                     ignite-form-field.col-xs-8.col-sm-8.col-md-7(data-label='Near
cache start size')

http://git-wip-us.apache.org/repos/asf/ignite/blob/625dcefa/modules/control-center-web/src/main/js/views/includes/controls.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/includes/controls.jade b/modules/control-center-web/src/main/js/views/includes/controls.jade
index 9637b0b..aba4b54 100644
--- a/modules/control-center-web/src/main/js/views/includes/controls.jade
+++ b/modules/control-center-web/src/main/js/views/includes/controls.jade
@@ -143,14 +143,14 @@ mixin table-igfs-path-mode(header, tblMdl, keyFld, valFld, keyPlaceholder,
valPl
                             +table-igfs-path-mode-edit('new', keyPlaceholder, valPlaceholder,
'{{::field.focusId}}', '-1')
 
 mixin details-row(lblClasses, fieldClasses)
-    - var lblDetailClasses = lblClasses + ' details-label'
+    -var lblDetailClasses = lblClasses + ' details-label'
 
-    - var detailMdl = 'getModel(backupItem, detail)[detail.model]';
-    - var detailHide = '{{detail.hide}}'
-    - var detailCommon = {'ng-model': detailMdl, 'ng-required': '{{detail.required}}', 'ng-disabled':
'{{detail.disabled}}', 'ng-focus': 'tableReset(true)'};
-    - var dropdownPlaceholder = {'ng-class': '{placeholder: !(' + detailMdl + ' &&
' + detailMdl + '.length > 0)}'}
+    -var detailMdl = 'getModel(backupItem, detail)[detail.model]';
+    -var detailHide = '{{detail.hide}}'
+    -var detailCommon = {'ng-model': detailMdl, 'ng-required': '{{detail.required}}', 'ng-disabled':
'{{detail.disabled}}', 'ng-focus': 'tableReset(true)'};
+    -var dropdownPlaceholder = {'ng-class': '{placeholder: !(' + detailMdl + ' &&
' + detailMdl + '.length > 0)}'}
 
-    - var customValidators = {'ng-attr-ipaddress': '{{detail.ipaddress}}'}
+    -var customValidators = {'ng-attr-ipaddress': '{{detail.ipaddress}}'}
 
     div(ng-switch='detail.type')
         div(ng-switch-when='label' ng-hide=detailHide)
@@ -302,10 +302,10 @@ mixin table-binary-configurations(tblMdl, keyFld, valFld, keyPlaceholder,
valPla
                         +table-row(['col-xs-4 col-sm-4 col-md-4'], ['col-xs-8 col-sm-8 col-md-8'])
 
 mixin table-row(lblClasses, fieldClasses)
-    - var lblRowClasses = lblClasses + ' details-label'
+    -var lblRowClasses = lblClasses + ' details-label'
 
-    - var rowMdl = 'getModel(backupItem, field)[field.model][rowIndex][tableField.model]';
-    - var rowCommon = {'ng-model': rowMdl, 'ng-required': '{{tableField.required}}', 'ng-disabled':
'{{tableField.disabled}}', 'ng-focus': 'tableReset(true)'};
+    -var rowMdl = 'getModel(backupItem, field)[field.model][rowIndex][tableField.model]';
+    -var rowCommon = {'ng-model': rowMdl, 'ng-required': '{{tableField.required}}', 'ng-disabled':
'{{tableField.disabled}}', 'ng-focus': 'tableReset(true)'};
 
     div(ng-switch='tableField.type')
         div.checkbox(ng-switch-when='check')
@@ -326,13 +326,13 @@ mixin form-row(dataSource)
     +form-row-custom(['col-xs-4 col-sm-4 col-md-4'], ['col-xs-8 col-sm-8 col-md-8'], dataSource)
 
 mixin form-row-custom(lblClasses, fieldClasses, dataSource)
-    - var fieldMdl = 'getModel('+ dataSource + ', field)[field.model]';
-    - var fieldCommon = {'ng-model': fieldMdl, 'ng-required': 'field.required || required(field)',
'ng-focus': 'tableReset(true)'};
-    - var fieldRequiredClass = '{true: "required"}[field.required || required(field)]'
-    - var fieldHide = '{{field.hide}}'
-    - var fieldDisabled = {'ng-disabled': '{{field.disabled}}'}
-    - var dropdownPlaceholder = {'ng-class': '{placeholder: ' + fieldMdl + ' == undefined
|| ' + fieldMdl + ' == null}'}
-    - var dropdownMultiPlaceholder = {'ng-class': '{placeholder: !(' + fieldMdl + ' &&
' + fieldMdl + '.length > 0)}'}
+    -var fieldMdl = 'getModel('+ dataSource + ', field)[field.model]';
+    -var fieldCommon = {'ng-model': fieldMdl, 'ng-required': 'field.required || required(field)',
'ng-focus': 'tableReset(true)'};
+    -var fieldRequiredClass = '{true: "required"}[field.required || required(field)]'
+    -var fieldHide = '{{field.hide}}'
+    -var fieldDisabled = {'ng-disabled': '{{field.disabled}}'}
+    -var dropdownPlaceholder = {'ng-class': '{placeholder: ' + fieldMdl + ' == undefined
|| ' + fieldMdl + ' == null}'}
+    -var dropdownMultiPlaceholder = {'ng-class': '{placeholder: !(' + fieldMdl + ' &&
' + fieldMdl + '.length > 0)}'}
 
     div(ng-switch='field.type')
         div(ng-switch-when='label' ng-hide=fieldHide)
@@ -386,7 +386,7 @@ mixin form-row-custom(lblClasses, fieldClasses, dataSource)
                 .input-tip
                     button.select-toggle.form-control(id='{{::field.id}}' bs-select ng-disabled='{{field.items}}.length
== 0' data-multiple='1' data-placeholder='{{::$eval(field.items).length == 0 ? field.placeholderEmpty
|| field.placeholder : field.placeholder}}' bs-options='item.value as item.label for item
in {{field.items}}' tabindex='-1')&attributes(fieldCommon)&attributes(dropdownMultiPlaceholder)
         div(ng-switch-when='dropdown-details' ng-hide=fieldHide)
-            - var expanded = 'field.details[' + fieldMdl + '].expanded'
+            -var expanded = 'field.details[' + fieldMdl + '].expanded'
 
             label(class=lblClasses ng-class=fieldRequiredClass) {{::field.label}}:
             div(class=fieldClasses)


Mime
View raw message