Integrated the service list view in software page.

This commit is contained in:
Christian P. MOMON 2020-10-09 06:13:46 +02:00
parent a87af89454
commit 13eba336b7
2 changed files with 8 additions and 56 deletions

View file

@ -21,7 +21,6 @@ package fr.devinsy.statoolinfos.htmlize;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.statoolinfos.core.Service;
import fr.devinsy.statoolinfos.core.Services;
import fr.devinsy.statoolinfos.core.Software;
import fr.devinsy.statoolinfos.core.StatoolInfosException;
@ -61,24 +60,7 @@ public class SoftwarePage
data.setContent("softwareDesciprtion", software.getDescription());
data.setContent("serviceCount", services.size());
int index = 0;
for (Service service : services)
{
data.setAttribute("serviceListLine", index, "serviceListLineLogo", "src", service.getOrganization().getTechnicalName() + "-" + service.getTechnicalName() + "-logo.png");
data.setEscapedContent("serviceListLine", index, "serviceListLineNameValue", service.getName());
data.setAttribute("serviceListLine", index, "serviceListLineNameLink", "href", service.getOrganization().getTechnicalName() + "-" + service.getTechnicalName() + ".xhtml");
data.setAttribute("serviceListLine", index, "serviceListLineOrganizationLink", "href", service.getOrganization().getTechnicalName() + ".xhtml");
data.setAttribute("serviceListLine", index, "serviceListLineOrganizationLogo", "src", service.getOrganization().getTechnicalName() + "-logo.png");
data.setEscapedContent("serviceListLine", index, "serviceListLineOrganizationValue", service.getOrganization().getName());
data.setEscapedContent("serviceListLine", index, "serviceListLineUrlLink", service.getWebsite());
data.setEscapedContent("serviceListLine", index, "serviceListLineWebsiteLink", service.getWebsite());
data.setAttribute("serviceListLine", index, "serviceListLineWebsiteLink", "href", service.getWebsite());
data.setEscapedContent("serviceListLine", index, "serviceListLineSoftware", service.getSoftwareName());
index += 1;
}
data.setContent("serviceListView", ServiceListView.build(services));
String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/software.xhtml", data).toString();

View file

@ -11,43 +11,13 @@
<script src="Chart.bundle.min.js"></script>
</head>
<body>
<div class="center_table" style="width: 900px;">
<div class="center">
<h2>Logiciel <span id="softwareName">n/a</span></h2>
<div class="center">
<h2>Logiciel <span id="softwareName">n/a</span></h2>
<p id="softwareDescription">Bla bla description</p>
<div>Nombre de services : <span id="serviceCount">n/a</span></div>
</div>
<table class="table_classic sortable left">
<thead>
<tr>
<th class="" style="width: 200px;">Nom du service</th>
<th class="" style="width: 200px;">Organisation</th>
<th class="" style="width: 200px;">URL</th>
<th class="" style="width: 200px;">Logiciel</th>
<th class="" style="width: 100px;">Utilisateurs mensuels</th>
</tr>
</thead>
<tbody>
<tr id="serviceListLine">
<td id="serviceListLineName" style="padding-top: 0; padding-bottom: 0;">
<a href="#" id="serviceListLineNameLink">
<img id="serviceListLineLogo" src="" style="width: 26px; height: 26px; padding-top:0; padding-bottom: 0; vertical-align: middle;"/>
&#160;<span id="serviceListLineNameValue">n/a</span>
</a>
</td>
<td id="serviceListLineOrganization" style="padding-top: 0; padding-bottom: 0;">
<a href="#" id="serviceListLineOrganizationLink">
<img id="serviceListLineOrganizationLogo" src="" style="width: 26px; height: 26px; padding-top:0; padding-bottom: 0; vertical-align: middle;"/>
&#160;<span id="serviceListLineOrganizationValue">n/a</span>
</a>
</td>
<td id="serviceListLineWebsite"><a href="#" id="serviceListLineWebsiteLink">n/a</a></td>
<td id="serviceListLineSoftware">n/a</td>
<td id="serviceListLineUserCount" class="td_number">n/a</td>
</tr>
</tbody>
</table>
<div>Nombre de services : <span id="serviceCount">n/a</span></div>
</div>
<div id="serviceListView" />
</body>
</html>