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 on metadata
Date Wed, 05 Aug 2015 11:08:09 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 ed47b3453 -> 0b6e48c57


IGNITE-843 WIP on 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/126a7cbd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/126a7cbd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/126a7cbd

Branch: refs/heads/ignite-843
Commit: 126a7cbd63a671eb795252f3056ce34f8a85c05d
Parents: b0cd7fc
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Wed Aug 5 18:07:48 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Wed Aug 5 18:07:48 2015 +0700

----------------------------------------------------------------------
 .../main/js/controllers/metadata-controller.js  | 1054 +++++++++---------
 .../main/js/controllers/models/metadata.json    |    2 +-
 .../src/main/js/public/stylesheets/style.scss   |   24 -
 .../main/js/views/configuration/metadata.jade   |   59 +-
 .../src/main/js/views/includes/controls.jade    |    7 +
 5 files changed, 524 insertions(+), 622 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/126a7cbd/modules/control-center-web/src/main/js/controllers/metadata-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/metadata-controller.js b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
index 70db126..c85fb73 100644
--- a/modules/control-center-web/src/main/js/controllers/metadata-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
@@ -15,139 +15,103 @@
  * limitations under the License.
  */
 
-controlCenterModule.controller('metadataController', ['$scope', '$http', '$common', '$focus', '$confirm', '$copy', '$table', function ($scope, $http, $common, $focus, $confirm, $copy, $table) {
-        $scope.joinTip = $common.joinTip;
-        $scope.getModel = $common.getModel;
-        $scope.javaBuildInClasses = $common.javaBuildInClasses;
-
-        $scope.tableReset = $table.tableReset;
-        $scope.tableNewItem = $table.tableNewItem;
-        $scope.tableNewItemActive = $table.tableNewItemActive;
-        $scope.tableEditing = $table.tableEditing;
-        $scope.tableStartEdit = $table.tableStartEdit;
-        $scope.tableRemove = $table.tableRemove;
-
-        $scope.tableSimpleSave = $table.tableSimpleSave;
-        $scope.tableSimpleSaveVisible = $table.tableSimpleSaveVisible;
-        $scope.tableSimpleUp = $table.tableSimpleUp;
-        $scope.tableSimpleDown = $table.tableSimpleDown;
-        $scope.tableSimpleDownVisible = $table.tableSimpleDownVisible;
-
-        $scope.tablePairSave = $table.tablePairSave;
-        $scope.tablePairSaveVisible = $table.tablePairSaveVisible;
-
-        $scope.templates = [
-            {value: {kind: 'query'}, label: 'query'},
-            {value: {kind: 'store'}, label: 'store'},
-            {value: {kind: 'both'}, label: 'both'}
-        ];
-
-        $scope.template = $scope.templates[0].value;
-
-        $scope.kinds = [
-            {value: 'query', label: 'query'},
-            {value: 'store', label: 'store'},
-            {value: 'both', label: 'both'}
-        ];
-
-        $scope.databases = [
-            {value: 'oracle', label: 'Oracle database'},
-            {value: 'db2', label: 'IBM DB2'},
-            {value: 'mssql', label: 'MS SQL Server'},
-            {value: 'postgre', label: 'PostgreSQL'},
-            {value: 'mysql', label: 'MySQL'},
-            {value: 'h2', label: 'H2 database'}
-        ];
-
-        $scope.jdbcTypes = [
-            {value: 'BIT', label: 'BIT'},
-            {value: 'BOOLEAN', label: 'BOOLEAN'},
-            {value: 'TINYINT', label: 'TINYINT'},
-            {value: 'SMALLINT', label: 'SMALLINT'},
-            {value: 'INTEGER', label: 'INTEGER'},
-            {value: 'BIGINT', label: 'BIGINT'},
-            {value: 'REAL', label: 'REAL'},
-            {value: 'FLOAT', label: 'FLOAT'},
-            {value: 'DOUBLE', label: 'DOUBLE'},
-            {value: 'NUMERIC', label: 'NUMERIC'},
-            {value: 'DECIMAL', label: 'DECIMAL'},
-            {value: 'CHAR', label: 'CHAR'},
-            {value: 'VARCHAR', label: 'VARCHAR'},
-            {value: 'LONGVARCHAR', label: 'LONGVARCHAR'},
-            {value: 'NCHAR', label: 'NCHAR'},
-            {value: 'NVARCHAR', label: 'NVARCHAR'},
-            {value: 'LONGNVARCHAR', label: 'LONGNVARCHAR'},
-            {value: 'DATE', label: 'DATE'},
-            {value: 'TIME', label: 'TIME'},
-            {value: 'TIMESTAMP', label: 'TIMESTAMP'}
-        ];
-
-        $scope.javaTypes = [
-            {value: 'boolean', label: 'boolean'},
-            {value: 'Boolean', label: 'Boolean'},
-            {value: 'byte', label: 'byte'},
-            {value: 'Byte', label: 'Byte'},
-            {value: 'short', label: 'short'},
-            {value: 'Short', label: 'Short'},
-            {value: 'int', label: 'int'},
-            {value: 'Integer', label: 'Integer'},
-            {value: 'long', label: 'long'},
-            {value: 'Long', label: 'Long'},
-            {value: 'float', label: 'float'},
-            {value: 'Float', label: 'Float'},
-            {value: 'double', label: 'double'},
-            {value: 'Double', label: 'Double'},
-            {value: 'BigDecimal', label: 'BigDecimal'},
-            {value: 'String', label: 'String'},
-            {value: 'Date', label: 'Date'},
-            {value: 'Time', label: 'Time'},
-            {value: 'Timestamp', label: 'Timestamp'}
-        ];
-
-        $scope.sortDirections = [
-            {value: false, label: 'ASC'},
-            {value: true, label: 'DESC'}
-        ];
-
-        $scope.fieldz = [
-            {
-                use: true,
-                key: true,
-                ak: true,
-                databaseName: 'name1',
-                databaseType: 'dbType1',
-                javaName: 'javaName1',
-                javaType: 'javaType1'
-            },
-            {
-                use: true,
-                key: false,
-                ak: false,
-                databaseName: 'name2',
-                databaseType: 'dbType2',
-                javaName: 'javaName2',
-                javaType: 'javaType2'
-            },
-            {
-                use: false,
-                key: false,
-                ak: false,
-                databaseName: 'name3',
-                databaseType: 'dbType3',
-                javaName: 'javaName3',
-                javaType: 'javaType3'
-            }
-        ];
-
-        $scope.data = {
-            curTableIdx: 0,
-            curFieldIdx: 0,
-            curKeyClass: '',
-            curValueClass: '',
-            curJavaName: '',
-            curJavaType: '',
-            tables: [
-                {schemaName: 'Schema1', use: true},
+controlCenterModule.controller('metadataController', [
+        '$scope', '$http', '$common', '$focus', '$confirm', '$copy', '$table', function ($scope, $http, $common, $focus,
+            $confirm, $copy, $table) {
+            $scope.joinTip = $common.joinTip;
+            $scope.getModel = $common.getModel;
+            $scope.javaBuildInClasses = $common.javaBuildInClasses;
+
+            $scope.tableReset = $table.tableReset;
+            $scope.tableNewItem = $table.tableNewItem;
+            $scope.tableNewItemActive = $table.tableNewItemActive;
+            $scope.tableEditing = $table.tableEditing;
+            $scope.tableStartEdit = $table.tableStartEdit;
+            $scope.tableRemove = $table.tableRemove;
+
+            $scope.tableSimpleSave = $table.tableSimpleSave;
+            $scope.tableSimpleSaveVisible = $table.tableSimpleSaveVisible;
+            $scope.tableSimpleUp = $table.tableSimpleUp;
+            $scope.tableSimpleDown = $table.tableSimpleDown;
+            $scope.tableSimpleDownVisible = $table.tableSimpleDownVisible;
+
+            $scope.tablePairSave = $table.tablePairSave;
+            $scope.tablePairSaveVisible = $table.tablePairSaveVisible;
+
+            $scope.templates = [
+                {value: {kind: 'query'}, label: 'query'},
+                {value: {kind: 'store'}, label: 'store'},
+                {value: {kind: 'both'}, label: 'both'}
+            ];
+
+            $scope.template = $scope.templates[0].value;
+
+            $scope.kinds = [
+                {value: 'query', label: 'query'},
+                {value: 'store', label: 'store'},
+                {value: 'both', label: 'both'}
+            ];
+
+            $scope.databases = [
+                {value: 'oracle', label: 'Oracle database'},
+                {value: 'db2', label: 'IBM DB2'},
+                {value: 'mssql', label: 'MS SQL Server'},
+                {value: 'postgre', label: 'PostgreSQL'},
+                {value: 'mysql', label: 'MySQL'},
+                {value: 'h2', label: 'H2 database'}
+            ];
+
+            $scope.jdbcTypes = [
+                {value: 'BIT', label: 'BIT'},
+                {value: 'BOOLEAN', label: 'BOOLEAN'},
+                {value: 'TINYINT', label: 'TINYINT'},
+                {value: 'SMALLINT', label: 'SMALLINT'},
+                {value: 'INTEGER', label: 'INTEGER'},
+                {value: 'BIGINT', label: 'BIGINT'},
+                {value: 'REAL', label: 'REAL'},
+                {value: 'FLOAT', label: 'FLOAT'},
+                {value: 'DOUBLE', label: 'DOUBLE'},
+                {value: 'NUMERIC', label: 'NUMERIC'},
+                {value: 'DECIMAL', label: 'DECIMAL'},
+                {value: 'CHAR', label: 'CHAR'},
+                {value: 'VARCHAR', label: 'VARCHAR'},
+                {value: 'LONGVARCHAR', label: 'LONGVARCHAR'},
+                {value: 'NCHAR', label: 'NCHAR'},
+                {value: 'NVARCHAR', label: 'NVARCHAR'},
+                {value: 'LONGNVARCHAR', label: 'LONGNVARCHAR'},
+                {value: 'DATE', label: 'DATE'},
+                {value: 'TIME', label: 'TIME'},
+                {value: 'TIMESTAMP', label: 'TIMESTAMP'}
+            ];
+
+            $scope.javaTypes = [
+                {value: 'boolean', label: 'boolean'},
+                {value: 'Boolean', label: 'Boolean'},
+                {value: 'byte', label: 'byte'},
+                {value: 'Byte', label: 'Byte'},
+                {value: 'short', label: 'short'},
+                {value: 'Short', label: 'Short'},
+                {value: 'int', label: 'int'},
+                {value: 'Integer', label: 'Integer'},
+                {value: 'long', label: 'long'},
+                {value: 'Long', label: 'Long'},
+                {value: 'float', label: 'float'},
+                {value: 'Float', label: 'Float'},
+                {value: 'double', label: 'double'},
+                {value: 'Double', label: 'Double'},
+                {value: 'BigDecimal', label: 'BigDecimal'},
+                {value: 'String', label: 'String'},
+                {value: 'Date', label: 'Date'},
+                {value: 'Time', label: 'Time'},
+                {value: 'Timestamp', label: 'Timestamp'}
+            ];
+
+            $scope.sortDirections = [
+                {value: false, label: 'ASC'},
+                {value: true, label: 'DESC'}
+            ];
+
+            $scope.tables = [
                 {
                     schemaName: 'Schema1',
                     use: true,
@@ -184,9 +148,8 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', '$commo
                         }
                     ]
                 },
-                {schemaName: 'Schema2 with very long name', use: false},
                 {
-                    schemaName: 'Schema2',
+                    schemaName: 'Schema with very long name',
                     use: false,
                     tableName: 'Table2',
                     keyClass: 'KeyClass2',
@@ -222,7 +185,7 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', '$commo
                     ]
                 },
                 {
-                    schemaName: 'Schema2',
+                    schemaName: 'Schema3',
                     use: false,
                     tableName: 'Table3',
                     keyClass: 'KeyClass3',
@@ -283,562 +246,561 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', '$commo
                             javaType: 'javaType12'
                         }
                     ]
-                }]
-        };
-
-        $scope.metadatas = [];
+                }];
 
