Added asterisk month in organization list view.

This commit is contained in:
Christian P. MOMON 2022-01-11 00:28:45 +01:00
parent ab9e8c6b56
commit 88a1cd4c29
2 changed files with 8 additions and 3 deletions

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020-2021 Christian Pierre MOMON <christian@momon.org> * Copyright (C) 2020-2022 Christian Pierre MOMON <christian@momon.org>
* *
* This file is part of StatoolInfos, simple service statistics tool. * This file is part of StatoolInfos, simple service statistics tool.
* *
@ -19,6 +19,7 @@
package fr.devinsy.statoolinfos.htmlize; package fr.devinsy.statoolinfos.htmlize;
import java.io.IOException; import java.io.IOException;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -61,6 +62,9 @@ public class OrganizationListView
data.setContent("organizationCount", organizations.size()); data.setContent("organizationCount", organizations.size());
data.setContent("serviceCount", organizations.getServiceCount()); data.setContent("serviceCount", organizations.getServiceCount());
String monthLabel = LocalDate.now().minusMonths(1).format(DateTimeFormatter.ofPattern("MMMM yyyy")).replace(" ", "&#160;");
data.setContent("monthLabel", monthLabel);
int index = 0; int index = 0;
for (Organization organization : organizations.sortByReverseServiceCount()) for (Organization organization : organizations.sortByReverseServiceCount())
{ {

View file

@ -21,8 +21,8 @@
<th style="width: 200px;">Membre</th> <th style="width: 200px;">Membre</th>
<th style="width: 250px;">URL</th> <th style="width: 250px;">URL</th>
<th style="width: 10px;">Services</th> <th style="width: 10px;">Services</th>
<th style="width: 10px;">Utilisateurs mensuels</th> <th style="width: 10px;">Utilisateurs mensuels<sup>*</sup></th>
<th style="width: 10px;">Visites mensuelles</th> <th style="width: 10px;">Visites mensuelles<sup>*</sup></th>
<th style="width: 10px;">Date</th> <th style="width: 10px;">Date</th>
</tr> </tr>
</thead> </thead>
@ -42,6 +42,7 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div id="month_asterisk">(*) chiffres de <span id="monthLabel">n/a</span></div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() $(document).ready(function()