Repository: ignite Updated Branches: refs/heads/ignite-843-rc2 c737a14ce -> 856b36a57
IGNITE-1861 Fixed Metadata query and index validation. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/856b36a5 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/856b36a5 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/856b36a5 Branch: refs/heads/ignite-843-rc2 Commit: 856b36a574ab769acdae9fd035ad37e68780d7ae Parents: c737a14 Author: Alexey Kuznetsov <akuznet...@apache.org> Authored: Tue Dec 15 15:14:01 2015 +0700 Committer: Alexey Kuznetsov <akuznet...@apache.org> Committed: Tue Dec 15 15:14:01 2015 +0700 ---------------------------------------------------------------------- .../src/main/js/controllers/common-module.js | 2 +- .../src/main/js/controllers/metadata-controller.js | 10 +++++++--- .../src/main/js/views/includes/controls.jade | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/856b36a5/modules/control-center-web/src/main/js/controllers/common-module.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/controllers/common-module.js b/modules/control-center-web/src/main/js/controllers/common-module.js index 6f5ded7..1585646 100644 --- a/modules/control-center-web/src/main/js/controllers/common-module.js +++ b/modules/control-center-web/src/main/js/controllers/common-module.js @@ -1276,7 +1276,7 @@ consoleModule.service('$table', ['$common', '$focus', function ($common, $focus) } else if (ui === 'table-indexes') { field.newIndexName = null; - field.newIndexType = null; + field.newIndexType = 'SORTED'; field.newIndexFields = null; _tableFocus(field.focusId, -1); http://git-wip-us.apache.org/repos/asf/ignite/blob/856b36a5/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 dd09a1a..bd5e006 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 @@ -834,13 +834,17 @@ consoleModule.controller('metadataController', [ var qry = $common.metadataForQueryConfigured(item); if (qry) { + if ($common.isEmptyArray(item.fields)) + return showPopoverMessage($scope.panels, 'query', 'fields-legend', 'Query fields should not be empty'); + var indexes = item.indexes; if (indexes && indexes.length > 0) { - _.forEach(indexes, function(index, i) { + if (_.find(indexes, function(index, i) { if ($common.isEmptyArray(index.fields)) - return showPopoverMessage($scope.panels, 'query', 'indexes' + i, 'Group fields are not specified'); - }); + return !showPopoverMessage($scope.panels, 'query', 'indexes' + i, 'Index fields are not specified'); + })) + return false; } } http://git-wip-us.apache.org/repos/asf/ignite/blob/856b36a5/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 ff29533..afab8ce 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 @@ -78,7 +78,7 @@ mixin table-pair-edit(prefix, keyPlaceholder, valPlaceholder, keyJavaBuildInType mixin table-pair(header, tblMdl, keyFld, valFld, keyPlaceholder, valPlaceholder, keyJavaBuildInTypes, valueJavaBuildInTypes, divider) .col-sm-12.group .group-legend - label #{header} + label(id='{{::field.model}}-legend') #{header} +group-tip('field.tip') +group-btn-add('tableNewItem(field)', 'field.addTip') .group-content-empty(ng-if='!((#{tblMdl} && #{tblMdl}.length > 0) || tableNewItemActive(field))') Not defined