Skip to content
Snippets Groups Projects
Commit 34d9f090 authored by Éloïs's avatar Éloïs
Browse files

[enh] willMembers add toolptip

parent 7be1a27d
No related branches found
No related tags found
1 merge request!62Dev2
......@@ -30,25 +30,26 @@ MEAN_SENTRIES_REACHED mean sentries reached
MEAN_QUALITY_CERTS Quality averages of the set of certifications
MEAN_MEMBERS_REACHED mean members reached
IDENTITY Identity
MEMBERSHIP_CASE membership case
MEMBERSHIP_CASE_FULL complete case ?
DISTANCE_RULE distance
COL_4 List of received certifications (recent -> old)
COL_4_WITH_AVAIlABILITY_SORT List of received certifications (by availability time)
PUBKEY_PART pubkey (first 16 characters)
EMITTE emitted
EMITTED_ON emitted on
AT_BLOCK at block
EXPIRE_ON expire on
EXPIRE_TIME expiration datetime
KO KO
OK OK
MEMBERSHIP_ASKED Membership asked
MEMBERSHIP_NOT_ASKED Membership not asked
YES yes
NO no
QUALITY_CERTIFIERS quality certifiers
QUALITY_CERTIFIERS package quality
DISTANCE Distance
CERTIFIERS_COUNT certifiers count
CERTS certs
QUALITY quality
SIG_PERIOD_OK available
IDTY_REVOKED [identity revoked]
INVALID_BLOCKSTAMP invalid blockstamp
LAST_TR1 total
LAST_TR2 identities
LICENSE licence GPL-3.0
SRC source code
WOTEX_LINK wotex view
......@@ -30,25 +30,26 @@ MEAN_SENTRIES_REACHED Taux moyen de membres référents joiniables
MEAN_QUALITY_CERTS Qualité moyenne par groupe de certifications reçues
MEAN_MEMBERS_REACHED Taux moyen de membres joiniables
IDENTITY Identité
MEMBERSHIP_CASE dossier d'adhésion
MEMBERSHIP_CASE_FULL dossier complet ?
DISTANCE_RULE distance
COL_4 liste des certifications reçues (récentes -> anciennes)
COL_4_WITH_AVAIlABILITY_SORT liste des certifications reçues (par date de disponibilité)
PUBKEY_PART clé publique (16 premiers caractères)
EMITTED émise
EMITTED_ON émise le
AT_BLOCK au bloc
EXPIRE_ON expire le
EXPIRE_TIME date et heure d'expiration
KO KO
OK OK
MEMBERSHIP_ASKED Adhésion demandée
MEMBERSHIP_NOT_ASKED Adhésion non demandée
YES oui
NO non
QUALITY_CERTIFIERS qualité certificateurs
QUALITY_CERTIFIERS qualité dossier
DISTANCE Distance
CERTIFIERS_COUNT Nombre de certificateurs
CERTS certs
QUALITY qualité
SIG_PERIOD_OK disponible
IDTY_REVOKED [identité revoquée]
INVALID_BLOCKSTAMP blockstamp incorrect
LAST_TR1 total
LAST_TR2 identités
LICENSE licence GPL-3.0
SRC code source
WOTEX_LINK voir sur wotex
......@@ -223,6 +223,7 @@ module.exports = (req, res, next) => co(function *() {
wotb_id: wotb_id,
issuerIsSentry: issuerIsSentry,
blockNumber: tmpQueryPendingCertifsList[j].block_number,
creationTimestamp: emittedBlock[0].medianTime,
timestampExpire: tmpQueryPendingCertifsList[j].expires_on,
timestampWritable: certTimestampWritable,
validBlockStamp: validBlockStamp
......@@ -281,6 +282,7 @@ module.exports = (req, res, next) => co(function *() {
wotb_id: idtysPendingCertifsList[i][idMin].wotb_id,
issuerIsSentry: idtysPendingCertifsList[i][idMin].issuerIsSentry,
blockNumber: idtysPendingCertifsList[i][idMin].blockNumber,
creationTimestamp: idtysPendingCertifsList[i][idMin].creationTimestamp,
timestampExpire: idtysPendingCertifsList[i][idMin].timestampExpire,
timestampWritable: idtysPendingCertifsList[i][idMin].timestampWritable,
validBlockStamp: idtysPendingCertifsList[i][idMin].validBlockStamp
......
......@@ -35,5 +35,31 @@
.active {
background-color: #4CAF50;
}
[data-tip]{
position: relative;
}
[data-tip]:hover:before {
content: attr(data-tip);
position: absolute;
padding: 0 8px;
height: 28px;
line-height: 28px;
background-color: rgba(0, 0, 0, 0.8);
left: -10px;
top: -38px;
font-size: 14px;
border-radius: 3px;
white-space: nowrap;
color: #fff;
font-size: 11px;
}
[data-tip]:hover:after {
content: "";
position: absolute;
border-top: 8px solid rgba(0, 0, 0, 0.8);
border-left: 8px solid transparent;
border-right: 8px solid transparent;
left: 0;
top: -10px;
}
</style>
\ No newline at end of file
......@@ -2,6 +2,28 @@ ${(host.substr(host.length-6,6) == '.onion') ? HTML_TOR_HEAD:HTML_HEAD}
<title>${currencyName}-monit : ${MENU_LANG['WILL_MEMBERS']}</title>
<script type="text/javascript">// <![CDATA[
var table = document.getElementById('table')
var filter = document.getElementById('filter')
/*filter.onchange = function() {
return filterRows(table, 1, 0, this.value);
}*/
// tableElem : HTMLElement
// rowIndex : index du row pour commencer le filtrage (0 indexed)
// tableElem : index du col à prendre en compte (0 indexed)
// tableElem : lettre pour la comparaison
function filterRows(tableElem, rowIndex, colIndex, filterString) {
for (var i = rowIndex, val; i < tableElem.rows.length; ++i) {
val = tableElem.rows[i].cells[colIndex].firstChild.nodeValue;
if (val.substr(0,filterString.length).toLowerCase() != filterString.toLowerCase())
tableElem.rows[i].style.display = 'none';
else
tableElem.rows[i].style.display = '';
}
return false;
}
function deroule(champ,valeur)
{
/*valeur est la hauteur en pixel de la zone*/
......@@ -32,10 +54,9 @@ ${printMenu(MENU_LANG, help, "WILL_MEMBERS")}
<option name="order" value ="asc">${LANG["ORDER_ASC"]}
<option name="order" value ="desc" ${order == 'desc' ? 'selected' : ''}>${LANG["ORDER_DESC"]}
</select> <input type="submit" value="${LANG["SUBMIT_TXT"]}"><br>
<input type="checkbox" name="showIdtyWithZeroCert" value="yes" ${showIdtyWithZeroCert == 'yes' ? 'checked' : ''}>${LANG["CHECKBOX_SHOW_IDTY_WITH_ZERO_CERT"]}<br>
<input type="checkbox" name="sortSig" value="Availability" ${sortSig == 'Availability' ? 'checked' : ''}>${LANG["CHECKBOX_SORT_SIG"]}
<input type="checkbox" name="sortSig" value="Availability" ${sortSig == 'Availability' ? 'checked' : ''}>${LANG["CHECKBOX_SORT_SIG"]}<br>
filtrer les identités : <input type="text" name="filter" id="filter" value="" maxlength="20" onchange="filterRows(document.getElementById('table'),2,0,this.value);" onkeypress="this.onchange();" onpaste="this.onchange();" oninput="this.onchange();"/>
</form>
<br>
<hr>
......@@ -131,11 +152,11 @@ ${ (USE_WOTB6) ? `
${LANG["COUNT_READY_MEMBERS"]} : <b>${countMembersWithSigQtyValidCert}</b>.<br>
<!-- Tableau de toutes les identités en piscine -->
<table border="1">
<tr><td colspan="${nbMaxCertifs+3}" align='center'>${LANG["TABLE_TITLE1"]} <b>${days}</b> ${LANG["TABLE_TITLE2"]}</td></tr>
<table id="table" border="1">
<tr><td colspan="${nbMaxCertifs+4}" align='center'>${LANG["TABLE_TITLE1"]} <b>${days}</b> ${LANG["TABLE_TITLE2"]}</td></tr>
<!-- Printer les nom des colonnes -->
<tr>
<td align='center'>${LANG['IDENTITY']}</td><td align='center'>${LANG['MEMBERSHIP_CASE']}</td>
<td align='center'>${LANG['IDENTITY']}</td><td align='center'>${LANG['MEMBERSHIP_CASE_FULL']}</td><td align='center'>${LANG['DISTANCE_RULE']}</td>
<td style="background:#000000">-</td>
<td align='center' colspan="${nbMaxCertifs}">${sortSig == "Availability"
? LANG['COL_4_WITH_AVAIlABILITY_SORT']
......@@ -147,30 +168,37 @@ ${ (USE_WOTB6) ? `
<!--Printer la ligne-->
<tr>
<td align="center" style="background:${(idty.validBlockStamp) ? ((idty.expires_on > 0) ? idty.colorPending=color(idty.expires_on,idtyWindow,250):idty.colorPending='#FF0000'): idty.colorPending='#FF8000'}">
<a href="wotex?lg=${MENU_LANG['LG']}${(typeof(help) != 'undefined' && help == 'no') ? '&help=no':''}&to=${idty['uid']}${idty['wotexId']}&pending=on&mode=undefined">${idty['uid'].substring(0, 25)}</a>
<br>${idty['pubkey'].substring(0, 16)}
<br>${LANG['EMITTED_ON']} ${timestampToDatetime(idty['creationTimestamp'])}
<br>${LANG['AT_BLOCK']} #${idty['BlockNumber']}
${(idty.expires_on > 0) ? '<br><b>'+LANG['EXPIRE_ON']+' '+timestampToDatetime(idty.expires_on)+'</b>':``}
<td align="center" style="background:${(idty.validBlockStamp) ? ((idty.expires_on > 0) ? idty.colorPending=color(idty.expires_on,idtyWindow,250):idty.colorPending='#FF0000'): idty.colorPending='#FF8000'}">${idty['uid'].substring(0, 25)}
<br><span data-tip="${LANG['PUBKEY_PART']} ">${idty['pubkey'].substring(0, 16)}</span>
<br><a href="wotex?lg=${MENU_LANG['LG']}${(typeof(help) != 'undefined' && help == 'no') ? '&help=no':''}&to=${idty['uid']}${idty['wotexId']}&pending=on&mode=undefined">${LANG['WOTEX_LINK']}</a>
<br><b><span data-tip="${LANG['EMITTED_ON']} ${timestampToDatetime(idty['creationTimestamp'])}">#${idty['BlockNumber']}</span></b>
${(idty.expires_on > 0) ? '<br><b><span data-tip="'+LANG['EXPIRE_TIME']+'">'+timestampToDatetime(idty.expires_on)+'</span></b>':``}
${(!idty.validBlockStamp) ? `
<br><font color="DarkRed">[${LANG['INVALID_BLOCKSTAMP']}]</font>
`:``}
</td>
${(idty.expires_on && !idty.idtyRevoked > 0) ? `
<td align='center' style="background:${idty.colorPending}">
${(idty.membership && !idty.detailedDistance.isOutdistanced && idty.nbValidPendingCert >= sigQty) ? `<font color="green">${LANG['OK']}` : `<font color="DarkRed">${LANG['KO']}` }</font><br>
${LANG['MEMBERSHIP_ASKED']} : ${idty.membership? `<font color="green">${LANG['YES']}` : `<font color="DarkRed">${LANG['NO']}` }</font><br>
${(idty.membership && !idty.detailedDistance.isOutdistanced && idty.nbValidPendingCert >= sigQty) ? `
<font color="green">${LANG['OK']}
`:`
<font color="DarkRed">${LANG['KO']} <br>
${!idty.membership? `${LANG['MEMBERSHIP_NOT_ASKED']}<br>`:``}
${LANG['CERTS']} : ${(idty.nbValidPendingCert < sigQty) ? `${idty.nbValidPendingCert}/${sigQty}`:``}
${idty.detailedDistance.isOutdistanced? `${LANG['DISTANCE']} ${LANG['KO']}`:``}
</font>
`}
</td>
<td align='center' style="background:${idty.colorPending}">
${ (USE_WOTB6) ? `
<font color="${idty.detailedDistance.isOutdistanced ? 'DarkRed' : 'blue' }">${idty.percentSentriesReached}% (${idty.detailedDistance.nbSuccess}/${idty.detailedDistance.nbSentries})
<br>${LANG['QUALITY_CERTIFIERS']} : <b>${(idty.validBlockStamp) ? ((idty.detailedDistance.nbSuccess/idty.detailedDistance.nbSentries)/xpercent).toFixed(2):`0.00`}</b></font>
`:`
<font color="${idty.detailedDistance ? 'DarkRed' : 'blue' }">${LANG['DISTANCE']} : ${idty.detailedDistance ? LANG['KO']:LANG['OK'] }</font>
`}
<br>${LANG['CERTIFIERS_COUNT']} : ${(idty.nbValidPendingCert >= sigQty) ? `<font color="green">${idty.nbValidPendingCert}/${sigQty}` : `<font color="DarkRed">${idty.nbValidPendingCert}/${sigQty}` }</font>
</td>
`:`
<td align='center' style="background:#FF0000"><b>${LANG['IDTY_REVOKED']}</b></td>
<td align='center' rowspan=2 style="background:#FF0000"><b>${LANG['IDTY_REVOKED']}</b></td>
`}
<td style="background:#000000">-</td>
......@@ -184,8 +212,8 @@ ${ (USE_WOTB6) ? `
${ (USE_WOTB6) ? `
<br>${LANG['QUALITY']} : <b>${(typeof(membersQualityExt[cert.from])=='undefined' || !cert.validBlockStamp) ? `0.00`:membersQualityExt[cert.from]}</b>
`:''}
<br>${timestampToDatetime(cert.timestampExpire)}
<br>#${cert['blockNumber']}
<br><b><span data-tip="${LANG['EMITTED_ON']} ${timestampToDatetime(cert['creationTimestamp'])}">#${cert['blockNumber']}</span></b>
<br><span data-tip="${LANG['EXPIRE_TIME']}">${timestampToDatetime(cert.timestampExpire)}</span>
${j==(4+idty.pendingCertifications.length-idty.nbValidPendingCert)?'<b>':''}
${ ( !cert.validBlockStamp || cert['timestampWritable'] > currentBlockchainTimestamp ) ? `
<br><font color="DarkRed">[${ (cert.validBlockStamp) ? timestampToDatetime(cert['timestampWritable']):LANG['INVALID_BLOCKSTAMP']}]</font>
......@@ -202,7 +230,7 @@ ${ (USE_WOTB6) ? `
`).join('')}
<tr>
<td colspan="${nbMaxCertifs+3}" align="center">
<td colspan="${nbMaxCertifs+4}" align="center">
${LANG['LAST_TR1']} : <b>${idtysListFiltered.length}</b> ${LANG['LAST_TR2']}.
</td>
</tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment