Commit 13bb55a8 authored by Christophe Maudoux's avatar Christophe Maudoux 🐛
Browse files

Append an option to define apps tooltip & Improve unit test (#2140)

parent b55b6dda
......@@ -312,6 +312,7 @@ llapp.controller 'TreeCtrl', [
data:
description: "New app description"
uri: "https://test.example.com/"
tooltip: "New app tooltip"
logo: "network.png"
display: "auto"
......
......@@ -15,6 +15,10 @@
<th><span trspan="uri"></span></th>
<td><input id="iuri" class="form-control" ng-model="currentNode.data.uri"/></td>
</tr>
<tr>
<th><span trspan="tooltip"></span></th>
<td><input id="itooltip" class="form-control" ng-model="currentNode.data.tooltip"/></td>
</tr>
<tr>
<th><span trspan="logo"></span></th>
<td>
......
// Generated by CoffeeScript 1.12.8
// Generated by CoffeeScript 1.12.7
/*
LemonLDAP::NG Manager client
......@@ -362,6 +362,7 @@ This file contains:
data: {
description: "New app description",
uri: "https://test.example.com/",
tooltip: "New app tooltip",
logo: "network.png",
display: "auto"
}
......
......@@ -882,6 +882,7 @@
"timeoutActivityInterval":"فترة تحديث الجلسات",
"title":"Title",
"tokenUseGlobalStorage":"استخدام سعة التخزين العامة",
"tooltip":"Tooltip",
"totp2f":"TOTP",
"totp2fActivation":"تفعيل",
"totp2fAuthnLevel":"TOTP authentication level",
......
......@@ -882,6 +882,7 @@
"timeoutActivityInterval":"Sessions update interval",
"title":"Title",
"tokenUseGlobalStorage":"Use global storage",
"tooltip":"Tooltip",
"totp2f":"TOTP",
"totp2fActivation":"Activation",
"totp2fAuthnLevel":"TOTP authentication level",
......
......@@ -882,6 +882,7 @@
"timeoutActivityInterval":"Sessions update interval",
"title":"Title",
"tokenUseGlobalStorage":"Use global storage",
"tooltip":"Tooltip",
"totp2f":"TOTP",
"totp2fActivation":"Activation",
"totp2fAuthnLevel":"TOTP authentication level",
......
......@@ -882,6 +882,7 @@
"timeoutActivityInterval":"Intervalle de mise à jour des sessions",
"title":"Titre",
"tokenUseGlobalStorage":"Utiliser le cache global",
"tooltip":"Info-bulle",
"totp2f":"TOTP",
"totp2fActivation":"Activation",
"totp2fAuthnLevel":"Niveau d'authentification TOTP",
......
......@@ -882,6 +882,7 @@
"timeoutActivityInterval":"Intervallo di aggiornamento delle sessioni",
"title":"Title",
"tokenUseGlobalStorage":"Utilizza lo storage globale",
"tooltip":"Tooltip",
"totp2f":"TOTP",
"totp2fActivation":"Attivazione",
"totp2fAuthnLevel":"Livello di autenticazione TOTP",
......
......@@ -882,6 +882,7 @@
"timeoutActivityInterval":"Oturum güncellenme sıklığı",
"title":"Başlık",
"tokenUseGlobalStorage":"Global depolamayı kullan",
"tooltip":"Tooltip",
"totp2f":"TOTP",
"totp2fActivation":"Aktivasyon",
"totp2fAuthnLevel":"TOTP doğrulama seviyesi",
......
......@@ -882,6 +882,7 @@
"timeoutActivityInterval":"Khoảng thời gian cập nhật phiên",
"title":"Title",
"tokenUseGlobalStorage":"Sử dụng lưu trữ toàn cục",
"tooltip":"Tooltip",
"totp2f":"TOTP",
"totp2fActivation":"Kích hoạt",
"totp2fAuthnLevel":"TOTP authentication level",
......
......@@ -882,6 +882,7 @@
"timeoutActivityInterval":"Sessions update interval",
"title":"Title",
"tokenUseGlobalStorage":"Use global storage",
"tooltip":"Tooltip",
"totp2f":"TOTP",
"totp2fActivation":"激活",
"totp2fAuthnLevel":"TOTP authentication level",
......
......@@ -273,6 +273,7 @@ sub _buildApplicationHash {
my $appuri = $apphash->{options}->{uri} || "";
my $appdesc = $apphash->{options}->{description};
my $applogo = $apphash->{options}->{logo};
my $apptip = $apphash->{options}->{tooltip} || $appname;
# Detect sub applications
my $subapphash;
......@@ -306,6 +307,7 @@ sub _buildApplicationHash {
appdesc => $appdesc,
applogo => $applogo,
appid => $appid,
apptip => $apptip,
};
$applicationHash->{applications} = $applications if $applications;
return $applicationHash;
......
......@@ -113,7 +113,7 @@
<div class="category cat-level-<TMPL_VAR NAME="catlevel"> <TMPL_VAR NAME="catid"> card border-secondary" id="sort_<TMPL_VAR NAME="__counter__">">
<div class="card-header text-white bg-secondary">
<h4 class="catname card-title"><TMPL_VAR NAME="catname"></h4>
<h4 class="catname card-title"><TMPL_VAR NAME="catname"><span><i class="fa fa-arrows-v float-right" ></i></span></h4>
</div>
<TMPL_IF applications>
......@@ -126,7 +126,7 @@
<!-- Application -->
<div class="col-md-4">
<div class="application <TMPL_VAR NAME="appid"> card">
<a href="<TMPL_VAR NAME="appuri">" title="<TMPL_VAR NAME="appname">" >
<a href="<TMPL_VAR NAME="appuri">" title="<TMPL_VAR NAME="apptip">" >
<div class="card-body">
<div class="row">
......
......@@ -61,7 +61,15 @@ ok( $res->[2]->[0] =~ qr%<span id="languages"></span>%, 'Found language flags' )
expectAuthenticatedAs( $res, 'rtyler' );
ok( $res->[2]->[0] !~ m%contextSwitching_ON%, 'Connected as dwho' )
or print STDERR Dumper( $res->[2]->[0] );
count(3);
ok( $res->[2]->[0] =~ qr%href="http://test1\.example\.com/" title="Application Test 1"%, 'Found test1 & title' )
or print STDERR Dumper( $res->[2]->[0] );
ok( $res->[2]->[0] =~ qr%href="http://test2\.example\.com/" title="A nice application!"%, 'Found test2 & title' )
or print STDERR Dumper( $res->[2]->[0] );
my @appdesc = ($res->[2]->[0] =~ qr%class="appdesc%);
ok( @appdesc == 1 , 'Found only one description' )
or print STDERR Dumper( $res->[2]->[0] );
count(6);
$client->logout($id);
......
{
"applicationList": {
"0001-cat": {
"catname": "Sample applications",
"0002-app": {
"options": {
"description": "A simple application displaying authenticated user",
"display": "on",
"logo": "demo.png",
"name": "Application Test 1",
"uri": "http://test1.example.com/",
"tooltip": ""
},
"type": "application"
},
"0003-app": {
"options": {
"description": "",
"display": "on",
"logo": "thumbnail.png",
"name": "Application Test 2",
"uri": "http://test2.example.com/",
"tooltip": "A nice application!"
},
"type": "application"
},
"type": "category"
}
},
"authentication": "Demo",
"cfgAuthor": "The LemonLDAP::NG team",
"cfgAuthorIP": "127.0.0.1",
......
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