Refactored HTML/CSS rendering.

This commit is contained in:
Christian P. MOMON 2020-10-02 01:36:34 +02:00
parent 39a07094fe
commit 8627af33ba
13 changed files with 247 additions and 236 deletions

View file

@ -102,6 +102,7 @@ public final class StatoolInfosCLI
message.appendln(" statoolinfos [ -h | -help | --help ]"); message.appendln(" statoolinfos [ -h | -help | --help ]");
message.appendln(" statoolinfos [ -v | -version | --version ]"); message.appendln(" statoolinfos [ -v | -version | --version ]");
message.appendln(" statoolinfos clear [ directory | file ]"); message.appendln(" statoolinfos clear [ directory | file ]");
message.appendln(" statoolinfos build [ directory | file ]");
message.appendln(" statoolinfos crawl [ directory | file ]"); message.appendln(" statoolinfos crawl [ directory | file ]");
message.appendln(" statoolinfos htmlize [ directory | file ]"); message.appendln(" statoolinfos htmlize [ directory | file ]");

View file

@ -63,7 +63,7 @@ public class CategoriesPage
data.setAttribute("categoryListLine", index, "categoryListLineNameLink", "href", "category-" + stat.getCategory().getTechnicalName() + ".xhtml"); data.setAttribute("categoryListLine", index, "categoryListLineNameLink", "href", "category-" + stat.getCategory().getTechnicalName() + ".xhtml");
data.setAttribute("categoryListLine", index, "categoryListLineNameLink", "title", stat.getCategory().getDescription()); data.setAttribute("categoryListLine", index, "categoryListLineNameLink", "title", stat.getCategory().getDescription());
data.setEscapedContent("categoryListLine", index, "categoryListLineSoftwares", stat.getCategory().getSoftwares().toStringWithFrenchCommas()); data.setEscapedContent("categoryListLine", index, "categoryListLineSoftwares", stat.getCategory().getSoftwares().sort().toStringWithFrenchCommas());
data.setContent("categoryListLine", index, "categoryListLineOrganizationCount", stat.getOrganizationCount()); data.setContent("categoryListLine", index, "categoryListLineOrganizationCount", stat.getOrganizationCount());
data.setContent("categoryListLine", index, "categoryListLineServiceCount", stat.getServiceCount()); data.setContent("categoryListLine", index, "categoryListLineServiceCount", stat.getServiceCount());
data.setContent("categoryListLine", index, "categoryListLineUserCount", stat.getUserCount()); data.setContent("categoryListLine", index, "categoryListLineUserCount", stat.getUserCount());

View file

@ -59,7 +59,7 @@ public class CategoryPage
data.setContent("categoryName", category.getName()); data.setContent("categoryName", category.getName());
data.setContent("categoryDescription", category.getDescription()); data.setContent("categoryDescription", category.getDescription());
data.setContent("categorySoftwares", category.getSoftwares().toStringWithFrenchCommas()); data.setContent("categorySoftwares", category.getSoftwares().sort().toStringWithFrenchCommas());
data.setContent("serviceCount", services.size()); data.setContent("serviceCount", services.size());
int index = 0; int index = 0;

View file

@ -112,6 +112,8 @@ public class Htmlizer
StatoolInfosUtils.copyRessource("/fr/devinsy/statoolinfos/htmlize/stuff/statoolinfos.css", targetDirectory); StatoolInfosUtils.copyRessource("/fr/devinsy/statoolinfos/htmlize/stuff/statoolinfos.css", targetDirectory);
StatoolInfosUtils.copyRessource("/fr/devinsy/statoolinfos/htmlize/stuff/Chart.bundle.min.js", targetDirectory); StatoolInfosUtils.copyRessource("/fr/devinsy/statoolinfos/htmlize/stuff/Chart.bundle.min.js", targetDirectory);
StatoolInfosUtils.copyRessource("/fr/devinsy/statoolinfos/htmlize/stuff/sorttable.js", targetDirectory); StatoolInfosUtils.copyRessource("/fr/devinsy/statoolinfos/htmlize/stuff/sorttable.js", targetDirectory);
StatoolInfosUtils.copyRessource("/fr/devinsy/statoolinfos/htmlize/stuff/datatables.min.css", targetDirectory);
StatoolInfosUtils.copyRessource("/fr/devinsy/statoolinfos/htmlize/stuff/datatables.min.js", targetDirectory);
StatoolInfosUtils.copyRessource("/fr/devinsy/statoolinfos/htmlize/stuff/statoolinfos-logo.jpg", targetDirectory); StatoolInfosUtils.copyRessource("/fr/devinsy/statoolinfos/htmlize/stuff/statoolinfos-logo.jpg", targetDirectory);
StatoolInfosUtils.copyRessource("/fr/devinsy/statoolinfos/htmlize/stuff/statoolinfos-logo.ico", targetDirectory); StatoolInfosUtils.copyRessource("/fr/devinsy/statoolinfos/htmlize/stuff/statoolinfos-logo.ico", targetDirectory);
StatoolInfosUtils.copyRessource("/fr/devinsy/statoolinfos/htmlize/stuff/statoolinfos-logo-name.jpg", targetDirectory); StatoolInfosUtils.copyRessource("/fr/devinsy/statoolinfos/htmlize/stuff/statoolinfos-logo-name.jpg", targetDirectory);

View file

@ -11,12 +11,13 @@
<script src="Chart.bundle.min.js"></script> <script src="Chart.bundle.min.js"></script>
</head> </head>
<body> <body>
<div class="center"> <div class="center_table" style="width: 900px;">
<div class="center" >
<h2>Catégories</h2> <h2>Catégories</h2>
<div>Nombre de catégories : <span id="categoryCount">n/a</span></div> <div>Nombre de catégories : <span id="categoryCount">n/a</span></div>
<div class="left"> </div>
<table class="table_classic center_table sortable" style="width: 900px; margin-left: auto; margin-right: auto;"> <table class="table_classic sortable left">
<thead> <thead>
<tr> <tr>
<th class="" style="width: 200px;">Nom de la catégorie</th> <th class="" style="width: 200px;">Nom de la catégorie</th>
@ -39,6 +40,5 @@
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
</body> </body>
</html> </html>

View file

@ -11,14 +11,15 @@
<script src="Chart.bundle.min.js"></script> <script src="Chart.bundle.min.js"></script>
</head> </head>
<body> <body>
<div class="center"> <div class="center_table" style="width: 900px;">
<div class="center" >
<h2>Catégorie <span id="categoryName">n/a</span></h2> <h2>Catégorie <span id="categoryName">n/a</span></h2>
<p id="categoryDescription">Bla bla description</p> <p id="categoryDescription">Bla bla description</p>
<div>Logiciels : <span id="categorySoftwares">Bla bla logiciels</span></div> <div>Logiciels : <span id="categorySoftwares">Bla bla logiciels</span></div>
<div>Nombre de services : <span id="serviceCount">n/a</span></div> <div>Nombre de services : <span id="serviceCount">n/a</span></div>
<div class="left"> </div>
<table class="table_classic center_table sortable" style="width: 900px; margin-left: auto; margin-right: auto;"> <table class="table_classic sortable left">
<thead> <thead>
<tr> <tr>
<th class="" style="width: 200px;">Nom du service</th> <th class="" style="width: 200px;">Nom du service</th>
@ -49,6 +50,5 @@
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
</body> </body>
</html> </html>

View file

@ -11,7 +11,8 @@
<script src="Chart.bundle.min.js"></script> <script src="Chart.bundle.min.js"></script>
</head> </head>
<body> <body>
<div class="center"> <div class="center_table" style="width: 900px;">
<div class="center" >
<h2><img id="organizationLogo" src="#" style="width: 100px; heigth: 100px; vertical-align: middle;"/> <span id="organizationName">Organization name</span></h2> <h2><img id="organizationLogo" src="#" style="width: 100px; heigth: 100px; vertical-align: middle;"/> <span id="organizationName">Organization name</span></h2>
<div style="margin: 5px;"> <div style="margin: 5px;">
@ -19,8 +20,8 @@
</div> </div>
<p id="organizationDescription">Bla bla description</p> <p id="organizationDescription">Bla bla description</p>
<div>Nombre de services : <span id="serviceCount">n/a</span></div> <div>Nombre de services : <span id="serviceCount">n/a</span></div>
<div class="left"> </div>
<table class="table_classic center_table sortable" style="width: 900px; margin-left: auto; margin-right: auto;"> <table class="table_classic sortable left" >
<thead> <thead>
<tr> <tr>
<th class="" style="width: 200px;">Nom du service</th> <th class="" style="width: 200px;">Nom du service</th>
@ -50,6 +51,5 @@
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
</body> </body>
</html> </html>

View file

@ -11,11 +11,12 @@
<script src="Chart.bundle.min.js"></script> <script src="Chart.bundle.min.js"></script>
</head> </head>
<body> <body>
<div class="center"> <div class="center_table" style="width: 900px;">
<div class="center" >
<h2>Fichiers properties</h2> <h2>Fichiers properties</h2>
<div>Nombre de fichiers : <span id="fileCount">n/a</span></div> <div>Nombre de fichiers : <span id="fileCount">n/a</span></div>
<div class="left"> </div>
<table class="table_classic center_table sortable" style="width: 1000px; margin-left: auto; margin-right: auto;"> <table class="table_classic sortable left">
<thead> <thead>
<tr> <tr>
<th style="width: 600px;">Nom local</th> <th style="width: 600px;">Nom local</th>
@ -49,6 +50,5 @@
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
</body> </body>
</html> </html>

View file