-        $scope.required = function (field) {
-            var model = $common.isDefined(field.path) ? field.path + '.' + field.model : field.model;
+            $scope.metadatas = [];
 
-            var item = $scope.backupItem;
+            $scope.required = function (field) {
+                var model = $common.isDefined(field.path) ? field.path + '.' + field.model : field.model;
 
-            if (item && item.kind && item.kind != 'query') {
-                return model == 'databaseSchema' || model == 'databaseTable';
-            }
+                var item = $scope.backupItem;
 
-            return false;
-        };
+                if (item && item.kind && item.kind != 'query') {
+                    return model == 'databaseSchema' || model == 'databaseTable';
+                }
 
-        $scope.isJavaBuildInClass = function () {
-            var item = $scope.backupItem;
+                return false;
+            };
 
-            if (item && item.keyType)
-                return $common.isJavaBuildInClass(item.keyType);
+            $scope.isJavaBuildInClass = function () {
+                var item = $scope.backupItem;
 
-            return false;
-        };
+                if (item && item.keyType)
+                    return $common.isJavaBuildInClass(item.keyType);
 
-        $http.get('/models/metadata.json')
-            .success(function (data) {
-                $scope.screenTip = data.screenTip;
-                $scope.templateTip = data.templateTip;
-                $scope.metadataManual = data.metadataManual;
-                $scope.metadataDb = data.metadataDb;
-            })
-            .error(function (errMsg) {
-                $common.showError(errMsg);
-            });
+                return false;
+            };
+
+            $http.get('/models/metadata.json')
+                .success(function (data) {
+                    $scope.screenTip = data.screenTip;
+                    $scope.templateTip = data.templateTip;
+                    $scope.metadataManual = data.metadataManual;
+                    $scope.metadataDb = data.metadataDb;
+                })
+                .error(function (errMsg) {
+                    $common.showError(errMsg);
+                });
 
