diff --git a/e2e-tests/lemonldap-ng-ldap.ini b/e2e-tests/lemonldap-ng-ldap.ini index b887896b8..9f2460e06 100644 --- a/e2e-tests/lemonldap-ng-ldap.ini +++ b/e2e-tests/lemonldap-ng-ldap.ini @@ -40,7 +40,6 @@ viewerAllowDiff = 1 staticPrefix = /static instanceName = Demo -;bannerColor = #ffb84d languages = fr, en, vi, ar, it, zh, tr, zh_TW, es templateDir = __pwd__/lemonldap-ng-manager/site/templates diff --git a/e2e-tests/lemonldap-ng-sql.ini b/e2e-tests/lemonldap-ng-sql.ini index 08b9a47f2..17d87ca70 100644 --- a/e2e-tests/lemonldap-ng-sql.ini +++ b/e2e-tests/lemonldap-ng-sql.ini @@ -37,7 +37,6 @@ viewerAllowDiff = 1 staticPrefix = /static instanceName = Demo -;bannerColor = #ffb84d languages = fr, en, vi, ar, it, zh, tr, zh_TW, es templateDir = __pwd__/lemonldap-ng-manager/site/templates diff --git a/e2e-tests/lemonldap-ng.ini b/e2e-tests/lemonldap-ng.ini index 5561b5613..59e5bda61 100644 --- a/e2e-tests/lemonldap-ng.ini +++ b/e2e-tests/lemonldap-ng.ini @@ -49,7 +49,6 @@ viewerAllowDiff = 1 staticPrefix = /static instanceName = Demo -;bannerColor = #ffb84d languages = fr, en, vi, ar, it, zh, tr, zh_TW, es templateDir = __pwd__/lemonldap-ng-manager/site/templates diff --git a/lemonldap-ng-common/lemonldap-ng.ini b/lemonldap-ng-common/lemonldap-ng.ini index 9b0d1360c..43eac464c 100644 --- a/lemonldap-ng-common/lemonldap-ng.ini +++ b/lemonldap-ng-common/lemonldap-ng.ini @@ -376,15 +376,10 @@ protection = manager ; staticPrefix: relative (or URL) location of static HTML components staticPrefix = __MANAGERSTATICDIR__ - +; ; instanceName: Display current LLNG instance into Manager ;instanceName = Demo - -; bannerColor: Define banner color to differentiate Manager instances -;bannerColor = red -;bannerColor = #ffb84d - -; templateDir: location of HTML templates directory +; location of HTML templates directory templateDir = __MANAGERTEMPLATESDIR__ ; languages: available languages for manager interface diff --git a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm index 270eeba85..f10d95ca5 100644 --- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm +++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm @@ -17,7 +17,7 @@ use JSON; use Lemonldap::NG::Common::Conf::Constants; use Lemonldap::NG::Common::PSGI::Constants; -our $VERSION = '2.0.15'; +our $VERSION = '2.0.14'; extends qw( Lemonldap::NG::Handler::PSGI::Router @@ -183,16 +183,14 @@ sub javascript { return 'var formPrefix=staticPrefix+"forms/";var confPrefix=scriptname+"confs/";var viewPrefix=scriptname+"view/";' - . "var allowDiff=$res;" - . "var sessionTTL=$ttl;" - . "var impPrefix='$impPrefix';" - . ( - $self->{bannerColor} ? "var bannerColor='$self->{bannerColor}';" - : '' - ) + . 'var allowDiff=' . "$res;" + . 'var impPrefix=' . "'" + . $impPrefix . "'" . ';' + . 'var sessionTTL=' . "$ttl;" . ( $self->links ? 'var links=' . to_json( $self->links ) . ';' : '' ) . ( - $self->menuLinks ? 'var menulinks=' . to_json( $self->menuLinks ) . ';' + $self->menuLinks + ? 'var menulinks=' . to_json( $self->menuLinks ) . ';' : '' ); } diff --git a/lemonldap-ng-manager/site/coffee/2ndfa.coffee b/lemonldap-ng-manager/site/coffee/2ndfa.coffee index ae035a417..f1ba0ac2a 100644 --- a/lemonldap-ng-manager/site/coffee/2ndfa.coffee +++ b/lemonldap-ng-manager/site/coffee/2ndfa.coffee @@ -382,7 +382,6 @@ llapp.controller 'SessionsExplorerCtrl', ['$scope', '$translator', '$location', # Colorized link $scope.activeModule = "2ndFA" $scope.myStyle = {color: '#ffb84d'} - $scope.bannerStyle = {'background-color': "#{window.bannerColor}"} # Query scheme initialization # Default to '_whatToTrace' diff --git a/lemonldap-ng-manager/site/coffee/diff.coffee b/lemonldap-ng-manager/site/coffee/diff.coffee index dfe70eef6..384e3a9b1 100644 --- a/lemonldap-ng-manager/site/coffee/diff.coffee +++ b/lemonldap-ng-manager/site/coffee/diff.coffee @@ -99,7 +99,6 @@ llapp.controller 'DiffCtrl', [ '$scope', '$http', '$q', '$translator', '$locatio # Colorized link $scope.activeModule = "conf" $scope.myStyle = {color: '#ffb84d'} - $scope.bannerStyle = {'background-color': "#{window.bannerColor}"} readDiff = (c1,c2,tr=true) -> res = [] diff --git a/lemonldap-ng-manager/site/coffee/manager.coffee b/lemonldap-ng-manager/site/coffee/manager.coffee index 23bc67544..5e1fae736 100644 --- a/lemonldap-ng-manager/site/coffee/manager.coffee +++ b/lemonldap-ng-manager/site/coffee/manager.coffee @@ -869,7 +869,6 @@ llapp.controller 'TreeCtrl', [ # Colorized link $scope.activeModule = "conf" $scope.myStyle = {color: '#ffb84d'} - $scope.bannerStyle = {'background-color': "#{window.bannerColor}"} c = $location.path().match(new RegExp('^/confs/(latest|[0-9]+)')) unless c diff --git a/lemonldap-ng-manager/site/coffee/notifications.coffee b/lemonldap-ng-manager/site/coffee/notifications.coffee index 351492fda..9cda53e33 100644 --- a/lemonldap-ng-manager/site/coffee/notifications.coffee +++ b/lemonldap-ng-manager/site/coffee/notifications.coffee @@ -311,7 +311,6 @@ llapp.controller 'NotificationsExplorerCtrl', [ '$scope', '$translator', '$locat # Colorized link $scope.activeModule = "notifications" $scope.myStyle = {color: '#ffb84d'} - $scope.bannerStyle = {'background-color': "#{window.bannerColor}"} $scope.displayCreateForm = -> $scope.activesStyle = {color: '#777'} diff --git a/lemonldap-ng-manager/site/coffee/sessions.coffee b/lemonldap-ng-manager/site/coffee/sessions.coffee index 9f1ced469..9d4e7cb87 100644 --- a/lemonldap-ng-manager/site/coffee/sessions.coffee +++ b/lemonldap-ng-manager/site/coffee/sessions.coffee @@ -523,7 +523,6 @@ llapp.controller 'SessionsExplorerCtrl', ['$scope', '$translator', '$location', # Colorized link $scope.activeModule = "sessions" $scope.myStyle = {color: '#ffb84d'} - $scope.bannerStyle = {'background-color': "#{window.bannerColor}"} # Query scheme initialization # Default to '_whatToTrace' diff --git a/lemonldap-ng-manager/site/coffee/viewDiff.coffee b/lemonldap-ng-manager/site/coffee/viewDiff.coffee index b0a1aaa0b..f3bf6cca7 100644 --- a/lemonldap-ng-manager/site/coffee/viewDiff.coffee +++ b/lemonldap-ng-manager/site/coffee/viewDiff.coffee @@ -99,8 +99,6 @@ llapp.controller 'DiffCtrl', [ '$scope', '$http', '$q', '$translator', '$locatio # Colorized link $scope.activeModule = "viewer" $scope.myStyle = {color: '#ffb84d'} - $scope.bannerStyle = {'background-color': "#{window.bannerColor}"} - readDiff = (c1,c2,tr=true) -> res = [] for k,v of c1 diff --git a/lemonldap-ng-manager/site/coffee/viewer.coffee b/lemonldap-ng-manager/site/coffee/viewer.coffee index 444ed2310..e623eb253 100644 --- a/lemonldap-ng-manager/site/coffee/viewer.coffee +++ b/lemonldap-ng-manager/site/coffee/viewer.coffee @@ -472,7 +472,6 @@ llapp.controller 'TreeCtrl', [ # Colorized link $scope.activeModule = "viewer" $scope.myStyle = {color: '#ffb84d'} - $scope.bannerStyle = {'background-color': "#{window.bannerColor}"} c = $location.path().match(new RegExp('^/view/(latest|[0-9]+)')) unless c diff --git a/lemonldap-ng-manager/site/htdocs/static/css/manager.css b/lemonldap-ng-manager/site/htdocs/static/css/manager.css index 873887c61..ddb700886 100644 --- a/lemonldap-ng-manager/site/htdocs/static/css/manager.css +++ b/lemonldap-ng-manager/site/htdocs/static/css/manager.css @@ -259,4 +259,4 @@ dl, } .navbar-nav li { line-height: 50px; -} \ No newline at end of file +} diff --git a/lemonldap-ng-manager/site/htdocs/static/css/manager.min.css b/lemonldap-ng-manager/site/htdocs/static/css/manager.min.css index cfc51eec0..3edea43bc 100644 --- a/lemonldap-ng-manager/site/htdocs/static/css/manager.min.css +++ b/lemonldap-ng-manager/site/htdocs/static/css/manager.min.css @@ -1 +1 @@ -.tree-node{border-width:1px;border-style:solid;border-radius:4px;margin-bottom:8px}.tree-node-default{background:#fff}.angular-ui-tree-handle{cursor:pointer}#pleaseWait{background-color:#fff;width:100%;min-height:9.9%;height:auto;z-index:5000;position:absolute;left:0;top:0;margin-left:auto;margin-right:auto;padding:30% 20%;text-align:center;opacity:.8;filter:alpha(opacity=80)}.panel .table th{vertical-align:middle;width:10%}.th_rulesAuthnLevel{width:2% !important}ul.cat-tree{list-style-type:square}p.cat-tree-category{font-weight:bold}html,body{margin:0;padding:0;height:100vh;background:radial-gradient(circle at 50% 0,#fff 0,#ddd 100%) no-repeat scroll 0 0 #ddd}header#navbar{height:9vh;margin-bottom:1vh;padding-bottom:0vh}#content{max-height:86vh;height:86vh;margin:0;padding:0;position:relative}header#navbar .navbar-brand{padding:10px 15px}header#navbar .navbar-brand img{background:#fff}textarea{width:100%}textarea#privateKey,textarea#publicKey,textarea#filetext{font-size:8pt}dl,.panel{margin-bottom:8px}.panel-body{padding:5px}.input-group-solid{border:1px solid #CCC;border-radius:4px;padding:6px 12px}.input-group>.input-group-solid:last-child{border-bottom-left-radius:0;border-top-left-radius:0}#cfgnum{position:relative}#cfgnum.label-warning:hover:after{content:attr(comment);padding:4px 8px;color:rgba(0,0,0,0.5);position:absolute;left:100%;bottom:100%;white-space:nowrap;z-index:2;border-radius:5px;background:#f0ad4e}.link{cursor:pointer}#bottom .panel{height:100%;margin-top:8px}#bottom .panel-body{height:100%}#right{display:flex;flex-direction:column}#bottom{flex:1}@media(min-width:768px){.scrollable-sm{max-height:86vh !important;overflow:auto}#right,#left{max-height:86vh !important;height:86vh}#top{overflow-x:hidden}#bottom{height:43vh;overflow:hidden}}#top,#bottom,#right,#left{position:relative}@media(max-width:767px){#right{position:absolute;top:0;z-index:1000}.lmmenu{position:static;float:left;width:100%;min-height:200px;margin-top:0;border:1px solid #ccc;box-shadow:none}#content{position:relative}}.scrollable{overflow:auto}.container{padding-bottom:15px}.hresizer{position:absolute;width:6px;top:0;bottom:0;right:0;background-color:#EEE;cursor:e-resize}.vresizer{position:absolute;height:6px;left:0;right:0;top:0;background-color:#EEE;cursor:n-resize}.angular-ui-tree-empty{min-height:auto;border:0}.old{color:#A00}.new{color:#0A0}.maxw{width:100%}.center{text-align:center}.backgrounddiv{margin-top:10px}.llcontainer{position:relative;margin-bottom:10px}.navbar-nav li{line-height:50px} \ No newline at end of file +.tree-node{border-width:1px;border-style:solid;border-radius:4px;margin-bottom:8px}.tree-node-default{background:#fff}.angular-ui-tree-handle{cursor:pointer}#pleaseWait{background-color:#fff;width:100%;min-height:9.9%;height:auto;z-index:5000;position:absolute;left:0;top:0;margin-left:auto;margin-right:auto;padding:30% 20%;text-align:center;opacity:.8;filter:alpha(opacity=80)}.panel .table th{vertical-align:middle;width:10%}.th_rulesAuthnLevel{width:2%!important}ul.cat-tree{list-style-type:square}p.cat-tree-category{font-weight:bold}html,body{margin:0;padding:0;height:100vh;background:radial-gradient(circle at 50% 0,#fff 0,#ddd 100%) no-repeat scroll 0 0 #ddd}header#navbar{height:9vh;margin-bottom:1vh;padding-bottom:0vh}#content{max-height:86vh;height:86vh;margin:0;padding:0;position:relative}header#navbar .navbar-brand{padding:10px 15px}header#navbar .navbar-brand img{background:#fff}textarea{width:100%}textarea#privateKey,textarea#publicKey,textarea#filetext{font-size:8pt}dl,.panel{margin-bottom:8px}.panel-body{padding:5px}.input-group-solid{border:1px solid #CCC;border-radius:4px;padding:6px 12px}.input-group>.input-group-solid:last-child{border-bottom-left-radius:0;border-top-left-radius:0}#cfgnum{position:relative}#cfgnum.label-warning:hover:after{content:attr(comment);padding:4px 8px;color:rgba(0,0,0,0.5);position:absolute;left:100%;bottom:100%;white-space:nowrap;z-index:2;border-radius:5px;background:#f0ad4e}.link{cursor:pointer}#bottom .panel{height:100%;margin-top:8px}#bottom .panel-body{height:100%}#right{display:flex;flex-direction:column}#bottom{flex:1}@media(min-width:768px){.scrollable-sm{max-height:86vh!important;overflow:auto}#right,#left{max-height:86vh!important;height:86vh}#top{overflow-x:hidden}#bottom{height:43vh;overflow:hidden}}#top,#bottom,#right,#left{position:relative}@media(max-width:767px){#right{position:absolute;top:0;z-index:1000}.lmmenu{position:static;float:left;width:100%;min-height:200px;margin-top:0;border:1px solid #ccc;box-shadow:none}#content{position:relative}}.scrollable{overflow:auto}.container{padding-bottom:15px}.hresizer{position:absolute;width:6px;top:0;bottom:0;right:0;background-color:#EEE;cursor:e-resize}.vresizer{position:absolute;height:6px;left:0;right:0;top:0;background-color:#EEE;cursor:n-resize}.angular-ui-tree-empty{min-height:auto;border:0}.old{color:#A00}.new{color:#0A0}.maxw{width:100%}.center{text-align:center}.backgrounddiv{margin-top:10px}.llcontainer{position:relative;margin-bottom:10px}.navbar-nav li{line-height:50px} \ No newline at end of file diff --git a/lemonldap-ng-manager/site/htdocs/static/js/2ndfa.js b/lemonldap-ng-manager/site/htdocs/static/js/2ndfa.js index b5b57f834..06857b174 100644 --- a/lemonldap-ng-manager/site/htdocs/static/js/2ndfa.js +++ b/lemonldap-ng-manager/site/htdocs/static/js/2ndfa.js @@ -381,12 +381,9 @@ return $scope.waiting = false; }); $scope.activeModule = "2ndFA"; - $scope.myStyle = { + return $scope.myStyle = { color: '#ffb84d' }; - return $scope.bannerStyle = { - 'background-color': "" + window.bannerColor - }; }; c = $location.path().match(/^\/(\w+)/); return $scope.type = c ? c[1] : '_whatToTrace'; diff --git a/lemonldap-ng-manager/site/htdocs/static/js/2ndfa.min.js b/lemonldap-ng-manager/site/htdocs/static/js/2ndfa.min.js index c9bcf1754..32a45b1b7 100644 --- a/lemonldap-ng-manager/site/htdocs/static/js/2ndfa.min.js +++ b/lemonldap-ng-manager/site/htdocs/static/js/2ndfa.min.js @@ -1 +1 @@ -!function(){var r={_whatToTrace:[function(e,t){return"groupBy=substr("+e+",1)"},function(e,t){return e+"="+t+"*"}]},a={_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,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 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 level",e,"over",n),1===e&&t.length>n?"uid="+t+"*&groupBy=substr(uid,"+(e+n+1)+")":null},a={actives:[{title:"markAsDone",icon:"check"}],done:[{title:"deleteNotification",icon:"trash"}],new:[{title:"save",icon:"save"}],home:[]};angular.module("llngNotificationsExplorer",["ui.tree","ui.bootstrap","llApp"]).controller("NotificationsExplorerCtrl",["$scope","$translator","$location","$q","$http","$uibModal",function(s,e,t,o,i,r){var f,n;return s.links=links,s.menulinks=menulinks,s.staticPrefix=staticPrefix,s.scriptname=scriptname,s.formPrefix=formPrefix,s.availableLanguages=availableLanguages,s.waiting=!0,s.showM=!1,s.showT=!0,s.showForm=!1,s.data=[],s.form={},s.formPost={},s.currentScope=null,s.currentNotification=null,s.menu=a,s.translateP=e.translateP,s.translate=e.translate,s.translateTitle=function(t){return e.translateField(t,"title")},s.menuClick=function(t){if(t.popup)window.open(t.popup);else switch(t.action||(t.action=t.title),typeof t.action){case"function":t.action(s.currentNode,s);break;case"string":s[t.action]();break;default:console.log(typeof t.action)}return s.showM=!1},s.markAsDone=function(){return s.waiting=!0,i.put(scriptname+"notifications/"+s.type+"/"+s.currentNotification.uid+"_"+s.currentNotification.reference,{done:1}).then(function(t){return s.currentNotification=null,s.currentScope.remove(),s.message={title:"notificationDeleted"},s.showModal("alert.html"),s.waiting=!1,s.init()},function(t){return s.message={title:"notificationNotDeleted",message:t.statusText},s.showModal("alert.html"),s.waiting=!1,s.init()})},s.deleteNotification=function(){return s.waiting=!0,i.delete(scriptname+"notifications/"+s.type+"/"+s.currentNotification.uid+"_"+s.currentNotification.reference+"_"+s.currentNotification.done).then(function(t){return s.currentNotification=null,s.currentScope.remove(),s.message={title:"notificationPurged"},s.showModal("alert.html"),s.waiting=!1,s.init()},function(t){return s.message={title:"notificationNotPurged",message:t.statusText},s.showModal("alert.html"),s.waiting=!1,s.init()})},s.stoggle=function(t){var e=t.$modelValue;return 0===e.nodes.length&&s.updateTree(e.value,e.nodes,e.level,e.over,e.query,e.count),t.toggle()},s.notifDate=function(t){return null!=t?(t.match(/(\d{4})-(\d{2})-(\d{2})/)&&(t=t.substr(0,4)+t.substr(5,2)+t.substr(8,2)),new Date(t.substr(0,4),t.substr(4,2)-1,t.substr(6,2)).toLocaleDateString()):""},s.getLanguage=function(t){return s.lang=t,s.form.date?s.form.date=new Date:s.form="white",s.init(),s.showM=!1},s.$on("$locationChangeSuccess",function(t,e,n){e=e.match(/#!?\/(\w+)/);return s.type=null!=e?e[1]:"actives","new"===s.type?s.displayCreateForm():(s.showForm=!1,s.init())}),f=0,s.updateTree=function(r,a,c,u,t,e){var l,n;if(s.waiting=!0,l=d[c](r,t),25 level",e,"over",n),1===e&&t.length>n?"uid="+t+"*&groupBy=substr(uid,"+(e+n+1)+")":null},c={actives:[{title:"markAsDone",icon:"check"}],done:[{title:"deleteNotification",icon:"trash"}],new:[{title:"save",icon:"save"}],home:[]},angular.module("llngNotificationsExplorer",["ui.tree","ui.bootstrap","llApp"]).controller("NotificationsExplorerCtrl",["$scope","$translator","$location","$q","$http","$uibModal",function(f,e,t,o,i,r){var d,n,a;return f.links=links,f.menulinks=menulinks,f.staticPrefix=staticPrefix,f.scriptname=scriptname,f.formPrefix=formPrefix,f.availableLanguages=availableLanguages,f.waiting=!0,f.showM=!1,f.showT=!0,f.showForm=!1,f.data=[],f.form={},f.formPost={},f.currentScope=null,f.currentNotification=null,f.menu=c,f.translateP=e.translateP,f.translate=e.translate,f.translateTitle=function(t){return e.translateField(t,"title")},f.menuClick=function(t){if(t.popup)window.open(t.popup);else switch(t.action||(t.action=t.title),typeof t.action){case"function":t.action(f.currentNode,f);break;case"string":f[t.action]();break;default:console.log(typeof t.action)}return f.showM=!1},f.markAsDone=function(){return f.waiting=!0,i.put(scriptname+"notifications/"+f.type+"/"+f.currentNotification.uid+"_"+f.currentNotification.reference,{done:1}).then(function(t){return f.currentNotification=null,f.currentScope.remove(),f.message={title:"notificationDeleted"},f.showModal("alert.html"),f.waiting=!1,f.init()},function(t){return f.message={title:"notificationNotDeleted",message:t.statusText},f.showModal("alert.html"),f.waiting=!1,f.init()})},f.deleteNotification=function(){return f.waiting=!0,i.delete(scriptname+"notifications/"+f.type+"/"+f.currentNotification.uid+"_"+f.currentNotification.reference+"_"+f.currentNotification.done).then(function(t){return f.currentNotification=null,f.currentScope.remove(),f.message={title:"notificationPurged"},f.showModal("alert.html"),f.waiting=!1,f.init()},function(t){return f.message={title:"notificationNotPurged",message:t.statusText},f.showModal("alert.html"),f.waiting=!1,f.init()})},f.stoggle=function(t){var e;return 0===(e=t.$modelValue).nodes.length&&f.updateTree(e.value,e.nodes,e.level,e.over,e.query,e.count),t.toggle()},f.notifDate=function(t){return null!=t?(t.match(/(\d{4})-(\d{2})-(\d{2})/)&&(t=t.substr(0,4)+t.substr(5,2)+t.substr(8,2)),new Date(t.substr(0,4),t.substr(4,2)-1,t.substr(6,2)).toLocaleDateString()):""},f.getLanguage=function(t){return f.lang=t,f.form.date?f.form.date=new Date:f.form="white",f.init(),f.showM=!1},f.$on("$locationChangeSuccess",function(t,e,n){var i;return i=e.match(/#!?\/(\w+)/),f.type=null!=i?i[1]:"actives","new"===f.type?f.displayCreateForm():(f.showForm=!1,f.init())}),d=0,f.updateTree=function(a,c,u,l,t,e){var s,n;if(f.waiting=!0,s=g[u](a,t),25 level",n,"over",o),1===n&&t.length>o?e+"="+t+"*&groupBy=substr("+e+","+(n+o+1)+")":null},ipAddr:function(e,t,n,o){return console.log("overScheme => level",n,"over",o),0 level",n,"over",o),3 level",n,"over",o),1===n&&t.length>o?e+"="+t+"*&groupBy=substr("+e+","+(n+o+1)+")":null}},M={dateTitle:["_utime","_startTime","_updateTime","_lastAuthnUTime","_lastSeen"],connectionTitle:["ipAddr","_timezone","_url"],authenticationTitle:["_session_id","_user","_password","authenticationLevel"],modulesTitle:["_auth","_userDB","_passwordDB","_issuerDB","_authChoice","_authMulti","_userDBMulti","_2f"],saml:["_idp","_idpConfKey","_samlToken","_lassoSessionDump","_lassoIdentityDump"],groups:["groups","hGroups"],ldap:["dn"],OpenIDConnect:["_oidc_id_token","_oidc_OP","_oidc_access_token"],sfaTitle:["_2fDevices"],oidcConsents:["_oidcConsents"]},i={session:[{title:"deleteSession",icon:"trash"}],home:[]};angular.module("llngSessionsExplorer",["ui.tree","ui.bootstrap","llApp"]).controller("SessionsExplorerCtrl",["$scope","$translator","$location","$q","$http",function(H,t,r,e,o){var p,n,d;return H.links=links,H.menulinks=menulinks,H.staticPrefix=staticPrefix,H.scriptname=scriptname,H.formPrefix=formPrefix,H.impPrefix=impPrefix,H.sessionTTL=sessionTTL,H.availableLanguages=availableLanguages,H.waiting=!0,H.showM=!1,H.showT=!0,H.data=[],H.currentScope=null,H.currentSession=null,H.menu=i,H.translateP=t.translateP,H.translate=t.translate,H.translateTitle=function(e){return t.translateField(e,"title")},d="global",H.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(H.currentNode,H);break;case"string":H[e.action]();break;default:console.log(typeof e.action)}return H.showM=!1},H.deleteOIDCConsent=function(e,t){var i=document.querySelectorAll(".data-"+t);return H.waiting=!0,o.delete(scriptname+"sessions/OIDCConsent/"+d+"/"+H.currentSession.id+"?rp="+e+"&epoch="+t).then(function(e){var t,n,o,r;for(H.waiting=!1,r=[],n=0,o=i.length;nt.title?1:e.title real attribute"),A.push(d)):k.push(d);return u=k.concat(A),l.push({title:"__attributesAndMacros__",nodes:u}),{_utime:E,nodes:l}};return H.currentScope=e,t=e.$modelValue.session,o.get(scriptname+"sessions/"+d+"/"+t).then(function(e){return H.currentSession=n(e.data),H.currentSession.id=t}),H.showT=!1},H.localeDate=function(e){return new Date(1e3*e).toLocaleString()},H.isValid=function(e,t){var n=r.path(),o=Date.now()/1e3;return console.log("Path",n),console.log("Session epoch",e),console.log("Current date",o),console.log("Session TTL",sessionTTL),n=o-e level",n,"over",o),1===n&&t.length>o?e+"="+t+"*&groupBy=substr("+e+","+(n+o+1)+")":null},ipAddr:function(e,t,n,o){return console.log("overScheme => level",n,"over",o),0 level",n,"over",o),3 level",n,"over",o),1===n&&t.length>o?e+"="+t+"*&groupBy=substr("+e+","+(n+o+1)+")":null}},M={dateTitle:["_utime","_startTime","_updateTime","_lastAuthnUTime","_lastSeen"],connectionTitle:["ipAddr","_timezone","_url"],authenticationTitle:["_session_id","_user","_password","authenticationLevel"],modulesTitle:["_auth","_userDB","_passwordDB","_issuerDB","_authChoice","_authMulti","_userDBMulti","_2f"],saml:["_idp","_idpConfKey","_samlToken","_lassoSessionDump","_lassoIdentityDump"],groups:["groups","hGroups"],ldap:["dn"],OpenIDConnect:["_oidc_id_token","_oidc_OP","_oidc_access_token"],sfaTitle:["_2fDevices"],oidcConsents:["_oidcConsents"]},i={session:[{title:"deleteSession",icon:"trash"}],home:[]};angular.module("llngSessionsExplorer",["ui.tree","ui.bootstrap","llApp"]).controller("SessionsExplorerCtrl",["$scope","$translator","$location","$q","$http",function(H,t,r,e,o){var p,n,d;return H.links=links,H.menulinks=menulinks,H.staticPrefix=staticPrefix,H.scriptname=scriptname,H.formPrefix=formPrefix,H.impPrefix=impPrefix,H.sessionTTL=sessionTTL,H.availableLanguages=availableLanguages,H.waiting=!0,H.showM=!1,H.showT=!0,H.data=[],H.currentScope=null,H.currentSession=null,H.menu=i,H.translateP=t.translateP,H.translate=t.translate,H.translateTitle=function(e){return t.translateField(e,"title")},d="global",H.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(H.currentNode,H);break;case"string":H[e.action]();break;default:console.log(typeof e.action)}return H.showM=!1},H.deleteOIDCConsent=function(e,t){var i=document.querySelectorAll(".data-"+t);return H.waiting=!0,o.delete(scriptname+"sessions/OIDCConsent/"+d+"/"+H.currentSession.id+"?rp="+e+"&epoch="+t).then(function(e){var t,n,o,r;for(H.waiting=!1,r=[],n=0,o=i.length;nt.title?1:e.title real attribute"),B.push(i)):P.push(i);return I=P.concat(B),L.push({title:"__attributesAndMacros__",nodes:I}),{_utime:E,nodes:L}};return H.currentScope=e,t=e.$modelValue.session,o.get(scriptname+"sessions/"+d+"/"+t).then(function(e){return H.currentSession=n(e.data),H.currentSession.id=t}),H.showT=!1},H.localeDate=function(e){return new Date(1e3*e).toLocaleString()},H.isValid=function(e,t){var n=r.path(),o=Date.now()/1e3;return console.log("Path",n),console.log("Session epoch",e),console.log("Current date",o),console.log("Session TTL",sessionTTL),e=o-e -