You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2015/09/22 05:39:32 UTC

ignite git commit: IGNITE-843 Hide security token.

Repository: ignite
Updated Branches:
  refs/heads/ignite-843 1a94c6105 -> a3a60fd6e


IGNITE-843 Hide security token.


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

Branch: refs/heads/ignite-843
Commit: a3a60fd6efb726fa6f75cc78adc65eb736ad7d53
Parents: 1a94c61
Author: vsisko <vs...@gridgain.com>
Authored: Tue Sep 22 10:35:42 2015 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Tue Sep 22 10:35:42 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/common-module.js              |  3 +++
 .../src/main/js/controllers/profile-controller.js         |  3 ++-
 .../src/main/js/views/settings/profile.jade               |  3 ++-
 .../src/main/js/views/templates/agent-download.jade       | 10 ++++++++--
 4 files changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a3a60fd6/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 e16b55f..7d66b56 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
@@ -849,6 +849,9 @@ controlCenterModule.service('$common', [
                             markPristine(this.inputForm);
                     }
                 };
+            },
+            copyToClipboard: function(text) {
+                window.prompt("Copy to clipboard: Ctrl+C, Enter", text);
             }
         }
     }]);

http://git-wip-us.apache.org/repos/asf/ignite/blob/a3a60fd6/modules/control-center-web/src/main/js/controllers/profile-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/profile-controller.js b/modules/control-center-web/src/main/js/controllers/profile-controller.js
index 5a48a7f..1b4374e 100644
--- a/modules/control-center-web/src/main/js/controllers/profile-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/profile-controller.js
@@ -18,12 +18,13 @@
 // Controller for Profile screen.
 controlCenterModule.controller('profileController', ['$scope', '$http', '$common', '$focus', '$confirm', function ($scope, $http, $common, $focus, $confirm) {
     $scope.profileUser = angular.copy($scope.user);
+    $scope.copyToClipboard = $common.copyToClipboard;
 
     if ($scope.profileUser && !$scope.profileUser.token)
         $scope.profileUser.token = 'No security token. Regenerate please.';
 
     $scope.generateToken = function () {
-        $confirm.show('Are you sure you want to change security token?').then(function () {
+        $confirm.confirm('Are you sure you want to change security token?').then(function () {
             $scope.profileUser.token = $commonUtils.randomString(20);
         })
     };

http://git-wip-us.apache.org/repos/asf/ignite/blob/a3a60fd6/modules/control-center-web/src/main/js/views/settings/profile.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/settings/profile.jade b/modules/control-center-web/src/main/js/views/settings/profile.jade
index 254c23d..deaef77 100644
--- a/modules/control-center-web/src/main/js/views/settings/profile.jade
+++ b/modules/control-center-web/src/main/js/views/settings/profile.jade
@@ -46,8 +46,9 @@ block container
                                 a(ng-click='profileUser.showToken = ! profileUser.showToken') {{profileUser.showToken ? 'Hide security token...' : 'Show security token...'}}
                         .details-row(ng-show='profileUser.showToken')
                             +lbl('Security token:')
-                            a(ng-click-copy='{{profileUser.token}}') {{profileUser.token}}
+                            label {{profileUser.token}}
                             i.tipLabel.fa.fa-refresh(ng-click='generateToken()' bs-tooltip data-title='Generate random security token')
+                            i.tipLabel.fa.fa-clipboard(ng-click-copy='{{profileUser.token}}' bs-tooltip data-title='Copy security token to clipboard')
                             i.tipLabel.fa.fa-question-circle(ng-if=lines bs-tooltip='' data-title='The security token is used for authorization of web agent' type='button')
                         .details-row
                             .advanced-options

http://git-wip-us.apache.org/repos/asf/ignite/blob/a3a60fd6/modules/control-center-web/src/main/js/views/templates/agent-download.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/templates/agent-download.jade b/modules/control-center-web/src/main/js/views/templates/agent-download.jade
index e6a3bb7..ddd3890 100644
--- a/modules/control-center-web/src/main/js/views/templates/agent-download.jade
+++ b/modules/control-center-web/src/main/js/views/templates/agent-download.jade
@@ -36,7 +36,13 @@
                     li Refer to&nbsp;
                         b README.txt
                         | &nbsp;for more information.
+                .advanced-options
+                    i.fa.fa-chevron-circle-up(ng-show='agentLoad.showToken' ng-click='agentLoad.showToken = ! agentLoad.showToken')
+                    i.fa.fa-chevron-circle-down(ng-show='!agentLoad.showToken' ng-click='agentLoad.showToken = ! agentLoad.showToken')
+                    a(ng-click='agentLoad.showToken = ! agentLoad.showToken') {{agentLoad.showToken ? 'Hide security token...' : 'Show security token...'}}
+                .details-row(ng-show='agentLoad.showToken')
+                    label.labelField Security token: {{user.token}}
+                    i.tipLabel.fa.fa-clipboard(ng-click-copy='{{user.token}}' bs-tooltip='' data-title='Copy security token to clipboard')
+                    i.tipLabel.fa.fa-question-circle(ng-if=lines bs-tooltip='' data-title='The security token is used for authorization of web agent' type='button')
             .modal-footer
-                label.labelField Security token:
-                a.labelField(ng-click-copy='{{user.token}}' bs-tooltip='' data-title='The security token is used for authorization of web agent.<br/>Click to copy security token to clipboard' data-placement='bottom') {{user.token}}
                 button.btn.btn-primary(ng-click='downloadAgent()') Download zip