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 cache type metadata.
Date Mon, 13 Jul 2015 16:17:57 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 777ec16f3 -> 010a2a324


IGNITE-843: WIP on cache type metadata.


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

Branch: refs/heads/ignite-843
Commit: 010a2a3246f047f888de04e5b48095fd06c961e4
Parents: 777ec16
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Mon Jul 13 23:17:52 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Mon Jul 13 23:17:52 2015 +0700

----------------------------------------------------------------------
 .../nodejs/controllers/metadata-controller.js   |  7 ++
 .../nodejs/controllers/models/clusters.json     |  2 +-
 .../nodejs/controllers/models/metadata.json     | 93 ++++++++++++++++++++
 .../nodejs/views/configuration/metadata.jade    |  5 +-
 4 files changed, 105 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/010a2a32/modules/web-control-center/nodejs/controllers/metadata-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/metadata-controller.js b/modules/web-control-center/nodejs/controllers/metadata-controller.js
index 0a0e18c..93074cd 100644
--- a/modules/web-control-center/nodejs/controllers/metadata-controller.js
+++ b/modules/web-control-center/nodejs/controllers/metadata-controller.js
@@ -20,10 +20,17 @@ controlCenterModule.controller('metadataController', ['$scope', '$http',
'common
         $scope.joinTip = commonFunctions.joinTip;
         $scope.getModel = commonFunctions.getModel;
 
+        $scope.templates = [
+            {value: 'query', label: 'query'},
+            {value: 'store', label: 'store'},
+            {value: 'both', label: 'both'}
+        ];
+
         $scope.metadata = [];
 
         $http.get('/models/metadata.json')
             .success(function (data) {
+                $scope.templateTip = data.templateTip;
                 $scope.general = data.general;
             })
             .error(function (errMsg) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/010a2a32/modules/web-control-center/nodejs/controllers/models/clusters.json
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/models/clusters.json b/modules/web-control-center/nodejs/controllers/models/clusters.json
index 76926e5..8c4f828 100644
--- a/modules/web-control-center/nodejs/controllers/models/clusters.json
+++ b/modules/web-control-center/nodejs/controllers/models/clusters.json
@@ -2,7 +2,7 @@
   "templateTip": [
     "Use following template for add cluster:",
     "<ul>",
-    "  <li>blank - Empty configuration.</li>",
+    "  <li>none - Empty configuration.</li>",
     "  <li>local - Configuration with static ips discovery and pre-configured list
of IP addresses.</li>",
     "  <li>multicast - Configuration with multicast discovery.</li>",
     "</ul>"

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/010a2a32/modules/web-control-center/nodejs/controllers/models/metadata.json
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/models/metadata.json b/modules/web-control-center/nodejs/controllers/models/metadata.json
index 5a125d5..02b9809 100644
--- a/modules/web-control-center/nodejs/controllers/models/metadata.json
+++ b/modules/web-control-center/nodejs/controllers/models/metadata.json
@@ -1,4 +1,12 @@
 {
+  "templateTip": [
+    "Use following template for metadata:",
+    "<ul>",
+    "  <li>query - Create cache type metadata to use with queries only.</li>",
+    "  <li>store - Create cache type metadata to use with JDBC POJO store only.</li>",
+    "  <li>both - Create cache type metadata to use with query and store.</li>",
+    "</ul>"
+  ],
   "general": [
     {
       "label": "Name",
@@ -6,6 +14,91 @@
       "model": "name",
       "required": true,
       "placeholder": "Input name"
+    },
+    {
+      "label": "kind",
+      "type": "dropdown",
+      "model": "kind",
+      "required": true,
+      "items": "templates",
+      "placeholder": "Select kind"
+    },
+    {
+      "label": "dbSchema",
+      "type": "text",
+      "model": "dbSchema",
+      "required": true,
+      "placeholder": "Input DB schema name"
+    },
+    {
+      "label": "dbTbl",
+      "type": "text",
+      "model": "dbTbl",
+      "required": true,
+      "placeholder": "Input DB table name"
+    },
+    {
+      "label": "keyType",
+      "type": "text",
+      "model": "keyType",
+      "required": true,
+      "placeholder": "Full class name for Key"
+    },
+    {
+      "label": "valType",
+      "type": "text",
+      "model": "valType",
+      "required": true,
+      "placeholder": "Full class name for Value"
+    },
+    {
+      "label": "keyFields",
+      "type": "text",
+      "model": "keyFields",
+      "required": true,
+      "placeholder": "TODO"
+    },
+    {
+      "label": "valFields",
+      "type": "text",
+      "model": "valFields",
+      "required": true,
+      "placeholder": "TODO"
+    },
+    {
+      "label": "qryFlds",
+      "type": "text",
+      "model": "qryFlds",
+      "required": true,
+      "placeholder": "TODO"
+    },
+    {
+      "label": "ascFlds",
+      "type": "text",
+      "model": "ascFlds",
+      "required": true,
+      "placeholder": "TODO"
+    },
+    {
+      "label": "descFlds",
+      "type": "text",
+      "model": "descFlds",
+      "required": true,
+      "placeholder": "TODO"
+    },
+    {
+      "label": "txtFlds",
+      "type": "text",
+      "model": "txtFlds",
+      "required": true,
+      "placeholder": "TODO"
+    },
+    {
+      "label": "grps",
+      "type": "text",
+      "model": "grps",
+      "required": true,
+      "placeholder": "TODO"
     }
   ]
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/010a2a32/modules/web-control-center/nodejs/views/configuration/metadata.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/configuration/metadata.jade b/modules/web-control-center/nodejs/views/configuration/metadata.jade
index 5c21c2b..b3469f2 100644
--- a/modules/web-control-center/nodejs/views/configuration/metadata.jade
+++ b/modules/web-control-center/nodejs/views/configuration/metadata.jade
@@ -32,7 +32,10 @@ block content
                     tr(ng-repeat='row in metadata track by row._id')
                         td.col-sm-6(ng-class='{active: row._id == selectedItem._id}')
                             a(ng-click='selectItem(row)') {{$index + 1}}) {{row.name}}
-        button.btn.btn-primary(ng-click='createItem()') Add metadata
+        button.btn.btn-primary(ng-click='createItem()' ng-disabled='!create.template') &nbspAdd
metadata
+        label(style='margin-left: 15px; margin-right: 10px') for:
+        button.btn.btn-default(ng-init='create.template = templates[0].value' ng-model='create.template'
data-template='/select' data-placeholder='Choose metadata type' bs-options='item.value as
item.label for item in templates' bs-select)
+        i.tiplabel.fa.fa-question-circle(bs-tooltip data-title='{{joinTip(templateTip)}}'
type='button')
         hr
         form.form-horizontal(name='inputForm' ng-if='backupItem' novalidate)
             .panel-body


Mime
View raw message