Improved code.
This commit is contained in:
parent
a5cfd2f8d5
commit
7e8aac7ec7
5 changed files with 70 additions and 21 deletions
|
@ -523,26 +523,7 @@ public class Federation extends PathPropertyList
|
|||
//
|
||||
for (Organization organization : getOrganizations())
|
||||
{
|
||||
result.add(organization.getContactURL());
|
||||
result.add(organization.getLegalURL());
|
||||
result.add(organization.getLogoURL());
|
||||
result.add(organization.getTechnicalGuideURL());
|
||||
result.add(organization.getUserGuideURL());
|
||||
result.add(organization.getWebsiteURL());
|
||||
|
||||
//
|
||||
for (Service service : organization.getServices())
|
||||
{
|
||||
result.add(service.getContactURL());
|
||||
result.add(service.getLegalURL());
|
||||
result.add(service.getLogoURL());
|
||||
result.add(service.getSoftwareWebsite());
|
||||
result.add(service.getSoftwareLicenseURL());
|
||||
result.add(service.getSoftwareSourceURL());
|
||||
result.add(service.getTechnicalGuideURL());
|
||||
result.add(service.getUserGuideURL());
|
||||
result.add(service.getWebsiteURL());
|
||||
}
|
||||
result.addAll(organization.getURLAll());
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -33,6 +33,7 @@ import fr.devinsy.statoolinfos.htmlize.charts.WeekValues;
|
|||
import fr.devinsy.statoolinfos.htmlize.charts.YearValues;
|
||||
import fr.devinsy.statoolinfos.properties.PathProperties;
|
||||
import fr.devinsy.statoolinfos.properties.PathPropertyList;
|
||||
import fr.devinsy.statoolinfos.uptime.URLSet;
|
||||
import fr.devinsy.statoolinfos.util.URLUtils;
|
||||
|
||||
/**
|
||||
|
@ -682,6 +683,34 @@ public class Organization extends PathPropertyList
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the URL all.
|
||||
*
|
||||
* @return the URL all
|
||||
*/
|
||||
public URLSet getURLAll()
|
||||
{
|
||||
URLSet result;
|
||||
|
||||
result = new URLSet();
|
||||
|
||||
result.add(getContactURL());
|
||||
result.add(getLegalURL());
|
||||
result.add(getLogoURL());
|
||||
result.add(getTechnicalGuideURL());
|
||||
result.add(getUserGuideURL());
|
||||
result.add(getWebsiteURL());
|
||||
|
||||
//
|
||||
for (Service service : getServices())
|
||||
{
|
||||
result.addAll(service.getURLAll());
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the user count.
|
||||
*
|
||||
|
|
|
@ -34,6 +34,7 @@ import fr.devinsy.statoolinfos.crawl.CrawlJournal;
|
|||
import fr.devinsy.statoolinfos.htmlize.charts.MonthValues;
|
||||
import fr.devinsy.statoolinfos.properties.PathProperties;
|
||||
import fr.devinsy.statoolinfos.properties.PathPropertyList;
|
||||
import fr.devinsy.statoolinfos.uptime.URLSet;
|
||||
import fr.devinsy.statoolinfos.util.URLUtils;
|
||||
|
||||
/**
|
||||
|
@ -779,6 +780,26 @@ public class Service extends PathPropertyList
|
|||
return result;
|
||||
}
|
||||
|
||||
public URLSet getURLAll()
|
||||
{
|
||||
URLSet result;
|
||||
|
||||
result = new URLSet();
|
||||
|
||||
result.add(getContactURL());
|
||||
result.add(getLegalURL());
|
||||
result.add(getLogoURL());
|
||||
result.add(getSoftwareWebsite());
|
||||
result.add(getSoftwareLicenseURL());
|
||||
result.add(getSoftwareSourceURL());
|
||||
result.add(getTechnicalGuideURL());
|
||||
result.add(getUserGuideURL());
|
||||
result.add(getWebsiteURL());
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* User count.
|
||||
*
|
||||
|
|
|
@ -12,7 +12,11 @@
|
|||
</head>
|
||||
<body>
|
||||
<div style="width:1150px; margin: 0 auto 0 auto;">
|
||||
<h2>Disponibilités</h2>
|
||||
<h2>Disponibilité des services</h2>
|
||||
<div style="margin-left: 0px; margin-bottom: 10px;">
|
||||
<a id="allButton" href="#all" class="button" onclick="javascript:setView('ALL');">Tout</a>
|
||||
<a id="shrunkButton" href="#shrunk" class="button" onclick="javascript:setView('SHRUNK');">Réduit</a>
|
||||
</div>
|
||||
|
||||
<div class="legend right" style="float: right; margin-top: -150px;">
|
||||
<div class="row">
|
||||
|
|
|
@ -59,6 +59,20 @@ public class URLSet implements Iterable<URL>
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the all.
|
||||
*
|
||||
* @param urls
|
||||
* the urls
|
||||
*/
|
||||
public void addAll(final URLSet urls)
|
||||
{
|
||||
for (URL url : urls)
|
||||
{
|
||||
add(url);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue