Eliminate hardcoded SFA types from manager JS
This commit is contained in:
parent
3ff3fa9376
commit
0119e3a229
|
@ -70,10 +70,7 @@ llapp.controller 'SessionsExplorerCtrl', ['$scope', '$translator', '$location',
|
|||
$scope.currentSession = null
|
||||
$scope.menu = menu
|
||||
$scope.searchString = ''
|
||||
$scope.U2FCheck = "1"
|
||||
$scope.TOTPCheck = "1"
|
||||
$scope.UBKCheck = "1"
|
||||
$scope.WebAuthnCheck = "1"
|
||||
$scope.sfatypes = {}
|
||||
|
||||
# Import translations functions
|
||||
$scope.translateP = $translator.translateP
|
||||
|
@ -202,24 +199,26 @@ llapp.controller 'SessionsExplorerCtrl', ['$scope', '$translator', '$location',
|
|||
subres = []
|
||||
for attr in attrs
|
||||
if session[attr]
|
||||
if session[attr].toString().match(/"type":\s*"(?:TOTP|U2F|UBK|WebAuthn)"/)
|
||||
subres.push
|
||||
title: "type"
|
||||
value: "name"
|
||||
epoch: "date"
|
||||
if attr == "_2fDevices" && session[attr]
|
||||
array = JSON.parse(session[attr])
|
||||
for sfDevice in array
|
||||
for key, value of sfDevice
|
||||
if key == 'type'
|
||||
title = value
|
||||
if key == 'name'
|
||||
name = value
|
||||
if key == 'epoch'
|
||||
epoch = value
|
||||
if array.length > 0
|
||||
subres.push
|
||||
title: title
|
||||
value: name
|
||||
epoch: epoch
|
||||
title: "type"
|
||||
value: "name"
|
||||
epoch: "date"
|
||||
for sfDevice in array
|
||||
for key, value of sfDevice
|
||||
if key == 'type'
|
||||
title = value
|
||||
if key == 'name'
|
||||
name = value
|
||||
if key == 'epoch'
|
||||
epoch = value
|
||||
subres.push
|
||||
title: title
|
||||
value: name
|
||||
epoch: epoch
|
||||
sfrow: true
|
||||
delete session[attr]
|
||||
else if session[attr].toString().match(/\w+/)
|
||||
subres.push
|
||||
|
@ -296,7 +295,7 @@ llapp.controller 'SessionsExplorerCtrl', ['$scope', '$translator', '$location',
|
|||
over = 0
|
||||
|
||||
# Launch HTTP query
|
||||
$http.get("#{scriptname}sfa/#{sessionType}?#{query}&U2FCheck=#{$scope.U2FCheck}&TOTPCheck=#{$scope.TOTPCheck}&UBKCheck=#{$scope.UBKCheck}&WebAuthnCheck=#{$scope.WebAuthnCheck}").then (response) ->
|
||||
$http.get("#{scriptname}sfa/#{sessionType}?#{query}"+Object.entries($scope.sfatypes).map((x) -> if x[1] then "&type=" + x[0] else "").join("")).then (response) ->
|
||||
data = response.data
|
||||
if data.result
|
||||
for n in data.values
|
||||
|
@ -347,7 +346,7 @@ llapp.controller 'SessionsExplorerCtrl', ['$scope', '$translator', '$location',
|
|||
over = 0
|
||||
|
||||
# Launch HTTP
|
||||
$http.get("#{scriptname}sfa/#{sessionType}?_session_uid=#{$scope.searchString}*&groupBy=substr(_session_uid,#{$scope.searchString.length})&U2FCheck=#{$scope.U2FCheck}&TOTPCheck=#{$scope.TOTPCheck}&UBKCheck=#{$scope.UBKCheck}&WebAuthnCheck=#{$scope.WebAuthnCheck}").then (response) ->
|
||||
$http.get("#{scriptname}sfa/#{sessionType}?_session_uid=#{$scope.searchString}*&groupBy=substr(_session_uid,#{$scope.searchString.length})"+Object.entries($scope.sfatypes).map((x) -> if x[1] then "&type=" + x[0] else "").join("")).then (response) ->
|
||||
data = response.data
|
||||
if data.result
|
||||
for n in data.values
|
||||
|
|
|
@ -254,26 +254,27 @@ llapp.controller 'SessionsExplorerCtrl', ['$scope', '$translator', '$location',
|
|||
subres = []
|
||||
for attr in attrs
|
||||
if session[attr]
|
||||
if session[attr].toString().match(/"type":\s*"(?:TOTP|U2F|UBK|WebAuthn)"/)
|
||||
subres.push
|
||||
title: "type"
|
||||
value: "name"
|
||||
epoch: "date"
|
||||
td: "0"
|
||||
if attr == "_2fDevices" && session[attr]
|
||||
array = JSON.parse(session[attr])
|
||||
for sfDevice in array
|
||||
for key, value of sfDevice
|
||||
if key == 'type'
|
||||
title = value
|
||||
if key == 'name'
|
||||
name = value
|
||||
if key == 'epoch'
|
||||
epoch = value
|
||||
if array.length > 0
|
||||
subres.push
|
||||
title: title
|
||||
value: name
|
||||
epoch: epoch
|
||||
td: "1"
|
||||
title: "type"
|
||||
value: "name"
|
||||
epoch: "date"
|
||||
td: "0"
|
||||
for sfDevice in array
|
||||
for key, value of sfDevice
|
||||
if key == 'type'
|
||||
title = value
|
||||
if key == 'name'
|
||||
name = value
|
||||
if key == 'epoch'
|
||||
epoch = value
|
||||
subres.push
|
||||
title: title
|
||||
value: name
|
||||
epoch: epoch
|
||||
td: "1"
|
||||
delete session[attr]
|
||||
else if session[attr].toString().match(/"rp":\s*"[\w-]+"/)
|
||||
subres.push
|
||||
|
|
|
@ -86,10 +86,7 @@
|
|||
$scope.currentSession = null;
|
||||
$scope.menu = menu;
|
||||
$scope.searchString = '';
|
||||
$scope.U2FCheck = "1";
|
||||
$scope.TOTPCheck = "1";
|
||||
$scope.UBKCheck = "1";
|
||||
$scope.WebAuthnCheck = "1";
|
||||
$scope.sfatypes = {};
|
||||
$scope.translateP = $translator.translateP;
|
||||
$scope.translate = $translator.translate;
|
||||
$scope.translateTitle = function(node) {
|
||||
|
@ -206,32 +203,35 @@
|
|||
for (i = 0, len = attrs.length; i < len; i++) {
|
||||
attr = attrs[i];
|
||||
if (session[attr]) {
|
||||
if (session[attr].toString().match(/"type":\s*"(?:TOTP|U2F|UBK|WebAuthn)"/)) {
|
||||
subres.push({
|
||||
title: "type",
|
||||
value: "name",
|
||||
epoch: "date"
|
||||
});
|
||||
if (attr === "_2fDevices" && session[attr]) {
|
||||
array = JSON.parse(session[attr]);
|
||||
for (k = 0, len1 = array.length; k < len1; k++) {
|
||||
sfDevice = array[k];
|
||||
for (key in sfDevice) {
|
||||
value = sfDevice[key];
|
||||
if (key === 'type') {
|
||||
title = value;
|
||||
}
|
||||
if (key === 'name') {
|
||||
name = value;
|
||||
}
|
||||
if (key === 'epoch') {
|
||||
epoch = value;
|
||||
}
|
||||
}
|
||||
if (array.length > 0) {
|
||||
subres.push({
|
||||
title: title,
|
||||
value: name,
|
||||
epoch: epoch
|
||||
title: "type",
|
||||
value: "name",
|
||||
epoch: "date"
|
||||
});
|
||||
for (k = 0, len1 = array.length; k < len1; k++) {
|
||||
sfDevice = array[k];
|
||||
for (key in sfDevice) {
|
||||
value = sfDevice[key];
|
||||
if (key === 'type') {
|
||||
title = value;
|
||||
}
|
||||
if (key === 'name') {
|
||||
name = value;
|
||||
}
|
||||
if (key === 'epoch') {
|
||||
epoch = value;
|
||||
}
|
||||
}
|
||||
subres.push({
|
||||
title: title,
|
||||
value: name,
|
||||
epoch: epoch,
|
||||
sfrow: true
|
||||
});
|
||||
}
|
||||
}
|
||||
delete session[attr];
|
||||
} else if (session[attr].toString().match(/\w+/)) {
|
||||
|
@ -304,7 +304,13 @@
|
|||
} else {
|
||||
over = 0;
|
||||
}
|
||||
return $http.get(scriptname + "sfa/" + sessionType + "?" + query + "&U2FCheck=" + $scope.U2FCheck + "&TOTPCheck=" + $scope.TOTPCheck + "&UBKCheck=" + $scope.UBKCheck + "&WebAuthnCheck=" + $scope.WebAuthnCheck).then(function(response) {
|
||||
return $http.get((scriptname + "sfa/" + sessionType + "?" + query) + Object.entries($scope.sfatypes).map(function(x) {
|
||||
if (x[1]) {
|
||||
return "&type=" + x[0];
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}).join("")).then(function(response) {
|
||||
var data, i, len, n, ref;
|
||||
data = response.data;
|
||||
if (data.result) {
|
||||
|
@ -346,7 +352,13 @@
|
|||
} else {
|
||||
over = 0;
|
||||
}
|
||||
return $http.get(scriptname + "sfa/" + sessionType + "?_session_uid=" + $scope.searchString + "*&groupBy=substr(_session_uid," + $scope.searchString.length + ")&U2FCheck=" + $scope.U2FCheck + "&TOTPCheck=" + $scope.TOTPCheck + "&UBKCheck=" + $scope.UBKCheck + "&WebAuthnCheck=" + $scope.WebAuthnCheck).then(function(response) {
|
||||
return $http.get((scriptname + "sfa/" + sessionType + "?_session_uid=" + $scope.searchString + "*&groupBy=substr(_session_uid," + $scope.searchString.length + ")") + Object.entries($scope.sfatypes).map(function(x) {
|
||||
if (x[1]) {
|
||||
return "&type=" + x[0];
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}).join("")).then(function(response) {
|
||||
var data, i, len, n, ref;
|
||||
data = response.data;
|
||||
if (data.result) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
!function(){var a={_whatToTrace:[function(e,t){return"groupBy=substr("+e+",1)"},function(e,t){return e+"="+t+"*"}]},d={_whatToTrace:function(e,t,n,r){return console.log("overSchema => level",n,"over",r),1===n&&t.length>r?e+"="+t+"*&groupBy=substr("+e+","+(n+r+1)+")":null}},v={dateTitle:["_utime","_startTime","_updateTime"],sfaTitle:["_2fDevices"]},i={home:[]};angular.module("llngSessionsExplorer",["ui.tree","ui.bootstrap","llApp"]).controller("SessionsExplorerCtrl",["$scope","$translator","$location","$q","$http",function(y,t,e,n,h){var p,r,f;return y.links=links,y.menulinks=menulinks,y.staticPrefix=staticPrefix,y.scriptname=scriptname,y.formPrefix=formPrefix,y.availableLanguages=availableLanguages,y.waiting=!0,y.showM=!1,y.showT=!0,y.data=[],y.currentScope=null,y.currentSession=null,y.menu=i,y.searchString="",y.U2FCheck="1",y.TOTPCheck="1",y.UBKCheck="1",y.WebAuthnCheck="1",y.translateP=t.translateP,y.translate=t.translate,y.translateTitle=function(e){return t.translateField(e,"title")},f="persistent",y.menuClick=function(e){if(e.popup)window.open(e.popup);else switch(e.action||(e.action=e.title),typeof e.action){case"function":e.action(y.currentNode,y),y[e.action]();break;case"string":y[e.action]();break;default:console.log(typeof e.action)}return y.showM=!1},y.search2FA=function(e){return e&&(y.searchString=""),y.currentSession=null,y.data=[],y.updateTree2("",y.data,0,0)},y.delete2FA=function(e,t){for(var n=document.querySelectorAll(".data-"+t),r=0,a=n.length;r<a;r++)n[r].remove();return y.waiting=!0,h.delete(scriptname+"sfa/"+f+"/"+y.currentSession.id+"?type="+e+"&epoch="+t).then(function(e){return y.waiting=!1},function(e){return y.waiting=!1}),y.showT=!1},y.stoggle=function(e){var t=e.$modelValue;return 0===t.nodes.length&&y.updateTree(t.value,t.nodes,t.level,t.over,t.query,t.count),e.toggle()},y.displaySession=function(e){var t,n=function(e){var t,n,r,a,i,o,u,c,l,s,h,p,f,d,g,m,T,w=e._utime;for(c in e)(T=e[c])?("string"==typeof e&&T.match(/; /)&&(e[c]=T.split("; ")),"object"!=typeof e[c]&&("_password".match(new RegExp("\b"+c+"\b"))?e[c]="********":c.match(/^(_utime|_lastAuthnUTime|_lastSeen|notification)$/)?e[c]=y.localeDate(T):c.match(/^(_startTime|_updateTime)$/)&&(p=/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/,p=T.match(p),e[c]=p[3]+"/"+p[2]+"/"+p[1]+" à "+p[4]+":"+p[5]+":"+p[6]))):delete e[c];for(a in f=[],v){for(g=[],o=0,l=(r=v[a]).length;o<l;o++)if(n=r[o],e[n])if(e[n].toString().match(/"type":\s*"(?:TOTP|U2F|UBK|WebAuthn)"/)){for(g.push({title:"type",value:"name",epoch:"date"}),u=0,s=(t=JSON.parse(e[n])).length;u<s;u++){for(c in d=t[u])T=d[c],"type"===c&&(m=T),"name"===c&&(h=T),"epoch"===c&&(i=T);g.push({title:m,value:h,epoch:i})}delete e[n]}else e[n].toString().match(/\w+/)&&g.push({title:n,value:e[n]}),delete e[n];else delete e[n];0<g.length&&f.push({title:"__"+a+"__",nodes:g})}return{_utime:w,nodes:f}};return y.currentScope=e,t=e.$modelValue.session,h.get(scriptname+"sfa/"+f+"/"+t).then(function(e){return y.currentSession=n(e.data),y.currentSession.id=t}),y.showT=!1},y.localeDate=function(e){return new Date(1e3*e).toLocaleString()},y.getLanguage=function(e){return y.lang=e,y.form="white",y.init(),y.showM=!1},r=function(e,t,n){t=t.match(/#!?\/(\w+)/);return null!==t&&!t[1].match(/^(persistent)$/)||(y.type="_session_uid"),y.init()},y.$on("$locationChangeSuccess",r),p=0,y.updateTree=function(i,o,u,c,e,t){var l,s,n;return y.waiting=!0,s=a[y.type]||a._whatToTrace,l=s[u](y.type,i,e),25<t&&d[y.type]&&(n=d[y.type](y.type,i,u,c,e))?(c++,l=n,u-=1):c=0,h.get(scriptname+"sfa/"+f+"?"+l+"&U2FCheck="+y.U2FCheck+"&TOTPCheck="+y.TOTPCheck+"&UBKCheck="+y.UBKCheck+"&WebAuthnCheck="+y.WebAuthnCheck).then(function(e){var t,n,r,a,e=e.data;if(e.result){for(t=0,n=(a=e.values).length;t<n;t++)r=a[t],p++,r.id="node"+p,u<s.length-1&&(r.nodes=[],r.level=u+1,r.query=l,r.over=c),o.push(r);""===i&&(y.total=e.total)}return y.waiting=!1},function(e){return y.waiting=!1})},y.updateTree2=function(i,o,u,c,e,t){var l,s,n;return y.waiting=!0,s=a[y.type]||("_updateTime"===y.type?a._startTime:a._whatToTrace),l=s[u](y.type,i,e),25<t&&d[y.type]&&(n=d[y.type](y.type,i,u,c,e))?(c++,l=n,u-=1):c=0,h.get(scriptname+"sfa/"+f+"?_session_uid="+y.searchString+"*&groupBy=substr(_session_uid,"+y.searchString.length+")&U2FCheck="+y.U2FCheck+"&TOTPCheck="+y.TOTPCheck+"&UBKCheck="+y.UBKCheck+"&WebAuthnCheck="+y.WebAuthnCheck).then(function(e){var t,n,r,a,e=e.data;if(e.result){for(t=0,n=(a=e.values).length;t<n;t++)r=a[t],p++,r.id="node"+p,u<s.length-1&&(r.nodes=[],r.level=u+1,r.query=l,r.over=c),o.push(r);""===i&&(y.total=e.total)}return y.waiting=!1},function(e){return y.waiting=!1})},y.init=function(){return y.waiting=!0,y.data=[],n.all([t.init(y.lang),y.updateTree("",y.data,0,0)]).then(function(){return y.waiting=!1},function(e){return y.waiting=!1}),y.activeModule="2ndFA",y.myStyle={color:"#ffb84d"}},e=e.path().match(/^\/(\w+)/),y.type=e?e[1]:"_whatToTrace"}])}.call(this);
|
||||
!function(){var a={_whatToTrace:[function(e,t){return"groupBy=substr("+e+",1)"},function(e,t){return e+"="+t+"*"}]},d={_whatToTrace:function(e,t,n,r){return console.log("overSchema => level",n,"over",r),1===n&&t.length>r?e+"="+t+"*&groupBy=substr("+e+","+(n+r+1)+")":null}},_={dateTitle:["_utime","_startTime","_updateTime"],sfaTitle:["_2fDevices"]},i={home:[]};angular.module("llngSessionsExplorer",["ui.tree","ui.bootstrap","llApp"]).controller("SessionsExplorerCtrl",["$scope","$translator","$location","$q","$http",function(v,t,e,n,p){var f,r,h;return v.links=links,v.menulinks=menulinks,v.staticPrefix=staticPrefix,v.scriptname=scriptname,v.formPrefix=formPrefix,v.availableLanguages=availableLanguages,v.waiting=!0,v.showM=!1,v.showT=!0,v.data=[],v.currentScope=null,v.currentSession=null,v.menu=i,v.searchString="",v.sfatypes={},v.translateP=t.translateP,v.translate=t.translate,v.translateTitle=function(e){return t.translateField(e,"title")},h="persistent",v.menuClick=function(e){if(e.popup)window.open(e.popup);else switch(e.action||(e.action=e.title),typeof e.action){case"function":e.action(v.currentNode,v),v[e.action]();break;case"string":v[e.action]();break;default:console.log(typeof e.action)}return v.showM=!1},v.search2FA=function(e){return e&&(v.searchString=""),v.currentSession=null,v.data=[],v.updateTree2("",v.data,0,0)},v.delete2FA=function(e,t){for(var n=document.querySelectorAll(".data-"+t),r=0,a=n.length;r<a;r++)n[r].remove();return v.waiting=!0,p.delete(scriptname+"sfa/"+h+"/"+v.currentSession.id+"?type="+e+"&epoch="+t).then(function(e){return v.waiting=!1},function(e){return v.waiting=!1}),v.showT=!1},v.stoggle=function(e){var t=e.$modelValue;return 0===t.nodes.length&&v.updateTree(t.value,t.nodes,t.level,t.over,t.query,t.count),e.toggle()},v.displaySession=function(e){var t,n=function(e){var t,n,r,a,i,o,u,s,l,c,p,f,h,d,g,m,w,y=e._utime;for(s in e)(w=e[s])?("string"==typeof e&&w.match(/; /)&&(e[s]=w.split("; ")),"object"!=typeof e[s]&&("_password".match(new RegExp("\b"+s+"\b"))?e[s]="********":s.match(/^(_utime|_lastAuthnUTime|_lastSeen|notification)$/)?e[s]=v.localeDate(w):s.match(/^(_startTime|_updateTime)$/)&&(f=/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/,f=w.match(f),e[s]=f[3]+"/"+f[2]+"/"+f[1]+" à "+f[4]+":"+f[5]+":"+f[6]))):delete e[s];for(a in h=[],_){for(g=[],o=0,l=(r=_[a]).length;o<l;o++)if(n=r[o],e[n])if("_2fDevices"===n&&e[n]){if(0<(t=JSON.parse(e[n])).length)for(g.push({title:"type",value:"name",epoch:"date"}),u=0,c=t.length;u<c;u++){for(s in d=t[u])w=d[s],"type"===s&&(m=w),"name"===s&&(p=w),"epoch"===s&&(i=w);g.push({title:m,value:p,epoch:i,sfrow:!0})}delete e[n]}else e[n].toString().match(/\w+/)&&g.push({title:n,value:e[n]}),delete e[n];else delete e[n];0<g.length&&h.push({title:"__"+a+"__",nodes:g})}return{_utime:y,nodes:h}};return v.currentScope=e,t=e.$modelValue.session,p.get(scriptname+"sfa/"+h+"/"+t).then(function(e){return v.currentSession=n(e.data),v.currentSession.id=t}),v.showT=!1},v.localeDate=function(e){return new Date(1e3*e).toLocaleString()},v.getLanguage=function(e){return v.lang=e,v.form="white",v.init(),v.showM=!1},r=function(e,t,n){t=t.match(/#!?\/(\w+)/);return null!==t&&!t[1].match(/^(persistent)$/)||(v.type="_session_uid"),v.init()},v.$on("$locationChangeSuccess",r),f=0,v.updateTree=function(i,o,u,s,e,t){var l,c,n;return v.waiting=!0,c=a[v.type]||a._whatToTrace,l=c[u](v.type,i,e),25<t&&d[v.type]&&(n=d[v.type](v.type,i,u,s,e))?(s++,l=n,u-=1):s=0,p.get(scriptname+"sfa/"+h+"?"+l+Object.entries(v.sfatypes).map(function(e){return e[1]?"&type="+e[0]:""}).join("")).then(function(e){var t,n,r,a,e=e.data;if(e.result){for(t=0,n=(a=e.values).length;t<n;t++)r=a[t],f++,r.id="node"+f,u<c.length-1&&(r.nodes=[],r.level=u+1,r.query=l,r.over=s),o.push(r);""===i&&(v.total=e.total)}return v.waiting=!1},function(e){return v.waiting=!1})},v.updateTree2=function(i,o,u,s,e,t){var l,c,n;return v.waiting=!0,c=a[v.type]||("_updateTime"===v.type?a._startTime:a._whatToTrace),l=c[u](v.type,i,e),25<t&&d[v.type]&&(n=d[v.type](v.type,i,u,s,e))?(s++,l=n,u-=1):s=0,p.get(scriptname+"sfa/"+h+"?_session_uid="+v.searchString+"*&groupBy=substr(_session_uid,"+v.searchString.length+")"+Object.entries(v.sfatypes).map(function(e){return e[1]?"&type="+e[0]:""}).join("")).then(function(e){var t,n,r,a,e=e.data;if(e.result){for(t=0,n=(a=e.values).length;t<n;t++)r=a[t],f++,r.id="node"+f,u<c.length-1&&(r.nodes=[],r.level=u+1,r.query=l,r.over=s),o.push(r);""===i&&(v.total=e.total)}return v.waiting=!1},function(e){return v.waiting=!1})},v.init=function(){return v.waiting=!0,v.data=[],n.all([t.init(v.lang),v.updateTree("",v.data,0,0)]).then(function(){return v.waiting=!1},function(e){return v.waiting=!1}),v.activeModule="2ndFA",v.myStyle={color:"#ffb84d"}},e=e.path().match(/^\/(\w+)/),v.type=e?e[1]:"_whatToTrace"}])}.call(this);
|
File diff suppressed because one or more lines are too long
|
@ -290,34 +290,36 @@
|
|||
for (i = 0, len = attrs.length; i < len; i++) {
|
||||
attr = attrs[i];
|
||||
if (session[attr]) {
|
||||
if (session[attr].toString().match(/"type":\s*"(?:TOTP|U2F|UBK|WebAuthn)"/)) {
|
||||
subres.push({
|
||||
title: "type",
|
||||
value: "name",
|
||||
epoch: "date",
|
||||
td: "0"
|
||||
});
|
||||
if (attr === "_2fDevices" && session[attr]) {
|
||||
array = JSON.parse(session[attr]);
|
||||
for (j = 0, len1 = array.length; j < len1; j++) {
|
||||
sfDevice = array[j];
|
||||
for (key in sfDevice) {
|
||||
value = sfDevice[key];
|
||||
if (key === 'type') {
|
||||
title = value;
|
||||
}
|
||||
if (key === 'name') {
|
||||
name = value;
|
||||
}
|
||||
if (key === 'epoch') {
|
||||
epoch = value;
|
||||
}
|
||||
}
|
||||
if (array.length > 0) {
|
||||
subres.push({
|
||||
title: title,
|
||||
value: name,
|
||||
epoch: epoch,
|
||||
td: "1"
|
||||
title: "type",
|
||||
value: "name",
|
||||
epoch: "date",
|
||||
td: "0"
|
||||
});
|
||||
for (j = 0, len1 = array.length; j < len1; j++) {
|
||||
sfDevice = array[j];
|
||||
for (key in sfDevice) {
|
||||
value = sfDevice[key];
|
||||
if (key === 'type') {
|
||||
title = value;
|
||||
}
|
||||
if (key === 'name') {
|
||||
name = value;
|
||||
}
|
||||
if (key === 'epoch') {
|
||||
epoch = value;
|
||||
}
|
||||
}
|
||||
subres.push({
|
||||
title: title,
|
||||
value: name,
|
||||
epoch: epoch,
|
||||
td: "1"
|
||||
});
|
||||
}
|
||||
}
|
||||
delete session[attr];
|
||||
} else if (session[attr].toString().match(/"rp":\s*"[\w-]+"/)) {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -14,16 +14,16 @@
|
|||
<ul class="nav navbar-nav" role="grid">
|
||||
<form class="navbar-form" name="filterForm">
|
||||
<div class="form-check ">
|
||||
<input type="checkbox" ng-model="U2FCheck" class="form-check-input" ng-true-value="2" ng-false-value="1" ng-change="search2FA()"/>
|
||||
<input type="checkbox" ng-model="sfatypes.U2F" class="form-check-input" ng-change="search2FA()"/>
|
||||
<label class="form-check-label" for="U2FCheck">U2F</label>
|
||||
&
|
||||
<input type="checkbox" ng-model="TOTPCheck" class="form-check-input" ng-true-value="2" ng-false-value="1" ng-change="search2FA()"/>
|
||||
<input type="checkbox" ng-model="sfatypes.TOTP" class="form-check-input" ng-change="search2FA()"/>
|
||||
<label class="form-check-label" for="TOTPCheck">TOTP</label>
|
||||
&
|
||||
<input type="checkbox" ng-model="UBKCheck" class="form-check-input" ng-true-value="2" ng-false-value="1" ng-change="search2FA()"/>
|
||||
<input type="checkbox" ng-model="sfatypes.UBK" class="form-check-input" ng-change="search2FA()"/>
|
||||
<label class="form-check-label" for="UBKCheck">UBK</label>
|
||||
&
|
||||
<input type="checkbox" ng-model="WebAuthnCheck" class="form-check-input" ng-true-value="2" ng-false-value="1" ng-change="search2FA()"/>
|
||||
<input type="checkbox" ng-model="sfatypes.WebAuthn" class="form-check-input" ng-change="search2FA()"/>
|
||||
<label class="form-check-label" for="WebAuthnCheck">WebAuthn</label>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -107,17 +107,14 @@
|
|||
</table>
|
||||
</div>
|
||||
<div ng-if="!node.nodes" >
|
||||
<th class="col-md-3" ng-if="node.title!='UBK' && node.title!='TOTP' && node.title!='U2F' && node.title!='WebAuthn'">{{translate(node.title)}}</th>
|
||||
<td class="data-{{node.epoch}}" ng-if="node.title=='TOTP' || node.title=='UBK' || node.title=='U2F' || node.title=='WebAuthn'" >{{node.title}}</td>
|
||||
<th class="col-md-3" ng-if="node.title=='type'">{{translate(node.value)}}</th>
|
||||
<td class="col-md-3 data-{{node.epoch}}" ng-if="node.title!='type'" >{{node.value}}</td>
|
||||
<th class="col-md-3" ng-if="node.title=='type'">{{translate(node.epoch)}}</th>
|
||||
<td class="col-md-3 data-{{node.epoch}}" ng-if="node.title=='TOTP' || node.title=='UBK' || node.title=='U2F' || node.title=='WebAuthn'">{{localeDate(node.epoch)}}</td>
|
||||
<th class="col-md-3" ng-if="!node.sfrow">{{translate(node.title)}}</th>
|
||||
<td class="data-{{node.epoch}}" ng-if="node.sfrow" >{{node.title}}</td>
|
||||
<th class="col-md-3" ng-if="node.title=='type'">{{translate(node.value)}}</th>
|
||||
<td class="col-md-3 data-{{node.epoch}}" ng-if="node.title!='type'" >{{node.value}}</td>
|
||||
<th class="col-md-3" ng-if="node.title=='type'">{{translate(node.epoch)}}</th>
|
||||
<td class="col-md-3 data-{{node.epoch}}" ng-if="node.sfrow">{{localeDate(node.epoch)}}</td>
|
||||
<td class="data-{{node.epoch}}">
|
||||
<span ng-if="node.title=='TOTP' || node.title=='UBK' || node.title=='U2F' || node.title=='WebAuthn'" class="link text-danger glyphicon glyphicon-minus-sign" ng-click="delete2FA(node.title, node.epoch)"></span>
|
||||
<!--
|
||||
<span ng-if="$last && ( node.title=='TOTP' || node.title=='UBK' || node.title=='U2F' || node.title=='WebAuthn' )" class="link text-success glyphicon glyphicon-plus-sign" ng-click="menuClick({title:'newRule'})"></span>
|
||||
-->
|
||||
<span ng-if="node.sfrow" class="link text-danger glyphicon glyphicon-minus-sign" ng-click="delete2FA(node.title, node.epoch)"></span>
|
||||
</td>
|
||||
</div>
|
||||
</script>
|
||||
|
|
|
@ -107,9 +107,6 @@
|
|||
<td class="col-md-4 data-{{node.epoch}}" ng-if="node.epoch > 1500000000">{{localeDate(node.epoch)}}</td>
|
||||
<td class="data-{{node.epoch}}">
|
||||
<span ng-if="node.td=='2'" class="link text-danger glyphicon glyphicon-minus-sign" ng-click="deleteOIDCConsent(node.title, node.epoch)"></span>
|
||||
<!--
|
||||
<span ng-if="$last && ( node.title=='TOTP' || node.title=='UBK' || node.title=='U2F' || node.title=='WebAuthn' )" class="link text-success glyphicon glyphicon-plus-sign" ng-click="menuClick({title:'newRule'})"></span>
|
||||
-->
|
||||
</td>
|
||||
</div>
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue