Fixes somes.
This commit is contained in:
parent
934fb35263
commit
0474353463
5 changed files with 19 additions and 8 deletions
|
@ -96,7 +96,7 @@ public class Organizations extends ArrayList<Organization>
|
||||||
{
|
{
|
||||||
Organizations result;
|
Organizations result;
|
||||||
|
|
||||||
result = sort(OrganizationComparator.Sorting.USER_COUNT);
|
result = sort(OrganizationComparator.Sorting.SERVICE_COUNT);
|
||||||
|
|
||||||
//
|
//
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -174,9 +174,12 @@ public class Crawler
|
||||||
// Crawl subs.
|
// Crawl subs.
|
||||||
PathProperties subs = properties.getByPrefix("subs");
|
PathProperties subs = properties.getByPrefix("subs");
|
||||||
for (PathProperty property : subs)
|
for (PathProperty property : subs)
|
||||||
|
{
|
||||||
|
if (StringUtils.isNotBlank(property.getValue()))
|
||||||
{
|
{
|
||||||
URL subUrl = new URL(property.getValue());
|
URL subUrl = new URL(property.getValue());
|
||||||
crawl(subUrl, cache);
|
crawl(subUrl, cache);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,13 +62,15 @@ public class FederationPage
|
||||||
data.setContent("serviceCount", federation.getServiceCount());
|
data.setContent("serviceCount", federation.getServiceCount());
|
||||||
|
|
||||||
int index = 0;
|
int index = 0;
|
||||||
for (Organization organization : federation.getOrganizations().sortByServiceCount())
|
for (Organization organization : federation.getOrganizations().sortByServiceCount().reverse())
|
||||||
{
|
{
|
||||||
data.setAttribute("organizationListLine", index, "organizationListLineNameLink", "href", organization.getTechnicalName() + ".xhtml");
|
data.setAttribute("organizationListLine", index, "organizationListLineNameLink", "href", organization.getTechnicalName() + ".xhtml");
|
||||||
data.setAttribute("organizationListLine", index, "organizationListLineLogo", "src", organization.getTechnicalName() + "-logo.png");
|
data.setAttribute("organizationListLine", index, "organizationListLineLogo", "src", organization.getTechnicalName() + "-logo.png");
|
||||||
data.setEscapedContent("organizationListLine", index, "organizationListLineNameValue", organization.getName());
|
data.setEscapedContent("organizationListLine", index, "organizationListLineNameValue", organization.getName());
|
||||||
|
|
||||||
data.setEscapedContent("organizationListLine", index, "organizationListLineUrlLink", organization.getWebsite());
|
data.setEscapedContent("organizationListLine", index, "organizationListLineUrlLink", organization.getWebsite());
|
||||||
data.setAttribute("organizationListLine", index, "organizationListLineUrlLink", "href", organization.getWebsite());
|
data.setAttribute("organizationListLine", index, "organizationListLineUrlLink", "href", organization.getWebsite());
|
||||||
|
|
||||||
data.setContent("organizationListLine", index, "organizationListLineServiceCount", organization.getServiceCount());
|
data.setContent("organizationListLine", index, "organizationListLineServiceCount", organization.getServiceCount());
|
||||||
|
|
||||||
index += 1;
|
index += 1;
|
||||||
|
|
|
@ -24,6 +24,7 @@ import org.slf4j.LoggerFactory;
|
||||||
import fr.devinsy.statoolinfos.core.Organization;
|
import fr.devinsy.statoolinfos.core.Organization;
|
||||||
import fr.devinsy.statoolinfos.core.Service;
|
import fr.devinsy.statoolinfos.core.Service;
|
||||||
import fr.devinsy.statoolinfos.core.StatoolInfosException;
|
import fr.devinsy.statoolinfos.core.StatoolInfosException;
|
||||||
|
import fr.devinsy.statoolinfos.core.StatoolInfosUtils;
|
||||||
import fr.devinsy.xidyn.XidynException;
|
import fr.devinsy.xidyn.XidynException;
|
||||||
import fr.devinsy.xidyn.data.TagDataManager;
|
import fr.devinsy.xidyn.data.TagDataManager;
|
||||||
import fr.devinsy.xidyn.presenters.PresenterUtils;
|
import fr.devinsy.xidyn.presenters.PresenterUtils;
|
||||||
|
@ -67,10 +68,12 @@ public class OrganizationPage
|
||||||
data.setAttribute("serviceListLine", index, "serviceListLineNameLink", "href", organization.getTechnicalName() + "-" + service.getTechnicalName() + ".xhtml");
|
data.setAttribute("serviceListLine", index, "serviceListLineNameLink", "href", organization.getTechnicalName() + "-" + service.getTechnicalName() + ".xhtml");
|
||||||
data.setAttribute("serviceListLine", index, "serviceListLineLogo", "src", organization.getTechnicalName() + "-" + service.getTechnicalName() + "-logo.png");
|
data.setAttribute("serviceListLine", index, "serviceListLineLogo", "src", organization.getTechnicalName() + "-" + service.getTechnicalName() + "-logo.png");
|
||||||
data.setEscapedContent("serviceListLine", index, "serviceListLineNameValue", service.getName());
|
data.setEscapedContent("serviceListLine", index, "serviceListLineNameValue", service.getName());
|
||||||
data.setEscapedContent("serviceListLine", index, "serviceListLineUrlLink", service.getWebsite());
|
|
||||||
data.setEscapedContent("serviceListLine", index, "serviceListLineWebsiteLink", service.getWebsite());
|
data.setEscapedContent("serviceListLine", index, "serviceListLineWebsiteLink", service.getWebsite());
|
||||||
data.setAttribute("serviceListLine", index, "serviceListLineWebsiteLink", "href", service.getWebsite());
|
data.setAttribute("serviceListLine", index, "serviceListLineWebsiteLink", "href", service.getWebsite());
|
||||||
data.setEscapedContent("serviceListLine", index, "serviceListLineSoftware", service.getSoftwareName());
|
|
||||||
|
data.setAttribute("serviceListLine", index, "serviceListLineSoftwareLink", "href", "software-" + StatoolInfosUtils.toTechnicalName(service.getSoftwareName()) + ".xhtml");
|
||||||
|
data.setEscapedContent("serviceListLine", index, "serviceListLineSoftwareValue", service.getSoftwareName());
|
||||||
|
|
||||||
index += 1;
|
index += 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
<div style="margin: 5px;">
|
<div style="margin: 5px;">
|
||||||
<a id="organizationRawButton" href="#" class="button">Raw</a>
|
<a id="organizationRawButton" href="#" class="button">Raw</a>
|
||||||
</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 class="left">
|
||||||
|
@ -39,7 +38,11 @@
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td id="serviceListLineWebsite"><a href="#" id="serviceListLineWebsiteLink">n/a</a></td>
|
<td id="serviceListLineWebsite"><a href="#" id="serviceListLineWebsiteLink">n/a</a></td>
|
||||||
<td id="serviceListLineSoftware" class="td_number">n/a</td>
|
<td id="serviceListLineSoftware">
|
||||||
|
<a href="#" id="serviceListLineSoftwareLink">
|
||||||
|
<span id="serviceListLineSoftwareValue">n/a</span>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td id="serviceListLineUserCount" class="td_number">n/a</td>
|
<td id="serviceListLineUserCount" class="td_number">n/a</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
Loading…
Reference in a new issue