-        function selectFirstItem() {
-            if ($scope.metadatas.length > 0)
-                $scope.selectItem($scope.metadatas[0]);
-        }
+            function selectFirstItem() {
+                if ($scope.metadatas.length > 0)
+                    $scope.selectItem($scope.metadatas[0]);
+            }
 
-        function setSelectedAndBackupItem(sel, bak) {
-            $table.tableReset();
+            function setSelectedAndBackupItem(sel, bak) {
+                $table.tableReset();
 
-            $scope.selectedItem = sel;
-            $scope.backupItem = bak;
+                $scope.selectedItem = sel;
+                $scope.backupItem = bak;
 
-            $scope.panels.activePanel = [0];
-        }
+                $scope.panels.activePanel = [0];
+            }
 
-        // When landing on the page, get metadatas and show them.
-        $http.post('metadata/list')
-            .success(function (data) {
-                $scope.spaces = data.spaces;
-                $scope.metadatas = data.metadatas;
+            // When landing on the page, get metadatas and show them.
+            $http.post('metadata/list')
+                .success(function (data) {
+                    $scope.spaces = data.spaces;
+                    $scope.metadatas = data.metadatas;
 
-                var restoredItem = angular.fromJson(sessionStorage.metadataBackupItem);
+                    var restoredItem = angular.fromJson(sessionStorage.metadataBackupItem);
 
-                if (restoredItem) {
-                    if (restoredItem._id) {
-                        var idx = _.findIndex($scope.metadatas, function (metadata) {
-                            return metadata._id == restoredItem._id;
-                        });
+                    if (restoredItem) {
+                        if (restoredItem._id) {
+                            var idx = _.findIndex($scope.metadatas, function (metadata) {
+                                return metadata._id == restoredItem._id;
+                            });
 
-                        if (idx >= 0)
-                            setSelectedAndBackupItem($scope.metadatas[idx], restoredItem);
-                        else {
-                            sessionStorage.removeItem('metadataBackupItem');
+                            if (idx >= 0)
+                                setSelectedAndBackupItem($scope.metadatas[idx], restoredItem);
+                            else {
+                                sessionStorage.removeItem('metadataBackupItem');
 
-                            selectFirstItem();
+                                selectFirstItem();
+                            }
                         }
+                        else
+                            setSelectedAndBackupItem(undefined, restoredItem);
                     }
                     else
-                        setSelectedAndBackupItem(undefined, restoredItem);
-                }
-                else
-                    selectFirstItem();
-
-                $scope.$watch('backupItem', function (val) {
-                    if (val)
-                        sessionStorage.metadataBackupItem = angular.toJson(val);
-                }, true);
-            })
-            .error(function (errMsg) {
-                $common.showError(errMsg);
-            });
-
-        $scope.selectItem = function (item) {
-            setSelectedAndBackupItem(item, angular.copy(item));
-        };
+                        selectFirstItem();
 
-        // Add new metadata.
-        $scope.createItem = function () {
-            $table.tableReset();
-
-            $scope.selectedItem = undefined;
+                    $scope.$watch('backupItem', function (val) {
+                        if (val)
+                            sessionStorage.metadataBackupItem = angular.toJson(val);
+                    }, true);
+                })
+                .error(function (errMsg) {
+                    $common.showError(errMsg);
+                });
 
-            $scope.backupItem = angular.copy($scope.template);
-            $scope.backupItem.space = $scope.spaces[0]._id;
-        };
+            $scope.selectItem = function (item) {
+                setSelectedAndBackupItem(item, angular.copy(item));
+            };
 
-        // Check metadata logical consistency.
-        function validate(item) {
-            var kind = item.kind;
+            // Add new metadata.
+            $scope.createItem = function () {
+                $table.tableReset();
 
-            if (!$common.isValidJavaClass('Key type', item.keyType, true)) {
-                $focus('keyType');
+                $scope.selectedItem = undefined;
 
-                return false;
-            }
+                $scope.backupItem = angular.copy($scope.template);
+                $scope.backupItem.space = $scope.spaces[0]._id;
+            };
 
+            // Check metadata logical consistency.
+            function validate(item) {
+                var kind = item.kind;
 
-            if (!$common.isValidJavaClass('Value type', item.valueType, false)) {
-                $focus('valueType');
+                if (!$common.isValidJavaClass('Key type', item.keyType, true)) {
+                    $focus('keyType');
 
-                return false;
-            }
+                    return false;
+                }
 
-            if (kind == 'query' || kind == 'both') {
-                if ($common.isEmptyArray(item.queryFields) && $common.isEmptyArray(item.ascendingFields) &&
-                    $common.isEmptyArray(item.descendingFields) && $common.isEmptyArray(item.textFields) &&
-                    $common.isEmptyArray(item.groups)) {
-                    $common.showError('SQL fields are not specified!');
+                if (!$common.isValidJavaClass('Value type', item.valueType, false)) {
+                    $focus('valueType');
 
                     return false;
                 }
 
-                var groups = item.groups;
-                if (groups && groups.length > 0) {
-                    for (var i = 0; i < groups.length; i++) {
-                        var group = groups[i];
-                        var fields = group.fields;
+                if (kind == 'query' || kind == 'both') {
+                    if ($common.isEmptyArray(item.queryFields) && $common.isEmptyArray(item.ascendingFields) &&
+                        $common.isEmptyArray(item.descendingFields) && $common.isEmptyArray(item.textFields) &&
+                        $common.isEmptyArray(item.groups)) {
+                        $common.showError('SQL fields are not specified!');
 
-                        if ($common.isEmptyArray(fields)) {
-                            $common.showError('Group "' + group.name + '" has no fields.');
+                        return false;
+                    }
 
-                            return false;
-                        }
+                    var groups = item.groups;
+                    if (groups && groups.length > 0) {
+                        for (var i = 0; i < groups.length; i++) {
+                            var group = groups[i];
+                            var fields = group.fields;
+
+                            if ($common.isEmptyArray(fields)) {
+                                $common.showError('Group "' + group.name + '" has no fields.');
 
-                        if (fields.length == 1) {
-                            $common.showError('Group "' + group.name + '" has only one field.<br/> Consider to use ascending or descending fields.');
+                                return false;
+                            }
+
+                            if (fields.length == 1) {
+                                $common.showError('Group "' + group.name + '" has only one field.<br/> Consider to use ascending or descending fields.');
 
-                            return false;
+                                return false;
+                            }
                         }
                     }
                 }
-            }
 
-            if (kind == 'store' || kind == 'both') {
-                if ($common.isEmptyArray(item.keyFields) && !$common.isJavaBuildInClass(item.keyType)) {
-                    $common.showError('Key fields are not specified!');
+                if (kind == 'store' || kind == 'both') {
+                    if ($common.isEmptyArray(item.keyFields) && !$common.isJavaBuildInClass(item.keyType)) {
+                        $common.showError('Key fields are not specified!');
 
-                    return false;
-                }
+                        return false;
+                    }
 
-                if ($common.isEmptyArray(item.valueFields)) {
-                    $common.showError('Value fields are not specified!');
+                    if ($common.isEmptyArray(item.valueFields)) {
+                        $common.showError('Value fields are not specified!');
 
-                    return false;
+                        return false;
+                    }
                 }
-            }
 
-            return true;
-        }
-
-        // Save cache type metadata into database.
-        function save(item) {
-            $http.post('metadata/save', item)
-                .success(function (_id) {
-                    $common.showInfo('Metadata "' + item.name + '" saved.');
-
-                    var idx = _.findIndex($scope.metadatas, function (metadata) {
-                        return metadata._id == _id;
-                    });
-
-                    if (idx >= 0)
-                        angular.extend($scope.metadatas[idx], item);
-                    else {
-                        item._id = _id;
-
-                        $scope.metadatas.push(item);
-                    }
+                return true;
+            }
 
-                    $scope.selectItem(item);
+            // Save cache type metadata into database.
+            function save(item) {
+                $http.post('metadata/save', item)
+                    .success(function (_id) {
+                        $common.showInfo('Metadata "' + item.name + '" saved.');
 
-                    $common.showInfo('Cache type metadata"' + item.name + '" saved.');
-                })
-                .error(function (errMsg) {
-                    $common.showError(errMsg);
-                });
-        }
+                        var idx = _.findIndex($scope.metadatas, function (metadata) {
+                            return metadata._id == _id;
+                        });
 
-        // Save cache type metadata.
-        $scope.saveItem = function () {
-            $table.tableReset();
+                        if (idx >= 0)
+                            angular.extend($scope.metadatas[idx], item);
+                        else {
+                            item._id = _id;
 
-            var item = $scope.backupItem;
+                            $scope.metadatas.push(item);
+                        }
 
-            if (validate(item))
-                save(item);
-        };
+                        $scope.selectItem(item);
 
-        // Save cache type metadata with new name.
-        $scope.saveItemAs = function () {
-            $table.tableReset();
+                        $common.showInfo('Cache type metadata"' + item.name + '" saved.');
+                    })
+                    .error(function (errMsg) {
+                        $common.showError(errMsg);
+                    });
+            }
 
-            if (validate($scope.backupItem))
-                $copy.show($scope.backupItem.name).then(function (newName) {
-                    var item = angular.copy($scope.backupItem);
+            // Save cache type metadata.
+            $scope.saveItem = function () {
+                $table.tableReset();
 
-                    item._id = undefined;
-                    item.name = newName;
+                var item = $scope.backupItem;
 
+                if (validate(item))
                     save(item);
-                });
-        };
+            };
 
-        $scope.removeItem = function () {
-            $table.tableReset();
+            // Save cache type metadata with new name.
+            $scope.saveItemAs = function () {
+                $table.tableReset();
 
-            var selectedItem = $scope.selectedItem;
+                if (validate($scope.backupItem))
+                    $copy.show($scope.backupItem.name).then(function (newName) {
+                        var item = angular.copy($scope.backupItem);
 
-            $confirm.show('Are you sure you want to remove cache type metadata: "' + selectedItem.name + '"?').then(
-                function () {
-                    var _id = selectedItem._id;
+                        item._id = undefined;
+                        item.name = newName;
 
-                    $http.post('metadata/remove', {_id: _id})
-                        .success(function () {
-                            $common.showInfo('Cache type metadata has been removed: ' + selectedItem.name);
+                        save(item);
+                    });
+            };
 
-                            var metadatas = $scope.metadatas;
+            $scope.removeItem = function () {
+                $table.tableReset();
 
-                            var idx = _.findIndex(metadatas, function (metadata) {
-                                return metadata._id == _id;
-                            });
+                var selectedItem = $scope.selectedItem;
 
-                            if (idx >= 0) {
-                                metadatas.splice(idx, 1);
+                $confirm.show('Are you sure you want to remove cache type metadata: "' + selectedItem.name + '"?').then(
+                    function () {
+                        var _id = selectedItem._id;
 
-                                if (metadatas.length > 0)
-                                    $scope.selectItem(metadatas[0]);
-                                else {
-                                    $scope.selectedItem = undefined;
-                                    $scope.backupItem = undefined;
-                                }
-                            }
-                        })
-                        .error(function (errMsg) {
-                            $common.showError(errMsg);
-                        });
-                });
-        };
+                        $http.post('metadata/remove', {_id: _id})
+                            .success(function () {
+                                $common.showInfo('Cache type metadata has been removed: ' + selectedItem.name);
 
-        function focusInvalidField(index, id) {
-            $focus(index < 0 ? 'new' + id : 'cur' + id);
+                                var metadatas = $scope.metadatas;
 
-            return false;
-        }
+                                var idx = _.findIndex(metadatas, function (metadata) {
+                                    return metadata._id == _id;
+                                });
 
-        $scope.tableSimpleValid = function (item, field, name, index) {
-            var model = item[field.model];
+                                if (idx >= 0) {
+                                    metadatas.splice(idx, 1);
 
-            if ($common.isDefined(model)) {
-                var idx = _.indexOf(model, name);
+                                    if (metadatas.length > 0)
+                                        $scope.selectItem(metadatas[0]);
+                                    else {
+                                        $scope.selectedItem = undefined;
+                                        $scope.backupItem = undefined;
+                                    }
+                                }
+                            })
+                            .error(function (errMsg) {
+                                $common.showError(errMsg);
+                            });
+                    });
+            };
 
-                // Found duplicate.
-                if (idx >= 0 && idx != index) {
-                    $common.showError('Field with such name already exists!');
+            function focusInvalidField(index, id) {
+                $focus(index < 0 ? 'new' + id : 'cur' + id);
 
-                    return focusInvalidField(index, 'TextField');
-                }
+                return false;
             }
 
-            return true;
-        };
-
-        var pairFields = {
-            queryFields: {msg: 'Query field class', id: 'QryField'},
-            ascendingFields: {msg: 'Ascending field class', id: 'AscField'},
-            descendingFields: {msg: 'Descending field class', id: 'DescField'}
-        };
-
-        $scope.tablePairValid = function (item, field, name, clsName, index) {
-            var pairField = pairFields[field.model];
-
-            if (pairField) {
-                if (!$common.isValidJavaClass(pairField.msg, clsName, true))
-                    return focusInvalidField(index, pairField.id + 'Next');
-
+            $scope.tableSimpleValid = function (item, field, name, index) {
                 var model = item[field.model];
 
                 if ($common.isDefined(model)) {
-                    var idx = _.findIndex(model, function (pair) {
-                        return pair.name == name
-                    });
+                    var idx = _.indexOf(model, name);
 
                     // Found duplicate.
                     if (idx >= 0 && idx != index) {
                         $common.showError('Field with such name already exists!');
 
-                        return focusInvalidField(index, pairField.id);
+                        return focusInvalidField(index, 'TextField');
                     }
                 }
-            }
-
-            return true;
-        };
-
-        $scope.tableDbFieldSaveVisible = function (databaseName, databaseType, javaName, javaType) {
-            return !$common.isEmptyString(databaseName) && $common.isDefined(databaseType) && !$common.isEmptyString(javaName) && $common.isDefined(javaType);
-        };
 
-        var dbFields = {
-            keyFields: {msg: 'Key field', id: 'KeyField'},
-            valueFields: {msg: 'Value field', id: 'ValueField'}
-        };
+                return true;
+            };
 
-        $scope.tableDbFieldSave = function (field, newDatabaseName, newDatabaseType, newJavaName, newJavaType, index) {
-            var dbField = dbFields[field.model];
+            var pairFields = {
+                queryFields: {msg: 'Query field class', id: 'QryField'},
+                ascendingFields: {msg: 'Ascending field class', id: 'AscField'},
+                descendingFields: {msg: 'Descending field class', id: 'DescField'}
+            };
 
-            if (dbField) {
-                var backupItem = $scope.backupItem;
+            $scope.tablePairValid = function (item, field, name, clsName, index) {
+                var pairField = pairFields[field.model];
 
-                var model = backupItem[field.model];
+                if (pairField) {
+                    if (!$common.isValidJavaClass(pairField.msg, clsName, true))
+                        return focusInvalidField(index, pairField.id + 'Next');
 
-                var newItem = {
-                    databaseName: newDatabaseName,
-                    databaseType: newDatabaseType,
-                    javaName: newJavaName,
-                    javaType: newJavaType
-                };
+                    var model = item[field.model];
 
-                if (!$common.isValidJavaIdentifier(dbField.msg + ' java name', newJavaName))
-                    return focusInvalidField(index, dbField.id + 'Next');
-
-                if ($common.isDefined(model)) {
-                    var idx = _.findIndex(model, function (dbMeta) {
-                        return dbMeta.databaseName == newDatabaseName
-                    });
+                    if ($common.isDefined(model)) {
+                        var idx = _.findIndex(model, function (pair) {
+                            return pair.name == name
+                        });
 
-                    // Found duplicate.
-                    if (idx >= 0 && index != idx) {
-                        $common.showError('DB field with such name already exists!');
+                        // Found duplicate.
+                        if (idx >= 0 && idx != index) {
+                            $common.showError('Field with such name already exists!');
 
-                        return focusInvalidField(index, dbField.id);
+                            return focusInvalidField(index, pairField.id);
+                        }
                     }
+                }
 
-                    if (index < 0) {
-                        if (model)
-                            model.push(newItem);
-                        else
-                            backupItem[field.model] = [newItem];
-                    }
-                    else {
-                        var item = model[index];
+                return true;
+            };
 
-                        item.databaseName = newDatabaseName;
-                        item.databaseType = newDatabaseType;
-                        item.javaName = newJavaName;
-                        item.javaType = newJavaType;
-                    }
-                }
-                else
-                    backupItem[field.model] = [newItem];
+            $scope.tableDbFieldSaveVisible = function (databaseName, databaseType, javaName, javaType) {
+                return !$common.isEmptyString(databaseName) && $common.isDefined(databaseType) && !$common.isEmptyString(javaName) && $common.isDefined(javaType);
+            };
 
-                $table.tableReset();
-            }
-        };
+            var dbFields = {
+                keyFields: {msg: 'Key field', id: 'KeyField'},
+                valueFields: {msg: 'Value field', id: 'ValueField'}
+            };
 
-        $scope.tableGroupSaveVisible = function (group) {
-            return !$common.isEmptyString(group);
-        };
+            $scope.tableDbFieldSave = function (field, newDatabaseName, newDatabaseType, newJavaName, newJavaType,
+                index) {
+                var dbField = dbFields[field.model];
 
-        function tableGroupValid(groupName, index) {
-            var groups = $scope.backupItem.groups;
+                if (dbField) {
+                    var backupItem = $scope.backupItem;
 
-            if ($common.isDefined(groups)) {
-                var idx = _.findIndex(groups, function (group) {
-                    return group.name == groupName;
-                });
+                    var model = backupItem[field.model];
 
-                // Found duplicate.
-                if (idx >= 0 && idx != index) {
-                    $common.showError('Group with such name already exists!');
+                    var newItem = {
+                        databaseName: newDatabaseName,
+                        databaseType: newDatabaseType,
+                        javaName: newJavaName,
+                        javaType: newJavaType
+                    };
 
-                    return focusInvalidField(index, 'GroupName');
-                }
-            }
+                    if (!$common.isValidJavaIdentifier(dbField.msg + ' java name', newJavaName))
+                        return focusInvalidField(index, dbField.id + 'Next');
 
-            return true;
-        }
+                    if ($common.isDefined(model)) {
+                        var idx = _.findIndex(model, function (dbMeta) {
+                            return dbMeta.databaseName == newDatabaseName
+                        });
 
-        $scope.tableGroupSave = function (groupName, index) {
-            if (tableGroupValid(groupName, index)) {
-                $table.tableReset();
+                        // Found duplicate.
+                        if (idx >= 0 && index != idx) {
+                            $common.showError('DB field with such name already exists!');
 
-                var item = $scope.backupItem;
+                            return focusInvalidField(index, dbField.id);
+                        }
 
-                if (index < 0) {
-                    var newGroup = {name: groupName};
+                        if (index < 0) {
+                            if (model)
+                                model.push(newItem);
+                            else
+                                backupItem[field.model] = [newItem];
+                        }
+                        else {
+                            var item = model[index];
 
-                    if (item.groups)
-                        item.groups.push(newGroup);
+                            item.databaseName = newDatabaseName;
+                            item.databaseType = newDatabaseType;
+                            item.javaName = newJavaName;
+                            item.javaType = newJavaType;
+                        }
+                    }
                     else
-                        item.groups = [newGroup];
-                }
-                else
-                    item.groups[index].name = groupName;
-            }
-        };
+                        backupItem[field.model] = [newItem];
 
-        $scope.tableGroupNewItem = function (groupIndex) {
-            var groupName = $scope.backupItem.groups[groupIndex].name;
+                    $table.tableReset();
+                }
+            };
 
-            return $table.tableNewItem({model: groupName});
-        };
+            $scope.tableGroupSaveVisible = function (group) {
+                return !$common.isEmptyString(group);
+            };
 
-        $scope.tableGroupNewItemActive = function (groupIndex) {
-            var groups = $scope.backupItem.groups;
+            function tableGroupValid(groupName, index) {
+                var groups = $scope.backupItem.groups;
 
-            if (groups) {
-                var group = groups[groupIndex];
+                if ($common.isDefined(groups)) {
+                    var idx = _.findIndex(groups, function (group) {
+                        return group.name == groupName;
+                    });
 
-                if (group) {
-                    var groupName = group.name;
+                    // Found duplicate.
+                    if (idx >= 0 && idx != index) {
+                        $common.showError('Group with such name already exists!');
 
-                    return $table.tableNewItemActive({model: groupName});
+                        return focusInvalidField(index, 'GroupName');
+                    }
                 }
+
+                return true;
             }
 
-            return false;
-        };
+            $scope.tableGroupSave = function (groupName, index) {
+                if (tableGroupValid(groupName, index)) {
+                    $table.tableReset();
 
-        $scope.tableGroupItemEditing = function (groupIndex, index) {
-            var groups = $scope.backupItem.groups;
+                    var item = $scope.backupItem;
 
-            if (groups) {
-                var group = groups[groupIndex];
+                    if (index < 0) {
+                        var newGroup = {name: groupName};
 
-                if (group)
-                    return $table.tableEditing({model: group.name}, index);
-            }
+                        if (item.groups)
+                            item.groups.push(newGroup);
+                        else
+                            item.groups = [newGroup];
+                    }
+                    else
+                        item.groups[index].name = groupName;
+                }
+            };
 
-            return false;
-        };
+            $scope.tableGroupNewItem = function (groupIndex) {
+                var groupName = $scope.backupItem.groups[groupIndex].name;
 
-        $scope.tableGroupItemStartEdit = function (groupIndex, index) {
-            var groups = $scope.backupItem.groups;
+                return $table.tableNewItem({model: groupName});
+            };
 
-            $table.tableState(groups[groupIndex].name, index);
+            $scope.tableGroupNewItemActive = function (groupIndex) {
+                var groups = $scope.backupItem.groups;
 
-            return groups[groupIndex].fields[index];
-        };
+                if (groups) {
+                    var group = groups[groupIndex];
 
-        $scope.tableGroupItemSaveVisible = function (fieldName, className) {
-            return !$common.isEmptyString(fieldName) && !$common.isEmptyString(className);
-        };
+                    if (group) {
+                        var groupName = group.name;
 
-        function tableGroupItemValid(fieldName, className, groupIndex, index) {
-            if (!$common.isValidJavaClass('Group field', className, true))
-                return focusInvalidField(index, 'FieldNameNext');
+                        return $table.tableNewItemActive({model: groupName});
+                    }
+                }
 
-            var fields = $scope.backupItem.groups[groupIndex].fields;
+                return false;
+            };
 
-            if ($common.isDefined(fields)) {
-                var idx = _.findIndex(fields, function (field) {
-                    return field.name == fieldName;
-                });
+            $scope.tableGroupItemEditing = function (groupIndex, index) {
+                var groups = $scope.backupItem.groups;
 
-                // Found duplicate.
-                if (idx >= 0 && idx != index) {
-                    $common.showError('Field with such name already exists in group!');
+                if (groups) {
+                    var group = groups[groupIndex];
 
-                    return focusInvalidField(index, 'FieldName');
+                    if (group)
+                        return $table.tableEditing({model: group.name}, index);
                 }
-            }
 
-            return true;
-        }
+                return false;
+            };
 
-        $scope.tableGroupItemSave = function (fieldName, className, direction, groupIndex, index) {
-            if (tableGroupItemValid(fieldName, className, groupIndex, index)) {
-                $table.tableReset();
+            $scope.tableGroupItemStartEdit = function (groupIndex, index) {
+                var groups = $scope.backupItem.groups;
 
-                var group = $scope.backupItem.groups[groupIndex];
+                $table.tableState(groups[groupIndex].name, index);
 
-                if (index < 0) {
-                    var newGroupItem = {name: fieldName, className: className, direction: direction};
+                return groups[groupIndex].fields[index];
+            };
 
-                    if (group.fields)
-                        group.fields.push(newGroupItem);
-                    else
-                        group.fields = [newGroupItem];
-                }
-                else {
-                    var groupItem = group.fields[index];
+            $scope.tableGroupItemSaveVisible = function (fieldName, className) {
+                return !$common.isEmptyString(fieldName) && !$common.isEmptyString(className);
+            };
 
-                    groupItem.name = fieldName;
-                    groupItem.className = className;
-                    groupItem.direction = direction;
-                }
-            }
-        };
+            function tableGroupItemValid(fieldName, className, groupIndex, index) {
+                if (!$common.isValidJavaClass('Group field', className, true))
+                    return focusInvalidField(index, 'FieldNameNext');
 
-        $scope.tableRemoveGroupItem = function (group, index) {
-            $table.tableReset();
+                var fields = $scope.backupItem.groups[groupIndex].fields;
 
-            group.fields.splice(index, 1);
-        };
+                if ($common.isDefined(fields)) {
+                    var idx = _.findIndex(fields, function (field) {
+                        return field.name == fieldName;
+                    });
 
-        $scope.selectSchema = function (idx) {
-            var data = $scope.data;
-            var tables = data.tables;
-            var schemaName = tables[idx].schemaName;
-            var use = tables[idx].use;
+                    // Found duplicate.
+                    if (idx >= 0 && idx != index) {
+                        $common.showError('Field with such name already exists in group!');
 
-            for (var i = idx + 1; i < tables.length; i++) {
-                var item = tables[i];
+                        return focusInvalidField(index, 'FieldName');
+                    }
+                }
 
-                if (item.schemaName == schemaName && item.tableName)
-                    item.use = use;
-                else
-                    break;
+                return true;
             }
 
-            data.curTableIdx = -1;
-            data.curFieldIdx = -1;
-        };
-
-        $scope.selectTable = function (idx) {
-            var data = $scope.data;
+            $scope.tableGroupItemSave = function (fieldName, className, direction, groupIndex, index) {
+                if (tableGroupItemValid(fieldName, className, groupIndex, index)) {
+                    $table.tableReset();
 
-            data.curTableIdx = idx;
-            data.curFieldIdx = -1;
+                    var group = $scope.backupItem.groups[groupIndex];
 
-            if (idx >= 0) {
-                var tbl = data.tables[idx];
-
-                data.curKeyClass = tbl.keyClass;
-                data.curValueClass = tbl.valueClass;
-            }
-        };
+                    if (index < 0) {
+                        var newGroupItem = {name: fieldName, className: className, direction: direction};
 
-        $scope.selectField = function (idx) {
-            var data = $scope.data;
+                        if (group.fields)
+                            group.fields.push(newGroupItem);
+                        else
+                            group.fields = [newGroupItem];
+                    }
+                    else {
+                        var groupItem = group.fields[index];
 
-            data.curFieldIdx = idx;
+                        groupItem.name = fieldName;
+                        groupItem.className = className;
+                        groupItem.direction = direction;
+                    }
+                }
+            };
 
-            if (idx >= 0) {
-                var fld = data.tables[data.curTableIdx].fields[idx];
+            $scope.tableRemoveGroupItem = function (group, index) {
+                $table.tableReset();
 
-                data.curJavaName = fld.javaName;
-                data.curJavaType = fld.javaType;
-            }
-        };
-    }]
+                group.fields.splice(index, 1);
+            };
+
+            //$scope.selectSchema = function (idx) {
+            //    var data = $scope.data;
+            //    var tables = data.tables;
+            //    var schemaName = tables[idx].schemaName;
+            //    var use = tables[idx].use;
+            //
+            //    for (var i = idx + 1; i < tables.length; i++) {
+            //        var item = tables[i];
+            //
+            //        if (item.schemaName == schemaName && item.tableName)
+            //            item.use = use;
+            //        else
+            //            break;
+            //    }
+            //
+            //    data.curTableIdx = -1;
+            //    data.curFieldIdx = -1;
+            //};
+
+            //$scope.selectTable = function (idx) {
+            //    var data = $scope.data;
+            //
+            //    data.curTableIdx = idx;
+            //    data.curFieldIdx = -1;
+            //
+            //    if (idx >= 0) {
+            //        var tbl = data.tables[idx];
+            //
+            //        data.curKeyClass = tbl.keyClass;
+            //        data.curValueClass = tbl.valueClass;
+            //    }
+            //};
+            //
+            //$scope.selectField = function (idx) {
+            //    var data = $scope.data;
+            //
+            //    data.curFieldIdx = idx;
+            //
+            //    if (idx >= 0) {
+            //        var fld = data.tables[data.curTableIdx].fields[idx];
+            //
+            //        data.curJavaName = fld.javaName;
+            //        data.curJavaType = fld.javaType;
+            //    }
+            //};
+        }]
 )
 ;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/126a7cbd/modules/control-center-web/src/main/js/controllers/models/metadata.json
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/models/metadata.json b/modules/control-center-web/src/main/js/controllers/models/metadata.json
index 1d5246f..d986b93 100644
--- a/modules/control-center-web/src/main/js/controllers/models/metadata.json
+++ b/modules/control-center-web/src/main/js/controllers/models/metadata.json
@@ -202,7 +202,7 @@
     },
     {
       "label": "Database type",
-      "type": "dropdown",
+      "type": "select",
       "model": "rdbms",
       "placeholder": "Choose database",
       "items": "databases",

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/126a7cbd/modules/control-center-web/src/main/js/public/stylesheets/style.scss
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/public/stylesheets/style.scss b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
index a1ec7c4..7a5dd5d 100644
--- a/modules/control-center-web/src/main/js/public/stylesheets/style.scss
+++ b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
@@ -781,30 +781,6 @@ button .caret, .btn .caret {
     font-weight: bold;
 }
 
-.theme-line table.metadata {
-    th {
-        text-align: center;
-        padding: 3px 5px 3px 5px;
-    }
-
-    td {
-        label {
-            cursor: pointer;
-        }
-
-        input[type=checkbox] {
-            margin: 0 3px 3px 0;
-            vertical-align: middle;
-            cursor: pointer;
-        }
-
-        padding: 3px 10px 3px 5px;
-    }
-
-    margin-top: 10px;
-    margin-bottom: 20px;
-}
-
 .theme-line table.admin {
     tr:hover {
         cursor: default;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/126a7cbd/modules/control-center-web/src/main/js/views/configuration/metadata.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/metadata.jade b/modules/control-center-web/src/main/js/views/configuration/metadata.jade
index ec5fbb7..f49602d 100644
--- a/modules/control-center-web/src/main/js/views/configuration/metadata.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/metadata.jade
@@ -41,11 +41,11 @@ block content
             button.btn.btn-default(ng-model='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
-        .panel-group(bs-collapse ng-model='panels.activePanel' data-allow-multiple='false')
+        .panel-group(bs-collapse ng-model='panels.activePanel' data-allow-multiple='true')
             .panel.panel-default(ng-show='selectedItem || backupItem')
                 .panel-heading
                     h3
-                        a(bs-collapse-toggle) Manual
+                        a(bs-collapse-toggle) Configure metadata
                 .panel-collapse(role='tabpanel' bs-collapse-target)
                     .panel-body
                         form.form-horizontal(name='manualForm' ng-if='backupItem' novalidate)
@@ -63,55 +63,12 @@ block content
                         form.form-horizontal(name='dbForm' novalidate)
                             .settings-row(ng-repeat='field in metadataDb')
                                 +form-row
-                        div(ng-hide='data.tables.length == 0')
-                            table.table-bordered.table-striped.metadata.col-sm-12(st-table='data.tables')
-                                thead
-                                    tr
-                                        th.col-sm-3 Schema/Table
-                                        th Key class
-                                        th Value class
+                        div(ng-hide='tables.length == 0')
+                            table.links(st-table='tables')
                                 tbody
-                                    tr(ng-repeat='row in data.tables')
-                                        td(colspan='{{row.tableName ? 1 : 3}}')
-                                            div(ng-if='!row.tableName')
-                                                label(ng-click='selectSchema($index)')
-                                                    input(type='checkbox' ng-checked='row.use')
-                                                    | {{row.schemaName}}
-                                            div(ng-if='row.tableName')
-                                                label(ng-class='{zzz: $index == 1}' style='padding-left: 10px' ng-click='selectTable($index)')
-                                                    input(type='checkbox' ng-checked = 'row.use')
-                                                    | {{row.tableName}}
-                                        td(ng-if='row.tableName')
-                                            a(ng-click='selectTable($index)') {{row.keyClass}}
-                                        td(ng-if='row.tableName')
-                                            a(ng-click='selectTable($index)') {{row.valueClass}}
-                        div
-                            table.table-bordered.table-striped.metadata.col-sm-12(st-table='fieldz')
-                                thead
-                                    tr
-                                        th(style='width:45px') Use
-                                        th(style='width:45px') Key
-                                        th(style='width:45px') Affinity Key
-                                        th DB Name
-                                        th DB Type
-                                        th Java Name
-                                        th Java Type
-                                tbody
-                                    tr(ng-repeat='row in fieldz')
-                                        td
-                                            input(type='checkbox')
-                                        td
-                                            input(type='checkbox')
-                                        td
-                                            input(type='checkbox')
-                                        td
-                                            label {{row.databaseName}}
-                                        td
-                                            label {{row.databaseType}}
-                                        td
-                                            label {{row.javaName}}
-                                        td
-                                            label {{row.javaType}}
+                                    tr(ng-repeat='row in tables')
+                                        td.col-sm-6
+                                            a {{$index + 1}}) {{::row.schemaName}} / {{::row.tableName}}
                         button.btn.btn-primary(ng-disabled='dbForm.$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
\ No newline at end of file
+                        button.btn.btn-primary.btn-second(ng-click='reloadMetadata()') Reload

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/126a7cbd/modules/control-center-web/src/main/js/views/includes/controls.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/includes/controls.jade b/modules/control-center-web/src/main/js/views/includes/controls.jade
index 0ea2dcd..0df34cf 100644
--- a/modules/control-center-web/src/main/js/views/includes/controls.jade
+++ b/modules/control-center-web/src/main/js/views/includes/controls.jade
@@ -251,6 +251,13 @@ mixin form-row-custom(lblClasses, fieldClasses)
                     +ico-exclamation('{{field.model}}', 'min', 'Value is less than allowable minimum.')
                     +ico-exclamation('{{field.model}}', 'max', 'Value is more than allowable maximum.')
                     +ico-exclamation('{{field.model}}', 'number', 'Invalid value. Only numbers allowed.')
+        div(ng-switch-when='select' ng-hide=fieldHide)
+            label(class=lblClasses ng-class=fieldRequiredClass) {{::field.label}}:
+            div(class=fieldClasses)
+                +tipField('field.tip')
+                .input-tip
+                    select.form-control(ng-options='item.value as item.label for item in {{field.items}}')&attributes(fieldCommon)
+                        option(value='') {{::field.placeholder}}
         div(ng-switch-when='dropdown' ng-hide=fieldHide)
             label(class=lblClasses ng-class=fieldRequiredClass) {{::field.label}}:
             div(class=fieldClasses)


Mime
View raw message