ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject incubator-ignite git commit: # IGNITE-843 Rework to use form build from JSON descriptor.
Date Thu, 04 Jun 2015 05:49:28 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 d43353054 -> 64d783376


# IGNITE-843 Rework to use form build from JSON descriptor.


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

Branch: refs/heads/ignite-843
Commit: 64d783376ae7305fcf2934b971bfae2cae1f715e
Parents: d433530
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Thu Jun 4 12:49:20 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Thu Jun 4 12:49:20 2015 +0700

----------------------------------------------------------------------
 modules/webconfig/nodejs/db.js                  | 11 ----------
 .../public/javascripts/controllers/caches.js    |  6 +++++
 modules/webconfig/nodejs/views/caches.jade      | 23 ++++++++++----------
 3 files changed, 17 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64d78337/modules/webconfig/nodejs/db.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/db.js b/modules/webconfig/nodejs/db.js
index 36b7151..f84b322 100644
--- a/modules/webconfig/nodejs/db.js
+++ b/modules/webconfig/nodejs/db.js
@@ -71,17 +71,6 @@ var ClusterSchema = new Schema({
 // Define cluster model.
 exports.Cluster =  mongoose.model('Cluster', ClusterSchema);
 
-//ClusterSchema.pre('save', function(next) {
-//    // swap account model for the id
-//    var id = this._doc.discovery._id;
-//    //save the account model, which fires it's own middleware
-//    this._doc.discovery.save();
-//    // reset the account to the id before it is saved
-//    this._doc.discovery = id;
-//
-//    next();
-//});
-
 ClusterSchema.pre('remove', function(next) {
     var discovery = false;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64d78337/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 90ce870..bddfb79 100644
--- a/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
+++ b/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
@@ -51,6 +51,12 @@ configuratorModule.controller('cachesController', ['$scope', '$http', function($
             {value: 'OFHV', label: 'Offheap values'}
             ];
 
+        $scope.generalGrp = [
+            {name: "Name", type: "text", model: 'name'},
+            {name: "Mode", type: "dropdown", model: 'mode', placeholder: 'Choose mode', items:
'modes'},
+            {name: "Atomicity", type: "dropdown", model: 'atomicity', placeholder: 'Choose
atomicity', items: 'atomicities'}
+        ];
+
         //DefaultLockTimeout dfltLockTimeout
         //invalidate
         //TransactionManagerLookupClassName tmLookupClsName

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/64d78337/modules/webconfig/nodejs/views/caches.jade
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/views/caches.jade b/modules/webconfig/nodejs/views/caches.jade
index 6bb1914..1346084 100644
--- a/modules/webconfig/nodejs/views/caches.jade
+++ b/modules/webconfig/nodejs/views/caches.jade
@@ -39,21 +39,20 @@ block content
             hr
         form.form-horizontal(name='editForm' ng-if='backupItem')
             h3 General
-            .settings-row
-                span.col-sm-2 Name:
-                .col-sm-3
-                    input.form-control(type='text' ng-model='backupItem.name')
-            .settings-row
-                span.col-sm-2 Mode:
-                .col-sm-3
-                    button.form-control(style='text-align: left' ng-model='backupItem.mode'
data-template='/select' data-placeholder='Choose mode' bs-options='item.value as item.label
for item in modes' bs-select)
-            .settings-row
-                span.col-sm-2 Atomicity:
-                .col-sm-3
-                    button.form-control(style='text-align: left' ng-model='backupItem.atomicity'
data-template='/select' data-placeholder='Choose Atomicity' bs-options='item.value as item.label
for item in atomicities' bs-select)
+            .settings-row(ng-repeat='fld in generalGrp')
+                span.col-sm-2 {{fld.name}}:
+                .col-sm-3(ng-switch on='fld.type')
+                    div(ng-switch-when='text')
+                        input.form-control(type='text' ng-model='backupItem[fld.model]')
+                    div(ng-switch-when='dropdown')
+                        button.form-control(style='text-align: left' ng-model='backupItem[fld.model]'
data-template='/select' data-placeholder='{{fld.placeholder}}' bs-options='item.value as item.label
for item in {{fld.items}}' bs-select)
             .panel(bs-collapse data-start-collapsed='true')
                 .panel-collapse(bs-collapse-target)
                     .settings-row
+                        span.col-sm-2 Atomicity:
+                        .col-sm-3
+                            button.form-control(style='text-align: left' ng-model='backupItem.atomicity'
data-template='/select' data-placeholder='Choose Atomicity' bs-options='item.value as item.label
for item in atomicities' bs-select)
+                    .settings-row
                         span.col-sm-2 Backups:
                         .col-sm-3
                             input.form-control(type='text' ng-model='backupItem.backups'
placeholder='0')


Mime
View raw message