From 7698e40aa5d8f136c415668c75ff291dfed375c0 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Sat, 23 Nov 2013 10:20:31 +0000 Subject: [PATCH] KEYCLOAK-177 --- .../META-INF/resources/admin/index.html | 3 +-- .../META-INF/resources/admin/js/app.js | 2 +- .../resources/admin/js/controllers.js | 22 ------------------- .../admin/js/controllers/applications.js | 10 +++++++++ 4 files changed, 12 insertions(+), 25 deletions(-) delete mode 100755 admin-ui/src/main/resources/META-INF/resources/admin/js/controllers.js diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/index.html b/admin-ui/src/main/resources/META-INF/resources/admin/index.html index 4be31ec9c8..f0c8996c92 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/index.html +++ b/admin-ui/src/main/resources/META-INF/resources/admin/index.html @@ -41,7 +41,6 @@ --> - @@ -51,7 +50,7 @@ - +
You will be logged off in seconds due to inactivity. Click here to continue using this web page. diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/js/app.js b/admin-ui/src/main/resources/META-INF/resources/admin/js/app.js index 85ec5651f8..f021923fc8 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/js/app.js +++ b/admin-ui/src/main/resources/META-INF/resources/admin/js/app.js @@ -1,6 +1,6 @@ 'use strict'; -var module = angular.module('keycloak', [ 'keycloak.services', 'keycloak.loaders', 'keycloak.controllers', 'ui.bootstrap', 'ui.select2' ]); +var module = angular.module('keycloak', [ 'keycloak.services', 'keycloak.loaders', 'ui.bootstrap', 'ui.select2' ]); var resourceRequests = 0; var loadingTimer = -1; diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers.js b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers.js deleted file mode 100755 index 8516462fc4..0000000000 --- a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -var module = angular.module('keycloak.controllers', [ 'keycloak.services' ]); - -Array.prototype.remove = function(from, to) { - var rest = this.slice((to || from) + 1 || this.length); - this.length = from < 0 ? this.length + from : from; - return this.push.apply(this, rest); -}; - - - - -function randomString(len) { - var charSet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; - var randomString = ''; - for (var i = 0; i < len; i++) { - var randomPoz = Math.floor(Math.random() * charSet.length); - randomString += charSet.substring(randomPoz,randomPoz+1); - } - return randomString; -} \ No newline at end of file diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/applications.js b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/applications.js index c14231d130..b4d9ee6978 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/applications.js +++ b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/applications.js @@ -26,6 +26,16 @@ module.controller('ApplicationCredentialsCtrl', function($scope, $location, real } } + function randomString(len) { + var charSet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + var randomString = ''; + for (var i = 0; i < len; i++) { + var randomPoz = Math.floor(Math.random() * charSet.length); + randomString += charSet.substring(randomPoz,randomPoz+1); + } + return randomString; + } + $scope.generateTotp = function() { $scope.totp = randomString(5) + '-' + randomString(5) + '-' + randomString(5); }