Commit a853fdea authored by Antoine Rosier's avatar Antoine Rosier
Browse files

Improve checkuser template

parent 3096fdaf
......@@ -32,50 +32,72 @@
<TMPL_IF NAME="HEADERS">
<div class="row">
<div class="card col border-secondary">
<div class="text-center bg-light text-dark"><b><span trspan="headers">HEADERS</span></b></div>
<div class="font-weight-bold">
<div class ="col-12 col-sm-12 col-md-12 pb-3">
<div class="card h-100 border-secondary">
<div class="card-title text-center bg-light text-dark"><b><span trspan="headers">HEADERS</span></b></div>
<div class="card-text font-weight-bold m-2">
<TMPL_LOOP NAME="HEADERS">
<TMPL_VAR NAME="key">: <TMPL_VAR NAME="value"><br/>
</TMPL_LOOP>
</div>
</div>
</div>
</div>
</TMPL_IF>
<div class="row">
<TMPL_IF NAME="HISTORY">
<div class="card col border-secondary">
<div class="text-center bg-light text-dark"><b><span trspan="loginHistory">HISTORY</span></b></div>
<TMPL_IF NAME="SUCCESS">
<div class= "row ">
<!-- Groups Card 1 -->
<div class ="col-6 col-sm-12 col-md-6 p-0">
<div class="card h-100">
<div class="card-title text-center bg-light text-dark"><b><span trspan="groups_sso">SSO GROUPS</span></b></div>
<TMPL_LOOP NAME="GROUPS">
<div class="card-text text-left ml-2"><TMPL_VAR NAME="value"></div>
</TMPL_LOOP>
</div>
</div>
<!-- Macros Card 2 -->
<div class ="col-6 col-sm-12 col-md-6 p-0">
<div class="card h-100">
<TMPL_IF NAME="MACROS">
<div class="card-title text-center bg-light text-dark"><b><span trspan="macros">MACROS</span></b></div>
<table class="table table-sm table-hover">
<thead>
<div class="text-center bg-light text-dark"><span trspan="lastLogins">Success</span></div>
<tr>
<th scope="col"><span trspan="date">Date</span></th>
<th scope="col"><span trspan="key">Key</span></th>
<th scope="col"><span trspan="value">Value</span></th>
</tr>
</thead>
<tbody>
<TMPL_LOOP NAME="SUCCESS">
<TMPL_LOOP NAME="MACROS">
<tr>
<td class="localeDate" scope="row" val="<TMPL_VAR NAME="utime">"></td>
<td scope="row"><TMPL_VAR NAME="values"></td>
<td scope="row"><TMPL_VAR NAME="key"></td>
<td scope="row"><TMPL_VAR NAME="value"></td>
</tr>
</TMPL_LOOP>
</tbody>
</table>
</TMPL_IF>
<TMPL_IF NAME="FAILED">
</div>
</div>
<!-- History Card 3 -->
<div class ="col-6 col-sm-12 col-md-6 p-0">
<div class="card h-100">
<TMPL_IF NAME="HISTORY">
<div class="card-title text-center bg-light text-dark"><b><span trspan="loginHistory">HISTORY</span></b></div>
<TMPL_IF NAME="SUCCESS">
<table class="table table-sm table-hover">
<thead>
<div class="text-center bg-light text-dark"><span trspan="lastFailedLogins">Failed</span></div>
<div class="card-text text-center bg-light text-dark"><span trspan="lastLogins">Success</span></div>
<tr>
<th scope="col"><span trspan="date">Date</span></th>
<th scope="col"><span trspan="value">Value</span></th>
</tr>
</thead>
<tbody>
<TMPL_LOOP NAME="FAILED">
<TMPL_LOOP NAME="SUCCESS">
<tr>
<td class="localeDate" scope="row" val="<TMPL_VAR NAME="utime">"></td>
<td scope="row"><TMPL_VAR NAME="values"></td>
......@@ -84,46 +106,34 @@
</tbody>
</table>
</TMPL_IF>
</div>
</TMPL_IF>
<TMPL_IF NAME="GROUPS">
<div class="card col border-secondary">
<div class="text-center bg-light text-dark"><b><span trspan="groups_sso">SSO GROUPS</span></b></div>
<div class="row">
<TMPL_LOOP NAME="GROUPS">
<div class="w-100"></div>
<div class="col"><TMPL_VAR NAME="value"></div>
</TMPL_LOOP>
</div>
</div>
</TMPL_IF>
<div class="col">
<div class="row">
<TMPL_IF NAME="ATTRIBUTES">
<div class="card col border-secondary">
<div class="text-center bg-light text-dark"><b><span trspan="attributes">ATTRIBUTES</span></b></div>
<TMPL_IF NAME="FAILED">
<table class="table table-sm table-hover">
<thead>
<div class="card-text text-center bg-light text-dark"><span trspan="lastFailedLogins">Failed</span></div>
<tr>
<th scope="col"><span trspan="key">Key</span></th>
<th scope="col"><span trspan="date">Date</span></th>
<th scope="col"><span trspan="value">Value</span></th>
</tr>
</thead>
<tbody>
<TMPL_LOOP NAME="ATTRIBUTES">
<TMPL_LOOP NAME="FAILED">
<tr>
<td scope="row"><TMPL_VAR NAME="key"></td>
<td scope="row"><TMPL_VAR NAME="value"></td>
<td class="localeDate" scope="row" val="<TMPL_VAR NAME="utime">"></td>
<td scope="row"><TMPL_VAR NAME="values"></td>
</tr>
</TMPL_LOOP>
</tbody>
</table>
</div>
</TMPL_IF>
<TMPL_IF NAME="GROUPS"><div class="w-100"></div></TMPL_IF>
<TMPL_IF NAME="MACROS">
<div class="card col border-secondary">
<div class="text-center bg-light text-dark"><b><span trspan="macros">MACROS</span></b></div>
</TMPL_IF>
</div>
</div>
<!-- Attribute Card 4 -->
<div class ="col-6 col-sm-12 col-md-6 p-0">
<div class="card h-100">
<TMPL_IF NAME="ATTRIBUTES">
<div class="card-title text-center bg-light text-dark"><b><span trspan="attributes">ATTRIBUTES</span></b></div>
<table class="table table-sm table-hover">
<thead>
<tr>
......@@ -132,7 +142,7 @@
</tr>
</thead>
<tbody>
<TMPL_LOOP NAME="MACROS">
<TMPL_LOOP NAME="ATTRIBUTES">
<tr>
<td scope="row"><TMPL_VAR NAME="key"></td>
<td scope="row"><TMPL_VAR NAME="value"></td>
......@@ -140,10 +150,10 @@
</TMPL_LOOP>
</tbody>
</table>
</div>
</TMPL_IF>
</div>
</div>
</div>
<div class="buttons">
......
......@@ -166,7 +166,7 @@ ok( $res->[2]->[0] =~ m%Auth-User: %, 'Found Auth-User' )
or explain( $res->[2]->[0], 'Header Key: Auth-User' );
ok( $res->[2]->[0] =~ m%: rtyler<br/>%, 'Found rtyler' )
or explain( $res->[2]->[0], 'Header Value: rtyler' );
ok( $res->[2]->[0] =~ m%<div class="col">su</div>%, 'Found su' )
ok( $res->[2]->[0] =~ m%<div class="card-text text-left ml-2">su</div>%, 'Found su' )
or explain( $res->[2]->[0], 'SSO Groups: su' );
ok( $res->[2]->[0] =~ m%<td scope="row">uid</td>%, 'Found uid' )
or explain( $res->[2]->[0], 'Attribute Value uid' );
......
......@@ -429,7 +429,7 @@ ok( $res->[2]->[0] =~ m%Auth-User: %, 'Found Auth-User' )
or explain( $res->[2]->[0], 'Header Key: Auth-User' );
ok( $res->[2]->[0] =~ m%: rtyler<br/>%, 'Found rtyler' )
or explain( $res->[2]->[0], 'Header Value: rtyler' );
ok( $res->[2]->[0] =~ m%<div class="col">su</div>%, 'Found su' )
ok( $res->[2]->[0] =~ m%<div class="card-text text-left ml-2">su</div>%, 'Found su' )
or explain( $res->[2]->[0], 'SSO Groups: su' );
ok( $res->[2]->[0] =~ m%<td scope="row">uid</td>%, 'Found uid' )
or explain( $res->[2]->[0], 'Attribute Value uid' );
......@@ -489,7 +489,7 @@ ok( $res->[2]->[0] =~ m%Auth-User: %, 'Found Auth-User' )
or explain( $res->[2]->[0], 'Header Key: Auth-User' );
ok( $res->[2]->[0] =~ m%: rtyler<br/>%, 'Found rtyler' )
or explain( $res->[2]->[0], 'Header Value: rtyler' );
ok( $res->[2]->[0] =~ m%<div class="col">su</div>%, 'Found su' )
ok( $res->[2]->[0] =~ m%<div class="card-text text-left ml-2">su</div>%, 'Found su' )
or explain( $res->[2]->[0], 'SSO Groups: su' );
ok( $res->[2]->[0] =~ m%<td scope="row">uid</td>%, 'Found uid' )
or explain( $res->[2]->[0], 'Attribute Value uid' );
......
Supports Markdown
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