ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject ignite git commit: # GG-843 Rename new, copy button. Add confirm on reset token. Minor UI changes.
Date Thu, 17 Sep 2015 10:40:33 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 2e70d5a44 -> 822f7abc7


# GG-843 Rename new, copy button. Add confirm on reset token. Minor UI changes.


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

Branch: refs/heads/ignite-843
Commit: 822f7abc76113a494db4cd2124b3783185d11ec4
Parents: 2e70d5a
Author: Vasiliy Sisko <vsisko@gridgain.com>
Authored: Thu Sep 17 17:40:25 2015 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Thu Sep 17 17:40:25 2015 +0700

----------------------------------------------------------------------
 .../main/js/controllers/caches-controller.js    |  2 +-
 .../main/js/controllers/clusters-controller.js  |  2 +-
 .../src/main/js/controllers/common-module.js    |  3 +-
 .../main/js/controllers/metadata-controller.js  |  2 +-
 .../main/js/controllers/profile-controller.js   |  6 ++--
 .../src/main/js/routes/public.js                |  6 ++--
 .../src/main/js/views/configuration/caches.jade |  2 +-
 .../main/js/views/configuration/clusters.jade   |  2 +-
 .../main/js/views/configuration/metadata.jade   |  2 +-
 .../src/main/js/views/includes/controls.jade    |  7 +++--
 .../src/main/js/views/reset.jade                |  6 ++--
 .../src/main/js/views/settings/profile.jade     |  8 ++---
 .../src/main/js/views/templates/clone.jade      | 31 ++++++++++++++++++++
 .../src/main/js/views/templates/copy.jade       | 31 --------------------
 14 files changed, 57 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/822f7abc/modules/control-center-web/src/main/js/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/caches-controller.js b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index da6ce4a..ae1b4e2 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -496,7 +496,7 @@ controlCenterModule.controller('cachesController', [
             };
 
             // Save cache with new name.
-            $scope.copyItem = function () {
+            $scope.cloneItem = function () {
                 $table.tableReset();
 
                 if (validate($scope.backupItem))

http://git-wip-us.apache.org/repos/asf/ignite/blob/822f7abc/modules/control-center-web/src/main/js/controllers/clusters-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/clusters-controller.js b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
index c63a691..0ea516f 100644
--- a/modules/control-center-web/src/main/js/controllers/clusters-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
@@ -418,7 +418,7 @@ controlCenterModule.controller('clustersController', ['$scope', '$controller',
'
         };
 
         // Copy cluster with new name.
-        $scope.copyItem = function () {
+        $scope.cloneItem = function () {
             $table.tableReset();
 
             if (validate($scope.backupItem))

http://git-wip-us.apache.org/repos/asf/ignite/blob/822f7abc/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 7274682..e8b974d 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
@@ -992,7 +992,7 @@ controlCenterModule.service('$copy', function ($modal, $rootScope, $q)
{
         copyModal.hide();
     };
 
-    var copyModal = $modal({templateUrl: '/copy', scope: scope, placement: 'center', show:
false});
+    var copyModal = $modal({templateUrl: '/clone', scope: scope, placement: 'center', show:
false});
 
     var parentShow = copyModal.show;
 
@@ -1836,6 +1836,5 @@ controlCenterModule.controller('notebooks', ['$scope', '$modal', '$window',
'$ht
 
 // Navigation bar controller.
 controlCenterModule.controller('save-remove', ['$scope', function ($scope) {
-    $scope.saveDropdown = [{ 'text': 'Copy', 'click': 'copyItem()'}];
     $scope.removeDropdown = [{ 'text': 'Remove All', 'click': 'removeAllItems()'}];
 }]);

http://git-wip-us.apache.org/repos/asf/ignite/blob/822f7abc/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 e814aee..d50cdd2 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
@@ -779,7 +779,7 @@ controlCenterModule.controller('metadataController', [
             };
 
             // Save cache type metadata with new name.
-            $scope.copyItem = function () {
+            $scope.cloneItem = function () {
                 $table.tableReset();
 
                 if (validate($scope.backupItem))

http://git-wip-us.apache.org/repos/asf/ignite/blob/822f7abc/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 6dee868..5a48a7f 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
@@ -16,14 +16,16 @@
  */
 
 // Controller for Profile screen.
-controlCenterModule.controller('profileController', ['$scope', '$http', '$common', '$focus',
function ($scope, $http, $common, $focus) {
+controlCenterModule.controller('profileController', ['$scope', '$http', '$common', '$focus',
'$confirm', function ($scope, $http, $common, $focus, $confirm) {
     $scope.profileUser = angular.copy($scope.user);
 
     if ($scope.profileUser && !$scope.profileUser.token)
         $scope.profileUser.token = 'No security token. Regenerate please.';
 
     $scope.generateToken = function () {
-        $scope.profileUser.token = $commonUtils.randomString(20);
+        $confirm.show('Are you sure you want to change security token?').then(function ()
{
+            $scope.profileUser.token = $commonUtils.randomString(20);
+        })
     };
 
     $scope.profileChanged = function () {

http://git-wip-us.apache.org/repos/asf/ignite/blob/822f7abc/modules/control-center-web/src/main/js/routes/public.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/public.js b/modules/control-center-web/src/main/js/routes/public.js
index 63c3e15..1609263 100644
--- a/modules/control-center-web/src/main/js/routes/public.js
+++ b/modules/control-center-web/src/main/js/routes/public.js
@@ -44,8 +44,8 @@ router.get('/confirm/batch', function (req, res) {
 });
 
 // GET copy dialog.
-router.get('/copy', function (req, res) {
-    res.render('templates/copy', {});
+router.get('/clone', function (req, res) {
+    res.render('templates/clone', {});
 });
 
 /* GET login dialog. */
@@ -241,6 +241,8 @@ router.get('/password/reset/:token', function (req, res) {
             data.error = 'Invalid token for password reset!';
         else if (err)
             data.error = err;
+        else
+            data.email = user.email;
 
         res.render('reset', data);
     });

http://git-wip-us.apache.org/repos/asf/ignite/blob/822f7abc/modules/control-center-web/src/main/js/views/configuration/caches.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/caches.jade b/modules/control-center-web/src/main/js/views/configuration/caches.jade
index abad0c5..db1ff60 100644
--- a/modules/control-center-web/src/main/js/views/configuration/caches.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/caches.jade
@@ -32,7 +32,7 @@ block content
                 +main-table('Caches:', 'caches', 'cacheName', 'selectItem(row)', '{{$index
+ 1}}) {{row.name}}, {{row.cacheMode | displayValue:cacheModes:"Cache mode not set"}}, {{row.atomicityMode
| displayValue:atomicities:"Cache atomicity not set"}}')
                 .padding-top-dflt(bs-affix)
                     .panel-tip-container(data-placement='bottom' bs-tooltip data-title='Create
new caches')
-                        button.btn.btn-primary(id='new-item' ng-click='createItem()') New
+                        button.btn.btn-primary(id='new-item' ng-click='createItem()') Add
cache
                     +save-remove-buttons('cache')
                     br
                     hr

http://git-wip-us.apache.org/repos/asf/ignite/blob/822f7abc/modules/control-center-web/src/main/js/views/configuration/clusters.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/clusters.jade b/modules/control-center-web/src/main/js/views/configuration/clusters.jade
index 655593e..8c37396 100644
--- a/modules/control-center-web/src/main/js/views/configuration/clusters.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/clusters.jade
@@ -32,7 +32,7 @@ block content
                 +main-table('Clusters:', 'clusters', 'clusterName', 'selectItem(row)', '{{$index
+ 1}}) {{row.name}}, {{row.discovery.kind | displayValue:discoveries:"Discovery not set"}}')
                 .padding-top-dflt(bs-affix)
                     .panel-tip-container(data-placement='bottom' bs-tooltip data-title='Create
new cluster')
-                        button.btn.btn-primary(id='new-item' ng-click='createItem()') New
+                        button.btn.btn-primary(id='new-item' ng-click='createItem()') Add
cluster
                     +save-remove-buttons('cluster')
                     br
                     hr

http://git-wip-us.apache.org/repos/asf/ignite/blob/822f7abc/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 b3e01de..aa85476 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
@@ -32,7 +32,7 @@ block content
                 +main-table('Types metadata:', 'metadatas', 'metadataName', 'selectItem(row)',
'{{$index + 1}}) {{row.valueType}}')
                 .padding-top-dflt(bs-affix)
                     .panel-tip-container(data-placement='bottom' bs-tooltip data-title='Create
new metadata')
-                        button.btn.btn-primary(id='new-item' ng-click='createItem()') New
+                        button.btn.btn-primary(id='new-item' ng-click='createItem()') Add
metadata
                     .panel-tip-container(bs-tooltip data-title='Load new metadata from database'
data-placement='bottom')
                         button.btn.btn-primary(ng-click='showLoadMetadataModal()') Load from
database
                     +save-remove-buttons('metadata')

http://git-wip-us.apache.org/repos/asf/ignite/blob/822f7abc/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 fef320c..4a1a4e1 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
@@ -498,13 +498,14 @@ mixin preview(preview, id)
 
 mixin save-remove-buttons(objectName)
     -var removeTip = '"Remove current ' + objectName + '"'
+    -var cloneTip = '"Clone current ' + objectName + '"'
 
     .panel-tip-container(ng-hide='!backupItem || backupItem._id')
         a.btn.btn-primary(ng-disabled='!ui.isDirty()' ng-click='ui.isDirty() ? saveItem()
: ""' bs-tooltip='' data-title='{{saveBtnTipText(ui.isDirty(), "#{objectName}")}}' data-placement='bottom'
data-trigger='hover') Save
-    .btn-group.panel-tip-container(ng-show='backupItem._id')
+    .panel-tip-container(ng-show='backupItem._id')
         a.btn.btn-primary(id='save-item' ng-disabled='!ui.isDirty()' ng-click='ui.isDirty()
? saveItem() : ""' bs-tooltip='' data-title='{{saveBtnTipText(ui.isDirty(), "#{objectName}")}}'
data-placement='bottom' data-trigger='hover') Save
-        button.btn.dropdown-toggle.btn-primary(id='save-item-dropdown' ng-disabled='!backupItem._id'
data-toggle='dropdown' data-container='body' bs-dropdown='saveDropdown' data-placement='bottom-right')
-            span.caret
+    .panel-tip-container(ng-show='backupItem._id')
+        a.btn.btn-primary(id='clone-item' ng-click='cloneItem()' bs-tooltip=cloneTip data-placement='bottom'
data-trigger='hover') Clone
     .btn-group.panel-tip-container(ng-show='backupItem._id')
         button.btn.btn-primary(id='remove-item' ng-click='removeItem()' bs-tooltip=removeTip
data-placement='bottom' data-trigger='hover') Remove
         button.btn.dropdown-toggle.btn-primary(id='remove-item-dropdown' data-toggle='dropdown'
data-container='body' bs-dropdown='removeDropdown' data-placement='bottom-right')

http://git-wip-us.apache.org/repos/asf/ignite/blob/822f7abc/modules/control-center-web/src/main/js/views/reset.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/reset.jade b/modules/control-center-web/src/main/js/views/reset.jade
index 50a4890..08bd521 100644
--- a/modules/control-center-web/src/main/js/views/reset.jade
+++ b/modules/control-center-web/src/main/js/views/reset.jade
@@ -17,7 +17,7 @@
 extends templates/layout
 
 block container
-    .row(ng-init='token = #{JSON.stringify(token)}; error=#{JSON.stringify(error)}')
+    .row(ng-init='email = #{JSON.stringify(email)}; token = #{JSON.stringify(token)}; error=#{JSON.stringify(error)}')
         .text-center(ng-if='!token')
             p Further instructions for password reset have been sent to your e-mail address.
         .text-center(ng-if='error')
@@ -25,8 +25,8 @@ block container
         div(ng-controller='auth' ng-if='token && !error')
             form.form-horizontal(name='resetForm' ng-init='reset_info.token = token')
                 .settings-row
-                    label.col-sm-1 Token:
-                    label {{::token}}
+                    label.col-sm-1 E-mail:
+                    label {{::email}}
                 .settings-row
                     label.col-sm-1.required Password:
                     .col-sm-3

http://git-wip-us.apache.org/repos/asf/ignite/blob/822f7abc/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 811a107..3fd22dc 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
@@ -44,10 +44,10 @@ block container
                             label {{profileUser.token}}
                             i.tipLabel.fa.fa-refresh(ng-click='generateToken()' bs-tooltip
data-title='Generate random security token')
                         .details-row
-                            .checkbox
-                                label
-                                    input(type='checkbox' ng-model='profileUser.changePassword')
-                                    | Change password
+                            .advanced-options
+                                i.fa.fa-chevron-circle-up(ng-show='profileUser.changePassword'
ng-click='profileUser.changePassword = ! profileUser.changePassword')
+                                i.fa.fa-chevron-circle-down(ng-show='!profileUser.changePassword'
ng-click='profileUser.changePassword = ! profileUser.changePassword')
+                                a(ng-click='profileUser.changePassword = ! profileUser.changePassword')
{{profileUser.changePassword ? 'Cancel password changing...' : 'Change password...'}}
                         div(ng-if='profileUser.changePassword')
                             .details-row
                                 +lbl('New password:')

http://git-wip-us.apache.org/repos/asf/ignite/blob/822f7abc/modules/control-center-web/src/main/js/views/templates/clone.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/templates/clone.jade b/modules/control-center-web/src/main/js/views/templates/clone.jade
new file mode 100644
index 0000000..cf52a49
--- /dev/null
+++ b/modules/control-center-web/src/main/js/views/templates/clone.jade
@@ -0,0 +1,31 @@
+//-
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+.modal(tabindex='-1' role='dialog')
+    .modal-dialog
+        .modal-content
+            .modal-header
+                button.close(type='button' ng-click='$hide()') &times;
+                h4.modal-title Clone
+            form.form-horizontal(name='ui.inputForm' novalidate)
+                .modal-body.row
+                    .col-sm-9.login.col-sm-offset-1
+                        label.required.labelFormField New name:&nbsp;
+                        .col-sm-9
+                            input.form-control(id='copy-new-name' type='text' ng-model='newName'
required auto-focus)
+            .modal-footer
+                button.btn.btn-default(id='copy-btn-cancel' type='button' ng-click='$hide()')
Cancel
+                button.btn.btn-primary(id='copy-btn-confirm' type='button' ng-disabled='ui.inputForm.$invalid'
ng-click='ok(newName)') Confirm

http://git-wip-us.apache.org/repos/asf/ignite/blob/822f7abc/modules/control-center-web/src/main/js/views/templates/copy.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/templates/copy.jade b/modules/control-center-web/src/main/js/views/templates/copy.jade
deleted file mode 100644
index 47f476b..0000000
--- a/modules/control-center-web/src/main/js/views/templates/copy.jade
+++ /dev/null
@@ -1,31 +0,0 @@
-//-
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
-.modal(tabindex='-1' role='dialog')
-    .modal-dialog
-        .modal-content
-            .modal-header
-                button.close(type='button' ng-click='$hide()') &times;
-                h4.modal-title Copy
-            form.form-horizontal(name='ui.inputForm' novalidate)
-                .modal-body.row
-                    .col-sm-9.login.col-sm-offset-1
-                        label.required.labelFormField New name:&nbsp;
-                        .col-sm-9
-                            input.form-control(id='copy-new-name' type='text' ng-model='newName'
required auto-focus)
-            .modal-footer
-                button.btn.btn-default(id='copy-btn-cancel' type='button' ng-click='$hide()')
Cancel
-                button.btn.btn-primary(id='copy-btn-confirm' type='button' ng-disabled='ui.inputForm.$invalid'
ng-click='ok(newName)') Confirm


Mime
View raw message