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 WIP on persistence.
Date Mon, 29 Jun 2015 11:08:48 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 94ffba241 -> 0937f7093


# IGNITE-843 WIP on persistence.


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

Branch: refs/heads/ignite-843
Commit: 0937f7093ee9ffa1ec9122f2013eecd1062a3eb6
Parents: 94ffba2
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Mon Jun 29 18:08:46 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Mon Jun 29 18:08:46 2015 +0700

----------------------------------------------------------------------
 modules/webconfig/nodejs/db.js                  |  4 +-
 .../nodejs/public/form-models/persistence.json  | 14 ++++--
 .../javascripts/controllers/persistences.js     | 11 +++++
 modules/webconfig/nodejs/views/persistence.jade | 45 ++++++++++++++++++++
 4 files changed, 70 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0937f709/modules/webconfig/nodejs/db.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/db.js b/modules/webconfig/nodejs/db.js
index 5be5c89..48ecbd1 100644
--- a/modules/webconfig/nodejs/db.js
+++ b/modules/webconfig/nodejs/db.js
@@ -279,7 +279,9 @@ exports.Cluster = mongoose.model('Cluster', ClusterSchema);
 var PersistenceSchema = new Schema({
     space: {type: ObjectId, ref: 'Space'},
     name: String,
-    database: {type: String, enum: ['oracle', 'db2', 'mssql', 'postgre', 'mysql', 'h2']},
+    dbType: {type: String, enum: ['oracle', 'db2', 'mssql', 'postgre', 'mysql', 'h2']},
+    dbName: String,
+    host: String,
     user: String,
     tables: [{
         use: Boolean,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0937f709/modules/webconfig/nodejs/public/form-models/persistence.json
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/public/form-models/persistence.json b/modules/webconfig/nodejs/public/form-models/persistence.json
index 69ca679..edf5344 100644
--- a/modules/webconfig/nodejs/public/form-models/persistence.json
+++ b/modules/webconfig/nodejs/public/form-models/persistence.json
@@ -7,13 +7,21 @@
       "required": true
     },
     {
-      "label": "Database",
+      "label": "Database type",
       "type": "dropdown",
-      "model": "database",
+      "model": "dbType",
       "placeholder": "Choose database",
       "items": "databases",
       "tip": [
-        "Select database to connect for loading tables metadata."
+        "Select database type to connect for loading tables metadata."
+      ]
+    },
+    {
+      "label": "Database name",
+      "type": "text",
+      "model": "dbName",
+      "tip": [
+        "Database name to connect for loading tables metadata."
       ]
     },
     {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0937f709/modules/webconfig/nodejs/public/javascripts/controllers/persistences.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/public/javascripts/controllers/persistences.js b/modules/webconfig/nodejs/public/javascripts/controllers/persistences.js
index 836561a..857113a 100644
--- a/modules/webconfig/nodejs/public/javascripts/controllers/persistences.js
+++ b/modules/webconfig/nodejs/public/javascripts/controllers/persistences.js
@@ -117,5 +117,16 @@ configuratorModule.controller('persistenceController', ['$scope', '$alert',
'$ht
                     $alert({title: errorMessage});
                 });
         };
+
+        $scope.tables = [
+            {schema: 'Schema1', keyClass: 'KeyClass1', valueClass: 'ValueClass1'},
+            {schema: 'Schema2', keyClass: 'KeyClass2', valueClass: 'ValueClass2'},
+            {schema: 'Schema3', keyClass: 'KeyClass3', valueClass: 'ValueClass3'}];
+
+        $scope.columns = [
+            {use: true, key: true, ak: true, dbName: 'name1', dbType: 'dbType1', javaName:
'javaName1', javaType: 'javaType1'},
+            {use: true, key: false, ak: false, dbName: 'name2', dbType: 'dbType2', javaName:
'javaName2', javaType: 'javaType2'},
+            {use: false, key: false, ak: false, dbName: 'name3', dbType: 'dbType3', javaName:
'javaName3', javaType: 'javaType3'}
+        ];
     }]
 );

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0937f709/modules/webconfig/nodejs/views/persistence.jade
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/views/persistence.jade b/modules/webconfig/nodejs/views/persistence.jade
index f642dca..194f507 100644
--- a/modules/webconfig/nodejs/views/persistence.jade
+++ b/modules/webconfig/nodejs/views/persistence.jade
@@ -47,3 +47,48 @@ block content
                                 +form-row
             button.btn.btn-primary(ng-disabled='inputForm.$invalid' ng-click='saveItem()')
Save
             button.btn.btn-primary.btn-second(ng-show='backupItem._id' ng-click='removeItem()')
Remove
+            button.btn.btn-primary.btn-second(ng-click='reloadMetadata()') Reload
+        .links(ng-hide='tables.length == 0')
+            table.table-bordered.table-condensed.col-sm-12(st-table='tables')
+                thead
+                    tr
+                        th Schema/Table
+                        th Key class
+                        th Value class
+                tbody
+                    tr(ng-repeat='row in tables')
+                        td.col-sm-4
+                            a {{row.schema}}
+                        td.col-sm-4
+                            a {{row.keyClass}}
+                        td.col-sm-4
+                            a {{row.valueClass}}
+        .links(ng-hide='columns.length == 0')
+            table.table-bordered.table-condensed.col-sm-12(st-table='columns')
+                thead
+                    tr
+                        th.col-sm-1 Use
+                        th.col-sm-1 Key
+                        th.col-sm-1 Ak
+                        th.col-sm-2 DB Name
+                        th.col-sm-2 DB Type
+                        th.col-sm-2 Java Name
+                        th.col-sm-2 Java Type
+                tbody
+                    tr(ng-repeat='row in columns')
+                        td.col-sm-1
+                            input(type='checkbox' ng-checked='row.use')
+                        td.col-sm-1
+                            input(type='checkbox' ng-checked='row.key')
+                        td.col-sm-1
+                            input(type='checkbox' ng-checked='row.ak')
+                        td.col-sm-2
+                            a {{row.dbName}}
+                        td.col-sm-2
+                            a {{row.dbType}}
+                        td.col-sm-2
+                            a {{row.javaName}}
+                        td.col-sm-2
+                            a {{row.javaType}}
+
+


Mime
View raw message