ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject ignite git commit: IGNITE-1597 Fixed selected item.
Date Mon, 02 Nov 2015 10:50:20 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc1 c624887d8 -> a92d3efdb


IGNITE-1597 Fixed selected item.


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

Branch: refs/heads/ignite-843-rc1
Commit: a92d3efdb53144a6849ec48a6894e9fcccf4cf8b
Parents: c624887
Author: Andrey <anovikov@gridgain.com>
Authored: Mon Nov 2 17:50:13 2015 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Mon Nov 2 17:50:13 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/metadata-controller.js  | 16 +++++++++++++++-
 .../src/main/js/views/configuration/metadata.jade   |  4 ++--
 2 files changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a92d3efd/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 b914adf..242c74c 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
@@ -985,7 +985,21 @@ consoleModule.controller('metadataController', [
                 return true;
             };
 
-            var pairFields = {
+            $scope.toggleValid = function () {
+                $scope.ui.showValid = !$scope.ui.showValid;
+
+                var validFilter = $filter('metadatasValidation');
+
+                var idx = _.findIndex(validFilter($scope.metadatas, $scope.ui.showValid,
true), function (metadata) {
+                    return metadata._id == $scope.selectedItem._id;
+                });
+
+                if (idx == -1)
+                    $scope.selectItem(undefined, undefined);
+            };
+
+
+        var pairFields = {
                 fields: {msg: 'Query field class', id: 'QryField', idPrefix: 'Key', searchCol:
'name', valueCol: 'key', classValidation: true, dupObjName: 'name'},
                 aliases: {id: 'Alias', idPrefix: 'Value', searchCol: 'alias', valueCol: 'value',
dupObjName: 'alias'}
             };

http://git-wip-us.apache.org/repos/asf/ignite/blob/a92d3efd/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 0b99282..f7f449e 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
@@ -39,8 +39,8 @@ block content
                                     .col-sm-8.pull-right(style='padding: 0')
                                         .col-sm-6
                                             .pull-right.labelLogin.additional-filter(ng-if='(metadatas
| metadatasValidation:false:true).length > 0')
-                                                a.labelFormField(ng-if='ui.showValid' ng-click='ui.showValid
= !ui.showValid') Key fields should be configured: {{(displayedRows | metadatasValidation:false:true).length}}&nbsp
-                                                a.labelFormField(ng-if='!ui.showValid' ng-click='ui.showValid
= !ui.showValid') Show all metadata: {{displayedRows.length}}&nbsp
+                                                a.labelFormField(ng-if='ui.showValid' ng-click='toggleValid()')
Key fields should be configured: {{(displayedRows | metadatasValidation:false:true).length}}&nbsp
+                                                a.labelFormField(ng-if='!ui.showValid' ng-click='toggleValid()')
Show all metadata: {{displayedRows.length}}&nbsp
                                         .col-sm-6
                                             input.form-control.pull-right(type='text' st-search=''
placeholder='Filter metadatas...')
                             tbody


Mime
View raw message