Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 7a9e3bfe0 -> 5690a1fed


# IGNITE-843 WIP on caches screen.


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

Branch: refs/heads/ignite-843
Commit: 5690a1fedb635a954e0b71aadc69bf25ddca0163
Parents: 7a9e3bf
Author: AKuznetsov <akuznet...@gridgain.com>
Authored: Tue Jun 9 17:58:32 2015 +0700
Committer: AKuznetsov <akuznet...@gridgain.com>
Committed: Tue Jun 9 17:58:32 2015 +0700

----------------------------------------------------------------------
 modules/webconfig/nodejs/db.js                  | 17 +++++++++++++++++
 .../nodejs/public/form-models/caches.json       | 20 ++++++++++----------
 .../public/javascripts/controllers/caches.js    |  7 +++++++
 3 files changed, 34 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5690a1fe/modules/webconfig/nodejs/db.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/db.js b/modules/webconfig/nodejs/db.js
index 40c0466..de51fd5 100644
--- a/modules/webconfig/nodejs/db.js
+++ b/modules/webconfig/nodejs/db.js
@@ -64,6 +64,23 @@ var CacheSchema = new Schema({
     offHeapMaxMemory: Number,
     swapEnabled: Boolean,
 
+    evictionPolicy: {
+        kind: {type: String, enum: ['LRU', 'RND', 'FIFO', 'Sorted']},
+        LRU: {
+            batchSize: Number,
+            maxMemorySize: Number
+        },
+        RND: {
+            batchSize: Number
+        },
+        FIFO: {
+            batchSize: Number
+        },
+        SORTED: {
+            batchSize: Number
+        }
+    },
+
     rebalanceMode: {type: String, enum: ['SYNC', 'ASYNC', 'NONE']},
     rebalanceThreadPoolSize: Number,
     rebalanceBatchSize: Number,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5690a1fe/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 c19eecd..eae2c1f 100644
--- a/modules/webconfig/nodejs/public/form-models/caches.json
+++ b/modules/webconfig/nodejs/public/form-models/caches.json
@@ -91,15 +91,15 @@
           "details": {
             "LRU": [
               {
-                "label": "BatchSize",
+                "label": "Batch size",
                 "type": "text",
-                "model": "BatchSize",
+                "model": "batchSize",
                 "placeholder": "1"
               },
               {
-                "label": "MaxMemorySize",
+                "label": "Max memory size",
                 "type": "text",
-                "model": "MaxMemorySize",
+                "model": "maxMemorySize",
                 "placeholder": "0",
                 "tip": [
                   "Maximum allowed cache size in bytes."
@@ -108,25 +108,25 @@
             ],
             "RND": [
               {
-                "label": "BatchSize",
+                "label": "Batch size",
                 "type": "text",
-                "model": "BatchSize",
+                "model": "batchSize",
                 "placeholder": "1"
               }
             ],
             "FIFO": [
               {
-                "label": "BatchSize",
+                "label": "Batch size",
                 "type": "text",
-                "model": "BatchSize",
+                "model": "batchSize",
                 "placeholder": "1"
               }
             ],
             "SORTED": [
               {
-                "label": "BatchSize",
+                "label": "Batch size",
                 "type": "text",
-                "model": "BatchSize",
+                "model": "batchSize",
                 "placeholder": "1"
               }
             ]

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5690a1fe/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 2a10c6d..2adbc60 100644
--- a/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
+++ b/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
@@ -44,6 +44,13 @@ configuratorModule.controller('cachesController', ['$scope', 
'$modal', '$http',
             {value: 'OFFHEAP_VALUES', label: 'OFFHEAP_VALUES'}
             ];
 
+        $scope.evictionPolicies = [
+            {value: 'LRU', label: 'Least Recently Used'},
+            {value: 'RND', label: 'Random'},
+            {value: 'FIFO', label: 'FIFO'},
+            {value: 'SORTED', label: 'Sorted'}
+        ];
+
         $scope.rebalanceModes = [
             {value: 'SYNC', label: 'Synchronous'},
             {value: 'ASYNC', label: 'Asynchronous'},

Reply via email to