forked from Archives/Athou_commafeed
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
78b1ec6e6a | ||
|
|
6d4cbb889d | ||
|
|
27d16265d6 | ||
|
|
9888e23cd9 |
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.commafeed</groupId>
|
<groupId>com.commafeed</groupId>
|
||||||
<artifactId>commafeed</artifactId>
|
<artifactId>commafeed</artifactId>
|
||||||
<version>2.0.0</version>
|
<version>2.0.1</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<name>CommaFeed</name>
|
<name>CommaFeed</name>
|
||||||
|
|
||||||
|
|||||||
@@ -1460,55 +1460,61 @@ module.controller('MetricsCtrl', ['$scope', 'AdminMetricsService', function($sco
|
|||||||
$scope.metrics = AdminMetricsService.get();
|
$scope.metrics = AdminMetricsService.get();
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
module.controller('LoginCtrl', ['$scope', '$location', 'SessionService', 'ServerService', function($scope, $location, SessionService, ServerService) {
|
module.controller('LoginCtrl', ['$scope', '$location', '$timeout', 'SessionService', 'ServerService',
|
||||||
$scope.model = {};
|
function($scope, $location, $timeout, SessionService, ServerService) {
|
||||||
$scope.recovery_model = {};
|
$scope.model = {};
|
||||||
$scope.recovery = false;
|
$scope.recovery_model = {};
|
||||||
$scope.recovery_enabled = false;
|
$scope.recovery = false;
|
||||||
|
$scope.recovery_enabled = false;
|
||||||
|
|
||||||
ServerService.get(function(data) {
|
ServerService.get(function(data) {
|
||||||
$scope.recovery_enabled = data.smtpEnabled;
|
$scope.recovery_enabled = data.smtpEnabled;
|
||||||
});
|
});
|
||||||
|
|
||||||
var login = function(model) {
|
// autofilled fields do not trigger model update, do it manually
|
||||||
var success = function(data) {
|
$timeout(function() {
|
||||||
window.location.href = window.location.href.substring(0, window.location.href.lastIndexOf('#'));
|
$('input[ng-model]').trigger('input');
|
||||||
};
|
}, 100);
|
||||||
var error = function(data) {
|
|
||||||
$scope.message = data.data;
|
|
||||||
};
|
|
||||||
SessionService.login({
|
|
||||||
name : model.name,
|
|
||||||
password : model.password
|
|
||||||
}, success, error);
|
|
||||||
}
|
|
||||||
$scope.demoLogin = function() {
|
|
||||||
login({
|
|
||||||
name : 'demo',
|
|
||||||
password : 'demo'
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.login = function() {
|
var login = function(model) {
|
||||||
login($scope.model);
|
var success = function(data) {
|
||||||
};
|
window.location.href = window.location.href.substring(0, window.location.href.lastIndexOf('#'));
|
||||||
|
};
|
||||||
|
var error = function(data) {
|
||||||
|
$scope.message = data.data;
|
||||||
|
};
|
||||||
|
SessionService.login({
|
||||||
|
name : model.name,
|
||||||
|
password : model.password
|
||||||
|
}, success, error);
|
||||||
|
}
|
||||||
|
$scope.demoLogin = function() {
|
||||||
|
login({
|
||||||
|
name : 'demo',
|
||||||
|
password : 'demo'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
$scope.toggleRecovery = function() {
|
$scope.login = function() {
|
||||||
$scope.recovery = !$scope.recovery;
|
login($scope.model);
|
||||||
};
|
};
|
||||||
|
|
||||||
var recovery_success = function(data) {
|
$scope.toggleRecovery = function() {
|
||||||
$scope.recovery_message = "Email has ben sent. Check your inbox.";
|
$scope.recovery = !$scope.recovery;
|
||||||
};
|
};
|
||||||
var recovery_error = function(data) {
|
|
||||||
$scope.recovery_message = data.data;
|
var recovery_success = function(data) {
|
||||||
};
|
$scope.recovery_message = "Email has ben sent. Check your inbox.";
|
||||||
$scope.recover = function() {
|
};
|
||||||
SessionService.passwordReset({
|
var recovery_error = function(data) {
|
||||||
email : $scope.recovery_model.email
|
$scope.recovery_message = data.data;
|
||||||
}, recovery_success, recovery_error);
|
};
|
||||||
}
|
$scope.recover = function() {
|
||||||
}]);
|
SessionService.passwordReset({
|
||||||
|
email : $scope.recovery_model.email
|
||||||
|
}, recovery_success, recovery_error);
|
||||||
|
}
|
||||||
|
}]);
|
||||||
|
|
||||||
module.controller('RegisterCtrl', ['$scope', '$location', 'SessionService', 'ServerService',
|
module.controller('RegisterCtrl', ['$scope', '$location', 'SessionService', 'ServerService',
|
||||||
function($scope, $location, SessionService, ServerService) {
|
function($scope, $location, SessionService, ServerService) {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class RedisCacheService extends CacheService {
|
|||||||
|
|
||||||
public RedisCacheService() {
|
public RedisCacheService() {
|
||||||
JedisPoolConfig config = new JedisPoolConfig();
|
JedisPoolConfig config = new JedisPoolConfig();
|
||||||
config.setBlockWhenExhausted(false);
|
config.setMaxTotal(500);
|
||||||
pool = new JedisPool(config, "localhost");
|
pool = new JedisPool(config, "localhost");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user