@ -11,15 +11,18 @@
<script src="Chart.bundle.min.js"></script> <script src="Chart.bundle.min.js"></script>
</head> </head>
<body> <body>
<div class="center_table" style="width: 900px;">
<div class="center" >
<h2><img id="serviceLogo" src="#" style="width: 100px; heigth: 100px;"/> <span id="serviceName">Service name</span></h2> <h2><img id="serviceLogo" src="#" style="width: 100px; heigth: 100px;"/> <span id="serviceName">Service name</span></h2>
<div style="margin: 5px;"> <div style="margin: 5px;">
<a id="serviceRawButton" href="#" class="button">Raw</a> <a id="serviceRawButton" href="#" class="button">Raw</a>
</div> </div>
<p id="serviceDescription">Bla bla description</p> <p id="serviceDescription">Bla bla description</p>
</div>
<div>&#160;</div> <div>&#160;</div>
<div> <table class="table_classic left">
<table class="table_classic"> <thead>
<tr> <tr>
<th class="">Nom du service</th> <th class="">Nom du service</th>
<th class="">URL</th> <th class="">URL</th>
@ -27,6 +30,8 @@
<th class="">Utilisateurs mensuels</th> <th class="">Utilisateurs mensuels</th>
<th style="width: 10px;">Date</th> <th style="width: 10px;">Date</th>
</tr> </tr>
</thead>
<tbody>
<tr id="serviceListLine"> <tr id="serviceListLine">
<td id="serviceListLineName"><a href="#" id="serviceListLineNameLink">n/a</a></td> <td id="serviceListLineName"><a href="#" id="serviceListLineNameLink">n/a</a></td>
<td id="serviceListLineUrl"><a href="#" id="serviceListLineUrlLink">n/a</a></td> <td id="serviceListLineUrl"><a href="#" id="serviceListLineUrlLink">n/a</a></td>
@ -34,6 +39,7 @@
<td id="serviceListLineUserCount">n/a</td> <td id="serviceListLineUserCount">n/a</td>
<td id="serviceListLineDate" class="center">n/a</td> <td id="serviceListLineDate" class="center">n/a</td>
</tr> </tr>
</tbody>
</table> </table>
</div> </div>
</body> </body>

View file

@ -11,12 +11,13 @@
<script src="Chart.bundle.min.js"></script> <script src="Chart.bundle.min.js"></script>
</head> </head>
<body> <body>
<div class="center"> <div class="center_table" style="width: 900px;">
<div class="center" >
<h2>Tous les services</h2> <h2>Tous les services</h2>
<div>Nombre de services : <span id="serviceCount">n/a</span></div> <div>Nombre de services : <span id="serviceCount">n/a</span></div>
<div class="left"> </div>
<table class="table_classic center_table sortable" style="width: 1000px; margin-left: auto; margin-right: auto;"> <table class="table_classic sortable left">
<thead> <thead>
<tr> <tr>
<th class="" style="width: 200px;">Nom du service</th> <th class="" style="width: 200px;">Nom du service</th>
@ -49,6 +50,5 @@
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
</body> </body>
</html> </html>

View file

@ -11,13 +11,14 @@
<script src="Chart.bundle.min.js"></script> <script src="Chart.bundle.min.js"></script>
</head> </head>
<body> <body>
<div class="center_table" style="width: 900px;">
<div class="center"> <div class="center">
<h2>Logiciel <span id="softwareName">n/a</span></h2> <h2>Logiciel <span id="softwareName">n/a</span></h2>
<p id="softwareDescription">Bla bla description</p> <p id="softwareDescription">Bla bla description</p>
<div>Nombre de services : <span id="serviceCount">n/a</span></div> <div>Nombre de services : <span id="serviceCount">n/a</span></div>
<div class="left"> </div>
<table class="table_classic center_table sortable" style="width: 900px; margin-left: auto; margin-right: auto;"> <table class="table_classic sortable left">
<thead> <thead>
<tr> <tr>
<th class="" style="width: 200px;">Nom du service</th> <th class="" style="width: 200px;">Nom du service</th>
@ -48,6 +49,5 @@
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
</body> </body>
</html> </html>

View file

@ -11,12 +11,13 @@
<script src="Chart.bundle.min.js"></script> <script src="Chart.bundle.min.js"></script>
</head> </head>
<body> <body>
<div class="center_table" style="width: 900px;">
<div class="center"> <div class="center">
<h2>Logiciels</h2> <h2>Logiciels</h2>
<div>Nombre de logiciels : <span id="softwareCount">n/a</span></div> <div>Nombre de logiciels : <span id="softwareCount">n/a</span></div>
<div class="left"> </div>
<table class="table_classic center_table sortable" style="width: 900px; margin-left: auto; margin-right: auto;"> <table class="table_classic sortable left">
<thead> <thead>
<tr> <tr>
<th class="">Nom</th> <th class="">Nom</th>
@ -41,6 +42,5 @@
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
</body> </body>
</html> </html>

View file

@ -9,6 +9,8 @@
<link rel="stylesheet" type="text/css" href="statoolinfos.css" /> <link rel="stylesheet" type="text/css" href="statoolinfos.css" />
<script src="sorttable.js" /> <script src="sorttable.js" />
<script src="Chart.bundle.min.js"></script> <script src="Chart.bundle.min.js"></script>
<link rel="stylesheet" type="text/css" href="datatables.min.css"/>
<script type="text/javascript" src="datatables.min.js"></script>
</head> </head>
<body> <body>
<div style="margin: 5px 10px 10px 10px;"> <div style="margin: 5px 10px 10px 10px;">