You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2015/06/11 10:58:22 UTC

[1/3] incubator-ignite git commit: # IGNITE-843 Wip on cache indexed types.

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 8be9461ba -> a14783a9e


# IGNITE-843 Wip on cache indexed types.


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

Branch: refs/heads/ignite-843
Commit: 81b98a1cb9163cf534972dacf8852b50a4e3556b
Parents: 6c0928b
Author: AKuznetsov <ak...@gridgain.com>
Authored: Thu Jun 11 15:41:44 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Thu Jun 11 15:41:44 2015 +0700

----------------------------------------------------------------------
 .../nodejs/public/form-models/caches.json       |  5 +-
 .../public/javascripts/controllers/caches.js    | 58 ++++++++++++++++----
 .../nodejs/views/includes/controls.jade         | 14 ++++-
 modules/webconfig/nodejs/views/simplePopup.jade |  4 +-
 4 files changed, 65 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/81b98a1c/modules/webconfig/nodejs/public/form-models/caches.json
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/public/form-models/caches.json b/modules/webconfig/nodejs/public/form-models/caches.json
index eae2c1f..dfc028d 100644
--- a/modules/webconfig/nodejs/public/form-models/caches.json
+++ b/modules/webconfig/nodejs/public/form-models/caches.json
@@ -351,8 +351,9 @@
           ]
         },
         {
-          "label": "SQL functions",
-          "type": "text",
+          "table-label": "SQL functions",
+          "label": "SQL function",
+          "type": "table-simple",
           "model": "sqlFunctionClasses",
           "tip": [
             "Classes with user-defined functions for SQL queries."

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/81b98a1c/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/public/javascripts/controllers/caches.js b/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
index 3872249..6ba705b 100644
--- a/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
+++ b/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
@@ -17,15 +17,7 @@
 
 configuratorModule.controller('cachesController', ['$scope', '$modal', '$http', function ($scope, $modal, $http) {
         $scope.templates = [
-            {
-                value: {
-                    mode: 'PARTITIONED', atomicityMode: 'ATOMIC',
-                    indexedTypes: [{
-                        keyClass: 'org.some.KeyClass',
-                        valueClass: 'org.some.ValueClass'
-                    }, {keyClass: 'org.some.KeyClass2', valueClass: 'org.some.ValueClass2'}]
-                }, label: 'Partitioned'
-            },
+            {value: {mode: 'PARTITIONED', atomicityMode: 'ATOMIC'}, label: 'Partitioned'},
             {value: {mode: 'REPLICATED', atomicityMode: 'ATOMIC'}, label: 'Replicated'},
             {value: {mode: 'LOCAL', atomicityMode: 'ATOMIC'}, label: 'Local'}
         ];
@@ -96,8 +88,14 @@ configuratorModule.controller('cachesController', ['$scope', '$modal', '$http',
 
             var idx = $scope.indexedTypeIdx;
 
-            if (idx < 0)
-                idxTypes.push({keyClass: k, valueClass: v});
+            if (idx < 0) {
+                var newItem = {keyClass: k, valueClass: v};
+
+                if (undefined == idxTypes)
+                    $scope.backupItem.indexedTypes = [newItem];
+                else
+                    idxTypes.push(newItem);
+            }
             else {
                 var idxType = idxTypes[idx];
 
@@ -187,5 +185,43 @@ configuratorModule.controller('cachesController', ['$scope', '$modal', '$http',
                     console.log('Error: ' + errorMessage);
                 });
         };
+
+        $scope.createSimpleItem = function(desc, rows) {
+            $scope.simplePopup = {
+                rows: rows,
+                desc: desc
+            };
+
+            $scope.pupup = $modal({scope: $scope, template: '/simplePopup', show: true});
+        };
+
+        $scope.saveSimpleItem = function(row) {
+            var popup = $scope.simplePopup;
+            var rows = popup.rows;
+
+            if (popup.index)
+                angular.extend(rows[popup.index], row);
+            else if (undefined == rows)
+                popup.rows = [row];
+            else
+                popup.rows.push(row);
+
+            $scope.pupup.hide();
+        };
+
+        $scope.editSimpleItem = function(desc, rows, idx) {
+            $scope.simplePopup = {
+                desc: desc,
+                rows: rows,
+                index: idx,
+                row: angular.copy(rows[idx])
+            };
+
+            $modal({scope: $scope, template: '/simplePopup', show: true});
+        };
+
+        $scope.removeSimpleItem = function(rows, idx) {
+            rows.splice(idx, 1);
+        };
     }]
 );
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/81b98a1c/modules/webconfig/nodejs/views/includes/controls.jade
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/views/includes/controls.jade b/modules/webconfig/nodejs/views/includes/controls.jade
index 537d6c4..8f4d2f8 100644
--- a/modules/webconfig/nodejs/views/includes/controls.jade
+++ b/modules/webconfig/nodejs/views/includes/controls.jade
@@ -91,12 +91,24 @@ mixin form-row
             +tip('field.tip')
             .details-row(ng-repeat='detail in field.details[#{masterMdl}]')
                 +details-row
+        div(ng-switch-when='table-simple')
+            div
+                label {{field.table-label}}
+                +tip('field.tip')
+            button.btn.btn-primary(style='margin-left: 18px;' ng-click='createSimpleItem(field, #{masterMdl})') Add {{field.label}}
+            .col-sm-10.links.details-row(style='margin-bottom: 0px;' nh-show='#{masterMdl}[field.model].length > 0')
+                table(st-table=masterMdl)
+                    tbody
+                        tr(ng-repeat='row in #{masterMdl}')
+                            td
+                                a(ng-click='editSimpleItem(field, #{masterMdl}, $index)') {{$index + 1}}. {{row}}
+                                label.fa.fa-remove(ng-click='removeSimpleItem(#{masterMdl}, $index)')
         div(ng-switch-when='indexedTypes')
             div
                 label Indexed types: {{backupItem.indexedTypes.length}}
                 +tip('field.tip')
             button.btn.btn-primary(style='margin-left: 18px; margin-top: 10px; margin-bottom: 10px' ng-click='editIndexedTypes(-1)') Add indexed type
-            .col-sm-10.links
+            .col-sm-10.links(nh-show='backupItem.indexedTypes.length > 0')
                 -var idxTypes = 'backupItem.indexedTypes'
                 table(st-table=idxTypes)
                     tbody

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/81b98a1c/modules/webconfig/nodejs/views/simplePopup.jade
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/views/simplePopup.jade b/modules/webconfig/nodejs/views/simplePopup.jade
index c6e8bf2..d107e53 100644
--- a/modules/webconfig/nodejs/views/simplePopup.jade
+++ b/modules/webconfig/nodejs/views/simplePopup.jade
@@ -24,8 +24,8 @@
                 .modal-body.row
                     .col-sm-10.col-sm-offset-1
                         .details-row
-                            label.col-sm-2 {{simplePopup.desc.label | capitalize}}:
-                            .col-sm-9
+                            label.col-sm-3 {{simplePopup.desc.label | capitalize}}:
+                            .col-sm-8
                                 input.form-control(type='text' ng-model='simplePopup.row' required)
                             i.tip.fa.fa-question-circle(ng-if='simplePopup.desc.tip' bs-tooltip='simplePopup.desc.tip.join("")' type='button')
                 .modal-footer


[3/3] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-843' into ignite-843

Posted by ak...@apache.org.
Merge remote-tracking branch 'origin/ignite-843' into ignite-843


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

Branch: refs/heads/ignite-843
Commit: a14783a9e710a1773a103d9601fc5f817ad174ec
Parents: 241fb8b 8be9461
Author: AKuznetsov <ak...@gridgain.com>
Authored: Thu Jun 11 15:58:17 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Thu Jun 11 15:58:17 2015 +0700

----------------------------------------------------------------------
 modules/webconfig/nodejs/DEVNOTES.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[2/3] incubator-ignite git commit: # IGNITE-843 Added near cache.

Posted by ak...@apache.org.
# IGNITE-843 Added near cache.


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

Branch: refs/heads/ignite-843
Commit: 241fb8b405876990d00a8c393676a3603b4efe2d
Parents: 81b98a1
Author: AKuznetsov <ak...@gridgain.com>
Authored: Thu Jun 11 15:58:03 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Thu Jun 11 15:58:03 2015 +0700

----------------------------------------------------------------------
 modules/webconfig/nodejs/db.js                  |  7 +++++-
 .../nodejs/public/form-models/caches.json       | 25 ++++++++++++++++++++
 2 files changed, 31 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/241fb8b4/modules/webconfig/nodejs/db.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/db.js b/modules/webconfig/nodejs/db.js
index 9b933f7..f8cc2bb 100644
--- a/modules/webconfig/nodejs/db.js
+++ b/modules/webconfig/nodejs/db.js
@@ -111,7 +111,12 @@ var CacheSchema = new Schema({
     managementEnabled: Boolean,
     readFromBackup: Boolean,
     copyOnRead: Boolean,
-    maxConcurrentAsyncOperations: Number
+    maxConcurrentAsyncOperations: Number,
+    nearConfiguration: {
+        nearStartSize: Number,
+        nearEvictionPolicy: {type: String, enum: ['LRU', 'RND', 'FIFO', 'Sorted']},
+        atomicSequenceReserveSize: Number
+    }
 });
 
 exports.Cache = mongoose.model('Cache', CacheSchema);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/241fb8b4/modules/webconfig/nodejs/public/form-models/caches.json
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/public/form-models/caches.json b/modules/webconfig/nodejs/public/form-models/caches.json
index dfc028d..e86f673 100644
--- a/modules/webconfig/nodejs/public/form-models/caches.json
+++ b/modules/webconfig/nodejs/public/form-models/caches.json
@@ -362,6 +362,31 @@
       ]
     },
     {
+      "label": "Near cache",
+      "model": "nearConfiguration",
+      "fields": [
+        {
+          "label": "Start size",
+          "type": "text",
+          "model": "nearStartSize",
+          "placeholder": "375000",
+          "tip": [
+            "Initial cache size for near cache which will be used to pre-create internal hash table after start."
+          ]
+        },
+        {
+          "label": "Eviction policy",
+          "type": "dropdown",
+          "model": "nearEvictionPolicy",
+          "placeholder": "Choose eviction policy",
+          "items": "evictionPolicies",
+          "tip": [
+            "Cache expiration policy."
+          ]
+        }
+      ]
+    },
+    {
       "label": "Misc",
       "fields": [
         {