ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [1/2] incubator-ignite git commit: IGNITE-843 WIP query groups.
Date Mon, 20 Jul 2015 11:12:02 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 85062e304 -> 064ea503e


IGNITE-843 WIP query groups.


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

Branch: refs/heads/ignite-843
Commit: d51f4127888d1dbdedde4a33fe50d75e6e351427
Parents: 36cfaad
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Mon Jul 20 18:11:38 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Mon Jul 20 18:11:38 2015 +0700

----------------------------------------------------------------------
 .../nodejs/controllers/metadata-controller.js    | 15 +++++++++++++++
 .../nodejs/controllers/models/metadata.json      |  2 +-
 modules/web-control-center/nodejs/db.js          |  2 +-
 .../nodejs/views/includes/controls.jade          | 19 +++++++++++++++++--
 4 files changed, 34 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d51f4127/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 b56b94e..65229da 100644
--- a/modules/web-control-center/nodejs/controllers/metadata-controller.js
+++ b/modules/web-control-center/nodejs/controllers/metadata-controller.js
@@ -303,6 +303,21 @@ controlCenterModule.controller('metadataController', ['$scope', '$http',
'$commo
         // Add new metadata.
         $scope.createItem = function () {
             $scope.backupItem = angular.copy($scope.template);
+
+            $scope.backupItem.groups = [{
+                name: "index1",
+                fields: [
+                    {name: "fld1", className: "Integer", direction: "ASC"},
+                    {name: "fld2", className: "String", direction: "DESC"}]
+            },
+                {
+                    name: "index1",
+                    fields: [
+                        {name: "fld3", className: "Integer", direction: "ASC"},
+                        {name: "fld4", className: "Data", direction: "DESC"}]
+                }
+            ];
+
             $scope.backupItem.space = $scope.spaces[0]._id;
         };
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d51f4127/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 3315835..d32d546 100644
--- a/modules/web-control-center/nodejs/controllers/models/metadata.json
+++ b/modules/web-control-center/nodejs/controllers/models/metadata.json
@@ -121,7 +121,7 @@
     },
     {
       "label": "Groups",
-      "type": "groupsMetadata",
+      "type": "queryGroups",
       "model": "groups",
       "hide": "backupItem.kind != 'query'",
       "tip": ["Collection of group indexes."]

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d51f4127/modules/web-control-center/nodejs/db.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/db.js b/modules/web-control-center/nodejs/db.js
index ae34573..e34272c 100644
--- a/modules/web-control-center/nodejs/db.js
+++ b/modules/web-control-center/nodejs/db.js
@@ -76,7 +76,7 @@ var CacheTypeMetadataSchema = new Schema({
     ascendingFields: [{name: String, className: String}],
     descendingFields:  [{name: String, className: String}],
     textFields: [String],
-    groups: [{name: String, fields: [{field: String, className: String, direction: String}]}]
+    groups: [{name: String, fields: [{name: String, className: String, direction: String}]}]
 });
 
 exports.CacheTypeMetadata = mongoose.model('CacheTypeMetadata', CacheTypeMetadataSchema);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d51f4127/modules/web-control-center/nodejs/views/includes/controls.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/includes/controls.jade b/modules/web-control-center/nodejs/views/includes/controls.jade
index aedee2c..d803e08 100644
--- a/modules/web-control-center/nodejs/views/includes/controls.jade
+++ b/modules/web-control-center/nodejs/views/includes/controls.jade
@@ -267,5 +267,20 @@ mixin form-row-custom(lblClasses, fieldClasses)
                     +btn-save('tableDbFieldSaveVisible(newDbName, newDbType, newJavaName,
newJavaType)', 'tableDbFieldSave(field, newDbName, newDbType, newJavaName, newJavaType, -1)')
                     .input-tip
                         +table-db-field-edit('newDbName', 'newDbType', 'newJavaName', 'newJavaType')
-        div(ng-switch-when='groupsMetadata' ng-hide=fieldHide)&attributes(fieldCommon)
-            label.table-header {{field.label}}:
+        div(ng-switch-when='queryGroups' ng-hide=fieldHide)
+            .col-sm-6
+                label.table-header {{field.label}}:
+                +tipLabel('field.tip')
+                button.btn.btn-primary.fieldButton(ng-click='tableNewItem(field)') Add
+            table.links-edit.col-sm-12(st-table=fieldMdl ng-show='#{fieldMdl}.length >
0')
+                tbody
+                    tr.col-sm-12(ng-repeat='item in #{fieldMdl}')
+                        td.col-sm-6
+                            div
+                                a(ng-click='curGroup = tableStartEdit(backupItem, field,
$index); curName = curGroup.name; curFields = curGroup.fields') {{$index + 1}}) {{item.name}}
+                                +btn-remove('tableRemove(backupItem, field, $index)')
+                                table
+                                    tr(ng-repeat='z in item.fields')
+                                        td
+                                            label {{$index + 1}}) {{z.name}} / {{z.className}}
/ {{z.direction}}
+


Mime
View raw message