You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dp...@apache.org on 2018/05/24 12:51:47 UTC

[24/50] [abbrv] ignite git commit: IGNITE-7650 Web Console: Cleanup unused code.

IGNITE-7650 Web Console: Cleanup unused code.


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

Branch: refs/heads/ignite-5789-1
Commit: baf4ec25809059b66f8fa5fc0611c9bf63ba9950
Parents: fe38f3e
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Tue May 22 13:46:44 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Tue May 22 13:46:44 2018 +0700

----------------------------------------------------------------------
 modules/web-console/frontend/app/app.js         |  5 --
 .../controllers/reset-password.controller.js    | 50 --------------------
 2 files changed, 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/baf4ec25/modules/web-console/frontend/app/app.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/app.js b/modules/web-console/frontend/app/app.js
index d28f1bc..60b4ebc 100644
--- a/modules/web-console/frontend/app/app.js
+++ b/modules/web-console/frontend/app/app.js
@@ -105,9 +105,6 @@ import hasPojo from './filters/hasPojo.filter';
 import uiGridSubcategories from './filters/uiGridSubcategories.filter';
 import id8 from './filters/id8.filter';
 
-// Controllers
-import resetPassword from './controllers/reset-password.controller';
-
 // Components
 import igniteListOfRegisteredUsers from './components/list-of-registered-users';
 import IgniteActivitiesUserDialog from './components/activities-user-dialog';
@@ -297,8 +294,6 @@ angular.module('ignite-console', [
 .service(CSV.name, CSV)
 .service('IGFSs', IGFSs)
 .service('Models', Models)
-// Controllers.
-.controller(...resetPassword)
 // Filters.
 .filter('byName', byName)
 .filter('defaultName', defaultName)

http://git-wip-us.apache.org/repos/asf/ignite/blob/baf4ec25/modules/web-console/frontend/app/controllers/reset-password.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/controllers/reset-password.controller.js b/modules/web-console/frontend/app/controllers/reset-password.controller.js
deleted file mode 100644
index f84a876..0000000
--- a/modules/web-console/frontend/app/controllers/reset-password.controller.js
+++ /dev/null
@@ -1,50 +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.
- */
-
-// Controller for password reset.
-export default ['resetPassword', [
-    '$scope', '$modal', '$http', '$state', 'IgniteMessages', 'IgniteFocus',
-    ($scope, $modal, $http, $state, Messages, Focus) => {
-        if ($state.params.token) {
-            $http.post('/api/v1/password/validate/token', {token: $state.params.token})
-                .then(({data}) => {
-                    $scope.email = data.email;
-                    $scope.token = data.token;
-                    $scope.error = data.error;
-
-                    if ($scope.token && !$scope.error)
-                        Focus.move('user_password');
-                });
-        }
-
-        // Try to reset user password for provided token.
-        $scope.resetPassword = (reset_info) => {
-            $http.post('/api/v1/password/reset', reset_info)
-                .then(() => {
-                    $state.go('signin');
-
-                    Messages.showInfo('Password successfully changed');
-                })
-                .catch(({data, state}) => {
-                    if (state === 503)
-                        $state.go('signin');
-
-                    Messages.showError(data);
-                });
-        };
-    }
-]];