Integrated the service list view in software page.
This commit is contained in:
parent
a87af89454
commit
13eba336b7
2 changed files with 8 additions and 56 deletions
|
@ -21,7 +21,6 @@ package fr.devinsy.statoolinfos.htmlize;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import fr.devinsy.statoolinfos.core.Service;
|
|
||||||
import fr.devinsy.statoolinfos.core.Services;
|
import fr.devinsy.statoolinfos.core.Services;
|
||||||
import fr.devinsy.statoolinfos.core.Software;
|
import fr.devinsy.statoolinfos.core.Software;
|
||||||
import fr.devinsy.statoolinfos.core.StatoolInfosException;
|
import fr.devinsy.statoolinfos.core.StatoolInfosException;
|
||||||
|
@ -61,24 +60,7 @@ public class SoftwarePage
|
||||||
data.setContent("softwareDesciprtion", software.getDescription());
|
data.setContent("softwareDesciprtion", software.getDescription());
|
||||||
data.setContent("serviceCount", services.size());
|
data.setContent("serviceCount", services.size());
|
||||||
|
|
||||||
int index = 0;
|
data.setContent("serviceListView", ServiceListView.build(services));
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/software.xhtml", data).toString();
|
String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/software.xhtml", data).toString();
|
||||||
|
|
||||||
|
|
|
@ -11,43 +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>Logiciel <span id="softwareName">n/a</span></h2>
|
<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>Nombre de services : <span id="serviceCount">n/a</span></div>
|
||||||
</div>
|
</div>
|
||||||
<table class="table_classic sortable left">
|
|
||||||
<thead>
|
<div id="serviceListView" />
|
||||||
<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;"/>
|
|
||||||
 <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;"/>
|
|
||||||
 <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>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue