Commit a79d66f4 authored by Christophe Maudoux's avatar Christophe Maudoux 🐛

Append history custom values in session explorer (#1501)

parent 53a0a797
......@@ -287,23 +287,23 @@ llapp.controller 'SessionsExplorerCtrl', ['$scope', '$translator', '$location',
if session._loginHistory
tmp = []
if session._loginHistory.successLogin
# History custom values
cv = ""
for l in session._loginHistory.successLogin
# History custom values
cv = ""
for key, value of l
if key.match /^(_utime|ipAddr|error)$/ then 1
else cv = cv + ", #{key} : #{value}"
if !key.match /^(_utime|ipAddr|error)$/
cv += ", #{key} : #{value}"
tmp.push
t: l._utime
title: $scope.localeDate l._utime
value: "Success (IP #{l.ipAddr})" + cv
if session._loginHistory.failedLogin
# History custom values
cv = ""
for l in session._loginHistory.failedLogin
# History custom values
cv = ""
for key, value of l
if key.match /^(_utime|ipAddr|error)$/ then 1
else cv = cv + ", #{key} : #{value}"
if !key.match /^(_utime|ipAddr|error)$/
cv += ", #{key} : #{value}"
tmp.push
t: l._utime
title: $scope.localeDate l._utime
......
......@@ -341,16 +341,14 @@
if (session._loginHistory) {
tmp = [];
if (session._loginHistory.successLogin) {
cv = "";
ref = session._loginHistory.successLogin;
for (m = 0, len3 = ref.length; m < len3; m++) {
l = ref[m];
cv = "";
for (key in l) {
value = l[key];
if (key.match(/^(_utime|ipAddr)$/)) {
1;
} else {
cv = cv + (", " + key + " : " + value);
if (!key.match(/^(_utime|ipAddr|error)$/)) {
cv += ", " + key + " : " + value;
}
}
tmp.push({
......@@ -361,16 +359,14 @@
}
}
if (session._loginHistory.failedLogin) {
cv = "";
ref1 = session._loginHistory.failedLogin;
for (o = 0, len4 = ref1.length; o < len4; o++) {
l = ref1[o];
cv = "";
for (key in l) {
value = l[key];
if (key.match(/^(_utime|ipAddr|error)$/)) {
1;
} else {
cv = cv + (", " + key + " : " + value);
if (!key.match(/^(_utime|ipAddr|error)$/)) {
cv += ", " + key + " : " + value;
}
}
tmp.push({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment