Step in dev. Upgraded lib. Added lib.

This commit is contained in:
Christian P. MOMON 2020-09-15 03:16:26 +02:00
parent 41da9271c0
commit fddef5ad76
30 changed files with 1488 additions and 43 deletions

View file

@ -17,10 +17,11 @@
<classpathentry kind="lib" path="lib/Logs/slf4j-api-1.7.25.jar" sourcepath="lib/Logs/slf4j-api-1.7.25-sources.jar"/> <classpathentry kind="lib" path="lib/Logs/slf4j-api-1.7.25.jar" sourcepath="lib/Logs/slf4j-api-1.7.25-sources.jar"/>
<classpathentry kind="lib" path="lib/Logs/slf4j-log4j12-1.7.25.jar" sourcepath="lib/Logs/slf4j-log4j12-1.7.25-sources.jar"/> <classpathentry kind="lib" path="lib/Logs/slf4j-log4j12-1.7.25.jar" sourcepath="lib/Logs/slf4j-log4j12-1.7.25-sources.jar"/>
<classpathentry kind="lib" path="lib/UnitTesting/junit-4.12.jar" sourcepath="lib/UnitTesting/junit-4.12-sources.jar"/> <classpathentry kind="lib" path="lib/UnitTesting/junit-4.12.jar" sourcepath="lib/UnitTesting/junit-4.12-sources.jar"/>
<classpathentry kind="lib" path="lib/commons-lang3-3.7.jar" sourcepath="lib/commons-lang3-3.7-sources.jar"/>
<classpathentry kind="lib" path="lib/commons-cli-1.4.jar" sourcepath="lib/commons-cli-1.4-sources.jar"/> <classpathentry kind="lib" path="lib/commons-cli-1.4.jar" sourcepath="lib/commons-cli-1.4-sources.jar"/>
<classpathentry kind="lib" path="lib/commons-io-2.7.jar" sourcepath="lib/commons-io-2.7-sources.jar"/> <classpathentry kind="lib" path="lib/commons-io-2.7.jar" sourcepath="lib/commons-io-2.7-sources.jar"/>
<classpathentry kind="lib" path="lib/devinsy-strings-0.11.0.jar" sourcepath="lib/devinsy-strings-0.11.0-sources.zip"/> <classpathentry kind="lib" path="lib/devinsy-strings-0.11.0.jar" sourcepath="lib/devinsy-strings-0.11.0-sources.zip"/>
<classpathentry kind="lib" path="lib/xidyn-1.11.0.jar" sourcepath="lib/xidyn-1.11.0-sources.zip"/> <classpathentry kind="lib" path="lib/xidyn-1.11.1.jar" sourcepath="lib/xidyn-1.11.1-sources.zip"/>
<classpathentry kind="lib" path="lib/commons-lang3-3.11.jar" sourcepath="lib/commons-lang3-3.11-sources.jar"/>
<classpathentry kind="lib" path="lib/commons-text-1.9.jar" sourcepath="lib/commons-text-1.9-sources.jar"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>

View file

@ -0,0 +1,5 @@
XDOCLETBUILDERACTIVE=false
XDOCLETHOME=
XDOCLETUSEGLOBAL=true
XDOCLETVERSION=1.2.1
eclipse.preferences.version=1

Binary file not shown.

BIN
lib/commons-lang3-3.11.jar Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
lib/commons-text-1.9.jar Normal file

Binary file not shown.

View file

@ -282,6 +282,7 @@ public final class StatoolInfosCLI
catch (Exception exception) catch (Exception exception)
{ {
logger.error("Error with [{}]: {}", input.getAbsoluteFile(), exception.getMessage()); logger.error("Error with [{}]: {}", input.getAbsoluteFile(), exception.getMessage());
exception.printStackTrace();
} }
} }
} }

View file

@ -21,10 +21,14 @@ package fr.devinsy.statoolinfos.core;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import fr.devinsy.statoolinfos.properties.PathPropertyList;
import fr.devinsy.statoolinfos.properties.PathPropertyUtils;
/** /**
* The Class CrawlCache. * The Class CrawlCache.
*/ */
@ -62,21 +66,16 @@ public class CrawlCache
} }
} }
/** private File buildFile(final String url, final String additionalName)
* Builds the file.
*
* @param url
* the url
* @return the file
*/
private File buildFile(final String url)
{ {
File result; File result;
// result = new File(this.directory, DigestUtils.sha1Hex(url)); result = new File(this.directory, DigestUtils.md5Hex(url) + additionalName);
String normalizeUrl = StringUtils.removeAll(url, "^https*://").replace('/', '+'); // result = new File(this.directory, DigestUtils.sha1Hex(url));
result = new File(this.directory, normalizeUrl); // String normalizeUrl = StringUtils.removeAll(url,
// "^https*://").replace('/', '+');
// result = new File(this.directory, normalizeUrl);
// //
return result; return result;
@ -110,7 +109,7 @@ public class CrawlCache
{ {
PathPropertyList result; PathPropertyList result;
File file = buildFile(url); File file = buildFile(url, ".properties");
result = PathPropertyUtils.load(file); result = PathPropertyUtils.load(file);
@ -133,9 +132,16 @@ public class CrawlCache
{ {
File result; File result;
result = buildFile(url); if (StringUtils.startsWith(url, "http"))
{
result = buildFile(url, ".properties");
PathPropertyUtils.save(result, properties); PathPropertyUtils.save(result, properties);
}
else
{
result = null;
}
// //
return result; return result;

View file

@ -0,0 +1,150 @@
/*
* Copyright (C) 2020 Christian Pierre MOMON <christian@momon.org>
*
* This file is part of StatoolInfos, simple service statistics tool.
*
* StatoolInfos is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* StatoolInfos is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>.
*/
package fr.devinsy.statoolinfos.core;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.statoolinfos.properties.PathProperty;
import fr.devinsy.statoolinfos.properties.PathPropertyList;
/**
* The Class PathProperty.
*/
public class Factory
{
private static Logger logger = LoggerFactory.getLogger(Factory.class);
/**
* Instantiates a new factory.
*/
private Factory()
{
}
/**
* Load federation.
*
* @return the federation
* @throws StatoolInfosException
* @throws IOException
*/
public static Federation loadFederation(final PathPropertyList properties) throws StatoolInfosException, IOException
{
Federation result;
//
String crawlCachePath = properties.get("conf.crawl.cache");
logger.info("Cache setting: {}", properties.get("conf.crawl.cache"));
CrawlCache cache = new CrawlCache(new File(crawlCachePath));
result = new Federation(properties);
PathPropertyList section = result.getByPrefix("subs");
for (PathProperty property : section)
{
if (StringUtils.startsWith(property.getValue(), "http"))
{
URL url = new URL(property.getValue());
PathPropertyList subProperties = cache.load(property.getValue());
Organization organization = loadOrganization(subProperties);
result.getOrganizations().add(organization);
}
}
//
return result;
}
/**
* Load organization.
*
* @return the organization
* @throws StatoolInfosException
* @throws IOException
*/
public static Organization loadOrganization(final PathPropertyList properties) throws StatoolInfosException, IOException
{
Organization result;
//
String crawlCachePath = properties.get("conf.crawl.cache");
logger.info("Cache setting: {}", properties.get("conf.crawl.cache"));
CrawlCache cache = new CrawlCache(new File(crawlCachePath));
result = loadOrganization(properties, cache);
//
return result;
}
/**
* Load organization.
*
* @param properties
* the properties
* @param cache
* the cache
* @return the organization
* @throws IOException
*/
public static Organization loadOrganization(final PathPropertyList properties, final CrawlCache cache) throws IOException
{
Organization result;
result = new Organization(properties);
PathPropertyList section = result.getByPrefix("subs");
for (PathProperty property : section)
{
if (StringUtils.startsWith(property.getValue(), "http"))
{
PathPropertyList subProperties = cache.load(property.getValue());
Service service = loadService(subProperties);
result.getServices().add(service);
}
}
//
return result;
}
/**
* Load service.
*
* @return the service
*/
public static Service loadService(final PathPropertyList properties)
{
Service result;
result = new Service(properties);
//
return result;
}
}

View file

@ -0,0 +1,85 @@
/*
* Copyright (C) 2020 Christian Pierre MOMON <christian@momon.org>
*
* This file is part of StatoolInfos, simple service statistics tool.
*
* StatoolInfos is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* StatoolInfos is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>.
*/
package fr.devinsy.statoolinfos.core;
import fr.devinsy.statoolinfos.properties.PathPropertyList;
/**
* The Class PathProperty.
*/
public class Federation extends PathPropertyList
{
private static final long serialVersionUID = -8970835291634661580L;
private Organizations organizations;
/**
* Instantiates a new federation.
*/
public Federation()
{
super(null);
}
/**
* Instantiates a new federation.
*
* @param properties
* the properties
*/
public Federation(final PathPropertyList properties)
{
super(properties);
this.organizations = new Organizations();
}
/**
* Gets the description.
*
* @return the description
*/
public String getDescription()
{
String result;
result = get("service.description");
//
return result;
}
/**
* Gets the name.
*
* @return the name
*/
public String getName()
{
String result;
result = get("service.name");
//
return result;
}
public Organizations getOrganizations()
{
return this.organizations;
}
}

View file

@ -0,0 +1,95 @@
/*
* Copyright (C) 2020 Christian Pierre MOMON <christian@momon.org>
*
* This file is part of StatoolInfos, simple service statistics tool.
*
* StatoolInfos is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* StatoolInfos is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>.
*/
package fr.devinsy.statoolinfos.core;
import fr.devinsy.statoolinfos.properties.PathPropertyList;
/**
* The Class PathProperty.
*/
public class Organization extends PathPropertyList
{
private static final long serialVersionUID = -2709210934548224213L;
private Services services;
/**
* Instantiates a new organization.
*/
public Organization()
{
super(null);
}
/**
* Instantiates a new organization.
*
* @param properties
* the properties
*/
public Organization(final PathPropertyList properties)
{
super(properties);
this.services = new Services();
}
public String getDescription()
{
String result;
result = get("organization.description");
//
return result;
}
/**
* Gets the name.
*
* @return the name
*/
public String getName()
{
String result;
result = get("organization.name");
//
return result;
}
public Services getServices()
{
return this.services;
}
/**
* Gets the technical name.
*
* @return the technical name
*/
public String getTechnicalName()
{
String result;
result = getName().toLowerCase().replace("[^a-z_0-9]", "");
//
return result;
}
}

View file

@ -0,0 +1,37 @@
/*
* Copyright (C) 2020 Christian Pierre MOMON <christian@momon.org>
*
* This file is part of StatoolInfos, simple service statistics tool.
*
* StatoolInfos is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* StatoolInfos is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>.
*/
package fr.devinsy.statoolinfos.core;
import java.util.ArrayList;
/**
* The Class Organizations.
*/
public class Organizations extends ArrayList<Organization>
{
private static final long serialVersionUID = 2092235357983955170L;
/**
* Instantiates a new organizations.
*/
public Organizations()
{
super();
}
}

View file

@ -0,0 +1,103 @@
/*
* Copyright (C) 2020 Christian Pierre MOMON <christian@momon.org>
*
* This file is part of StatoolInfos, simple service statistics tool.
*
* StatoolInfos is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* StatoolInfos is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>.
*/
package fr.devinsy.statoolinfos.core;
import fr.devinsy.statoolinfos.properties.PathPropertyList;
/**
* The Class PathProperty.
*/
public class Service extends PathPropertyList
{
private static final long serialVersionUID = 3629841771102288863L;
/**
* Instantiates a new service.
*/
public Service()
{
super(null);
}
/**
* Instantiates a new service.
*
* @param properties
* the properties
*/
public Service(final PathPropertyList properties)
{
super(properties);
}
/**
* Gets the description.
*
* @return the description
*/
public String getDescription()
{
String result;
result = get("service.description");
//
return result;
}
/**
* Gets the name.
*
* @return the name
*/
public String getName()
{
String result;
result = get("service.name");
//
return result;
}
public String getSoftware()
{
String result;
result = get("software.name");
//
return result;
}
/**
* Gets the url.
*
* @return the url
*/
public String getURL()
{
String result;
result = get("service.website.url");
//
return result;
}
}

View file

@ -0,0 +1,37 @@
/*
* Copyright (C) 2020 Christian Pierre MOMON <christian@momon.org>
*
* This file is part of StatoolInfos, simple service statistics tool.
*
* StatoolInfos is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* StatoolInfos is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>.
*/
package fr.devinsy.statoolinfos.core;
import java.util.ArrayList;
/**
* The Class Services.
*/
public class Services extends ArrayList<Service>
{
private static final long serialVersionUID = -6288956439933064467L;
/**
* Instantiates a new services.
*/
public Services()
{
super();
}
}

View file

@ -21,12 +21,19 @@ package fr.devinsy.statoolinfos.core;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.net.URL; import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import fr.devinsy.statoolinfos.htmlize.OrganizationPage;
import fr.devinsy.statoolinfos.properties.PathProperty;
import fr.devinsy.statoolinfos.properties.PathPropertyList;
import fr.devinsy.statoolinfos.properties.PathPropertyUtils;
/** /**
* The Class StatoolInfos. * The Class StatoolInfos.
*/ */
@ -224,24 +231,23 @@ public class StatoolInfos
*/ */
public static void htmlize(final File input) throws StatoolInfosException, IOException public static void htmlize(final File input) throws StatoolInfosException, IOException
{ {
PathPropertyList inputProperties = PathPropertyUtils.load(input); PathPropertyList properties = PathPropertyUtils.load(input);
String crawlCachePath = inputProperties.get("conf.crawl.cache"); String className = properties.get("conf.class");
logger.info("Cache setting: {}", inputProperties.get("conf.crawl.cache"));
CrawlCache cache = new CrawlCache(new File(crawlCachePath));
String className = inputProperties.get("conf.class");
if (StringUtils.equals(className, "federation")) if (StringUtils.equals(className, "federation"))
{ {
htmlizeFederation(inputProperties, cache); Federation federation = Factory.loadFederation(properties);
htmlizeFederation(federation);
} }
else if (StringUtils.equals(className, "organization")) else if (StringUtils.equals(className, "organization"))
{ {
htmlizeOrganization(inputProperties, cache); Organization organization = Factory.loadOrganization(properties);
htmlizeOrganization(organization);
} }
else if (StringUtils.equals(className, "service")) else if (StringUtils.equals(className, "service"))
{ {
htmlizeService(inputProperties, cache); Service service = Factory.loadService(properties);
htmlizeService(service);
} }
else else
{ {
@ -257,28 +263,67 @@ public class StatoolInfos
* @param cache * @param cache
* the cache * the cache
*/ */
public static void htmlizeFederation(final PathPropertyList federation, final CrawlCache cache) private static void htmlizeFederation(final PathPropertyList federation)
{ {
} }
public static void htmlizeOrganization(final PathPropertyList federation, final CrawlCache cache) /**
* Htmlize organization.
*
* @param federation
* the federation
* @param targetDirectory
* the target directory
* @throws IOException
* @throws StatoolInfosException
*/
private static void htmlizeOrganization(final Organization organization) throws IOException, StatoolInfosException
{ {
// Copy commons files (index, images, favicon, css). File targetDirectory = new File(organization.get("conf.htmlize.directory"));
logger.info("Htmlize target directory: {}", targetDirectory.getAbsoluteFile());
// Download federation stuff (favicon, logo). if (!targetDirectory.exists())
// Build the federation page. {
throw new IllegalArgumentException("Htmlize target directory is missing.");
}
else if (!targetDirectory.isDirectory())
{
throw new IllegalArgumentException("Htmlize target directory is not a directory.");
}
else
{
// Copy commons files (index, images, favicon, css).
if (!new File(targetDirectory, "index.html").exists())
{
FileUtils.copyURLToFile(StatoolInfos.class.getResource("/fr/devinsy/statoolinfos/htmlize/stuff/index.html"), new File(targetDirectory, "index.html"));
FileUtils.copyURLToFile(StatoolInfos.class.getResource("/fr/devinsy/statoolinfos/htmlize/stuff/statoolinfos.css"), new File(targetDirectory, "statoolinfos.css"));
FileUtils.copyURLToFile(StatoolInfos.class.getResource("/fr/devinsy/statoolinfos/htmlize/stuff/Chart.bundle.min.js"), new File(targetDirectory, "Chart.bundle.min.js"));
}
// For each organization //
// Download organization stuff (favicon, logo). String page = OrganizationPage.build(organization);
// Build organization page. FileUtils.write(new File(targetDirectory, organization.getTechnicalName() + ".xhtml"), page, StandardCharsets.UTF_8);
// for each service
// Download service stuff (favicon, logo).
// Build service page.
// Download federation stuff (favicon, logo).
// Build the federation page.
// For each organization
// Download organization stuff (favicon, logo).
// Build organization page.
// for each service
// Download service stuff (favicon, logo).
// Build service page.
}
} }
public static void htmlizeService(final PathPropertyList federation, final CrawlCache cache) /**
* Htmlize service.
*
* @param federation
* the federation
*/
private static void htmlizeService(final PathPropertyList federation)
{ {
} }

View file

@ -0,0 +1,90 @@
/*
* Copyright (C) 2020 Christian Pierre MOMON <christian@momon.org>
*
* This file is part of StatoolInfos, simple service statistics tool.
*
* StatoolInfos is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* StatoolInfos is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>.
*/
package fr.devinsy.statoolinfos.htmlize;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Locale;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.Service;
import fr.devinsy.statoolinfos.core.StatoolInfosException;
import fr.devinsy.xidyn.XidynException;
import fr.devinsy.xidyn.data.TagDataManager;
import fr.devinsy.xidyn.presenters.PresenterUtils;
import utils.BuildInformation;
/**
* The Class OrganizationPage.
*/
public class OrganizationPage
{
private static Logger logger = LoggerFactory.getLogger(OrganizationPage.class);
/**
* Builds the.
*
* @param organization
* the organization
* @return the string
* @throws StatoolInfosException
* the statool infos exception
*/
public static String build(final Organization organization) throws StatoolInfosException
{
String result;
try
{
logger.debug("Building organization page {}…", organization.get("organization.name"));
TagDataManager data = new TagDataManager();
data.setContent("versionsup", BuildInformation.instance().version());
data.setContent("lastUpdateDate", LocalDateTime.now().format(DateTimeFormatter.ofPattern("dd/MM/yyyy HH':'mm", Locale.FRANCE)));
data.setEscapedContent("organizationName", organization.get("organization.name"));
data.setEscapedContent("organizationDescription", organization.get("organization.description"));
data.setContent("serviceCount", organization.getServices().size());
int index = 0;
for (Service service : organization.getServices())
{
data.setEscapedContent("serviceListLine", index, "serviceListLineName", service.getName());
data.setEscapedContent("serviceListLine", index, "serviceListLineUrlLink", service.getURL());
data.setAttribute("serviceListLine", index, "serviceListLineUrlLink", "href", service.getURL());
data.setEscapedContent("serviceListLine", index, "serviceListLineSoftware", service.getSoftware());
index += 1;
}
result = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/organization.xhtml", data).toString();
}
catch (XidynException exception)
{
throw new StatoolInfosException("Error building organization page: " + exception.getMessage(), exception);
}
//
return result;
}
}

View file

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>StatoolInfos</title>
<meta charset="UTF-8" />
<meta content="statoolinfos" name="keywords" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="statoolinfos.css" />
<script src="sorttable.js" />
<script src="Chart.bundle.min.js"></script>
</head>
<body>
<div style="margin: 5px 10px 10px 10px;">
<h1><a href="index.xhtml">StatoolInfos</a><sup id="versionsup" style="font-size: 9px;">v0.0.14</sup> <a href="about.xhtml">About</a><span style="font-size: 9px; float: right;">Page updated on<br/><span id="lastUpdateDate" style="font-size: 9px;">xx/xx/xxxx xx:xx</span></span></h1>
<h2 id="organizationName">Organization name</h2>
<p id="organizationDescription">Bla bla description</p>
<div>Nombre de services : <span id="serviceCount">n/a</span></div>
<div>
<table class="table_classic">
<tr>
<th class="">Nom du service</th>
<th class="">URL</th>
<th class="">Logiciel</th>
</tr>
<tr id="serviceListLine">
<td id="serviceListLineName">n/a</td>
<td id="serviceListLineUrl"><a href="#" id="serviceListLineUrlLink">n/a</a></td>
<td id="serviceListLineSoftware">n/a</td>
</tr>
</table>
</div>
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Redirection</title>
<meta charset="UTF-8" />
<meta http-equiv="Refresh" content="0;URL=index.xhtml">
</head>
<body>
</body>
</html>

View file

@ -0,0 +1,718 @@
/*
____ _ _ _ ___ __
/ ___|| |_ __ _| |_ ___ ___ | |_ _|_ __ / _| ___ ___
\___ \| __/ _` | __/ _ \ / _ \| || || '_ \| |_ / _ \/ __|
___) | || (_| | || (_) | (_) | || || | | | _| (_) \__ \
|____/ \__\__,_|\__\___/ \___/|_|___|_| |_|_| \___/|___/
*/
table
{
font-size: 0.9em;
}
.tablesubtitle
{
font-size: 0.8em;
}
/**************** GENERAL SETTINGS ****************/
*
{
margin:0px;
padding:0px;
color:#2e2d30;
font-family:Arial, Helvetica, sans-serif;
}
p
{
margin-bottom: 10px;
margin-top: 10px;
}
hr
{
border:dashed #CCC 1px;
border-bottom:0px;
border-left:0px;
width:100%;
margin: 10px 2px;
padding: 0px 5px;
}
ul, ol
{
margin-left:30px;
}
/***** GENERIC Titles ******/
h1.big
{
font-size:45px;/** titre intro **/
}
h1,
h1 a,
h1 span,
h1 sup
{
color:#0084FF;
font-size:28px;
padding-top:5px;
padding-bottom:10px;
font-family: ITCAvantGardeStd-Md, Arial, Helvetica, sans-serif;
font-weight:normal;
text-decoration: none;
}
h2,
h2 a,
h2 span
{
font-family: ITCAvantGardeStd-Md, Arial, Helvetica, sans-serif;
font-weight:normal;
color:#0084FF;
font-size:20px;
margin-top:30px;
margin-bottom:20px;
text-decoration: none;
}
h3,
h3 a,
h3 span
{
color:#0084FF;
font-weight:normal;
font-size:15px;
margin-top:10px;
font-family: ITCAvantGardeStd-Md, Arial, Helvetica, sans-serif;
text-decoration: none;
}
/**************** GENERIC COMPOSANTS ****************/
.count
{
color:#f9b536;
font-family:Arial, Helvetica, sans-serif;
font-weight:bold;
font-size:25px;
display:block;
}
.datehour
{
font-style:italic;
font-size:11px;
color:#666;
margin-right:10px;
}
.left
{
text-align: left;
}
/* Used to set width cell in table as narrower as possible. */
.narrower
{
width: 10px;
}
.center
{
text-align: center;
}
.right
{
text-align: right;
}
.italic
{
font-style: italic;
}
.underline
{
text-decoration: underline;
}
.bold
{
font-weight: bold;
}
.unresizable
{
resize: none;
}
.shift_right
{
/* Useful with second button */
display:inline-block;
float:right;"
}
.without
{
list-style-type:none;
}
.background_green
{
background-color: #dff0d8;
}
.background_yellow
{
background-color: #fffbbb;
}
.background_orange
{
background-color: #FFCBA4;
}
.background_red
{
background-color: red;
}
.caution
{
background-color: #fffbbb;
}
.warning
{
background-color: #f58e1c;
}
.alert,
.redalert
{
background-color: red;
}
/***** GENERIC COLUMNS *****/
.row
{
display: block;
}
.row:after
{
clear: both;
content: ".";
display: block;
height: 0;
visibility: hidden;
}
.column {
display: inline;
float: left;
}
/***** GENERIC BUTTONS *****/
/*******/
.button
{
background-color: #e7e7e7;
border: none;
color: black;
padding: 4px 15px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
width: 90px;
}
.button:hover
{
font-weight: bold;
}
.unselected
{
background-color: #e7e7e7;
color: black;
}
.selected
{
background-color: #008CBA;
color: white;
}
/******/
/* The switch - the box around the slider */
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}
/* Hide default HTML checkbox */
.switch input {
opacity: 0;
width: 0;
height: 0;
}
/* The slider */
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
input:checked + .slider {
background-color: #2196F3;
}
input:focus + .slider {
box-shadow: 0 0 1px #2196F3;
}
input:checked + .slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
}
/* Rounded sliders */
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}
/***** GENERIC TABLES *****/
table a
{
text-decoration:none;
}
.center_table
{
margin-left: auto;
margin-right: auto;
}
.td_number
{
text-align: right;
/*width: 75px;*/
}
.first_column_valign_top > tr > td:first-child
{
vertical-align: top;
}
table > thead > tr.active > td,
table > thead > tr.active > th,
table > thead > tr > td.active,
table > thead > tr > th.active,
table > tbody > tr.active > td,
table > tbody > tr.active > th,
table > tbody > tr > td.active,
table > tr > td.active,
table > tbody > tr > th.active,
table > tr > th.active,
table > tfoot > tr.active > td,
table > tfoot > tr.active > th,
table > tfoot > tr > td.active,
table > tfoot > tr > th.active
{
background-color: #e5e5e5;
}
table > thead > tr.comment > td,
table > thead > tr.comment > th,
table > thead > tr > td.comment,
table > thead > tr > th.comment,
table > tbody > tr.comment > td,
table > tbody > tr.comment > th,
table > tbody > tr > td.comment,
table > tr > td.comment,
table > tbody > tr > th.comment,
table > tr > th.comment,
table > tfoot > tr.comment > td,
table > tfoot > tr.comment > th,
table > tfoot > tr > td.comment,
table > tfoot > tr > th.comment
{
background-color: #ececec;
}
table > thead > tr.info > td,
table > thead > tr.info > th,
table > thead > tr > td.info,
table > thead > tr > th.info,
table > tbody > tr.info > td,
table > tbody > tr.info > th,
table > tbody > tr > td.info,
table > tr > td.info,
table > tbody > tr > th.info,
table > tr > th.info,
table > tfoot > tr.info > td,
table > tfoot > tr.info > th,
table > tfoot > tr > td.info,
table > tfoot > tr > th.info
{
background-color: #d9edf7;
}
table > thead > tr.success > td,
table > thead > tr.success > th,
table > thead > tr > td.success,
table > thead > tr > th.success,
table > tbody > tr.success > td,
table > tbody > tr.success > th,
table > tbody > tr > td.success,
table > tr > td.success,
table > tbody > tr > th.success,
table > tr > th.success,
table > tfoot > tr.success > td,
table > tfoot > tr.success > th,
table > tfoot > tr > td.success,
table > tfoot > tr > th.success
{
background-color: #dff0d8;
}
table > thead > tr.caution > td,
table > thead > tr.caution > th,
table > thead > tr > td.caution,
table > thead > tr > th.caution,
table > tbody > tr.caution > td,
table > tbody > tr.caution > th,
table > tbody > tr > td.caution,
table > tr > td.caution,
table > tbody > tr > th.caution,
table > tr > th.caution,
table > tfoot > tr.caution > td,
table > tfoot > tr.caution > th,
table > tfoot > tr > td.caution,
table > tfoot > tr > th.caution
{
background-color: #fffbbb;
}
table > thead > tr.warning > td,
table > thead > tr.warning > th,
table > thead > tr > td.warning,
table > thead > tr > th.warning,
table > tbody > tr.warning > td,
table > tbody > tr.warning > th,
table > tbody > tr > td.warning,
table > tr > td.warning,
table > tbody > tr > th.warning,
table > tr > th.warning,
table > tfoot > tr.warning > td,
table > tfoot > tr.warning > th,
table > tfoot > tr > td.warning,
table > tfoot > tr > th.warning
{
background-color: ##f58e1c;
}
table > thead > tr.alert > td,
table > thead > tr.alert > th,
table > thead > tr > td.alert,
table > thead > tr > th.alert,
table > tbody > tr.alert > td,
table > tbody > tr.alert > th,
table > tbody > tr > td.alert,
table > tr > td.alert,
table > tbody > tr > th.alert,
table > tr > th.alert,
table > tfoot > tr.alert > td,
table > tfoot > tr.alert > th,
table > tfoot > tr > td.alert,
table > tfoot > tr > th.alert
{
background-color: red;
}
table > thead > tr.danger > td,
table > thead > tr.danger > th,
table > thead > tr > td.danger,
table > thead > tr > th.danger,
table > tbody > tr.danger > td,
table > tbody > tr.danger > th,
table > tbody > tr > td.danger,
table > tr > td.danger,
table > tbody > tr > th.danger,
table > tr > th.danger,
table > tfoot > tr.danger > td,
table > tfoot > tr.danger > th,
table > tfoot > tr > td.danger,
table > tfoot > tr > th.danger
{
background-color: #ff0000;
}
/*******/
.hovertable > tbody > tr.active:hover > td,
.hovertable > tbody > tr.active:hover > th,
.hovertable > tbody > tr:hover > .active,
.hovertable > tbody > tr > td.active:hover,
.hovertable > tbody > tr > th.active:hover,
.hovertable > tr.active:hover > td,
.hovertable > tr.active:hover > th,
.hovertable > tr:hover > .active,
.hovertable > tr > td.active:hover,
.hovertable > tr > th.active:hover
{
background-color: #d5d5d5;
}
.hovertable > tbody > tr.info:hover > td,
.hovertable > tbody > tr.info:hover > th,
.hovertable > tbody > tr:hover > .info,
.hovertable > tbody > tr > td.info:hover,
.hovertable > tbody > tr > th.info:hover,
.hovertable > tr.info:hover > td,
.hovertable > tr.info:hover > th,
.hovertable > tr:hover > .info,
.hovertable > tr > td.info:hover,
.hovertable > tr > th.info:hover
{
background-color: #d0e0f0;
}
.hovertable > tbody > tr.success:hover > td,
.hovertable > tbody > tr.success:hover > th,
.hovertable > tbody > tr:hover > .success,
.hovertable > tbody > tr > td.success:hover,
.hovertable > tbody > tr > th.success:hover,
.hovertable > tr.success:hover > td,
.hovertable > tr.success:hover > th,
.hovertable > tr:hover > .success,
.hovertable > tr > td.success:hover,
.hovertable > tr > th.success:hover
{
background-color: #d0e9c6;
}
.hovertable > tbody > tr.warning:hover > td,
.hovertable > tbody > tr.warning:hover > th,
.hovertable > tbody > tr:hover > .warning,
.hovertable > tbody > tr > td.warning:hover,
.hovertable > tbody > tr > th.warning:hover,
.hovertable > tr.warning:hover > td,
.hovertable > tr.warning:hover > th,
.hovertable > tr:hover > .warning,
.hovertable > tr > td.warning:hover,
.hovertable > tr > th.warning:hover
{
background-color: #eae5c3;
}
.hovertable > tbody > tr.alert:hover > td,
.hovertable > tbody > tr.alert:hover > th,
.hovertable > tbody > tr:hover > .alert,
.hovertable > tbody > tr > td.alert:hover,
.hovertable > tbody > tr > th.alert:hover,
.hovertable > tr.alert:hover > td,
.hovertable > tr.alert:hover > th,
.hovertable > tr:hover > .alert,
.hovertable > tr > td.alert:hover,
.hovertable > tr > th.alert:hover
{
background-color: #f0bb94;
}
.hovertable > tbody > tr.danger:hover > td,
.hovertable > tbody > tr.danger:hover > th,
.hovertable > tbody > tr:hover > .danger,
.hovertable > tbody > tr > td.danger:hover,
.hovertable > tbody > tr > th.danger:hover,
.hovertable > tr.danger:hover > td,
.hovertable > tr.danger:hover > th,
.hovertable > tr:hover > .danger,
.hovertable > tr > td.danger:hover,
.hovertable > tr > th.danger:hover
{
background-color: #e00000;
}
/*******/
.table_default {
border-spacing:0px;
border-collapse:collapse;
width:100%;
}
.table_default > tr > th,
.table_default > thead > tr > th,
.table_default > tbody > tr > th {
background-color:;
border-collapse:collapse;
text-align:left;
font-weight:bold;
padding:5px;
font-size:13px;
background:url("/charter/line.png") #D9DADB right no-repeat;
}
.table_default > tr:hover,
.table_default > tbody > tr:hover {
background-color:#ECECEC;
}
.table_default > tr > td,
.table_default > tbody > tr > td {
vertical-align:top;
padding:5px;
margin-top:15px;
margin-bottom:15px;
}
/*******/
.table_classic {
border:0px;
width:100%;
margin: 0;
border-collapse: collapse;
}
.table_classic > tr > th,
.table_classic > thead > tr > th,
.table_classic > tbody > tr > th {
background-color:#ECECEC;
border:1px solid #DCDCDC;
margin: 5px;
padding: 5px;
}
.table_classic > tr > td,
.table_classic > tbody > tr > td,
.table_classic > tfoot > tr > td {
border:1px solid #ECECEC;
margin: 5px;
padding: 5px;
}
.table_classic > tr:hover,
.table_classic > tbody > tr:hover {
background-color:#ECECEC;
}
/*******/
.table_glued {
border:0px;
width:100%;
border-collapse: collapse;
}
.table_glued > tr > th,
.table_glued > tbody > tr > th {
background-color:#ECECEC;
border:0px;
}
.table_glued > tr > td,
.table_glued > tbody > tr > td {
border:1px solid #ECECEC;
}
/*******/
.table_simple {
border: 0px solid red;
border-spacing: 0px;
border-collapse: collapse;
width: 100%;
margin: 0;
padding: 0;
}
.table_simple > tr > th,
.table_simple > tbody > tr > th {
color: #2e2d30;
border: 0px none red;
border-collapse: collapse;
border-spacing: 0;
text-align: left;
font-weight: 550;
margin: 0;
padding-top: 3px;
padding-bottom: 3px;
padding-right: 5px;
font-size: 13px;
vertical-align: top;
}
.table_simple > tr,
.table_simple > tbody > tr {
border: 0px none red;
border-collapse: collapse;
border-spacing: 0;
}
.table_simple > tr:hover,
.table_simple > tbody > tr:hover {
background-color: #d9dadb;
}
.table_simple > tr > td,
.table_simple > tbody > tr > td {
vertical-align: top;
padding-top: 3px;
padding-bottom: 3px;
margin: 0px;
border: 0px none red;
border-spacing: 0;
border-collapse: collapse;
color: #6f6e60; /* #2e2d30; */
}

View file

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>. * along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>.
*/ */
package fr.devinsy.statoolinfos.core; package fr.devinsy.statoolinfos.properties;
import fr.devinsy.strings.StringList; import fr.devinsy.strings.StringList;
import fr.devinsy.strings.StringSet; import fr.devinsy.strings.StringSet;
@ -24,7 +24,7 @@ import fr.devinsy.strings.StringSet;
/** /**
* The Interface PathProperties. * The Interface PathProperties.
*/ */
interface PathProperties public interface PathProperties
{ {
/** /**
* Gets the. * Gets the.

View file

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>. * along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>.
*/ */
package fr.devinsy.statoolinfos.core; package fr.devinsy.statoolinfos.properties;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -78,4 +78,20 @@ public class PathProperty
{ {
this.value = value; this.value = value;
} }
/**
* To string.
*
* @return the string
*/
@Override
public String toString()
{
String result;
result = "(" + this.path + "," + this.value + ")";
//
return result;
}
} }

View file

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>. * along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>.
*/ */
package fr.devinsy.statoolinfos.core; package fr.devinsy.statoolinfos.properties;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;

View file

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>. * along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>.
*/ */
package fr.devinsy.statoolinfos.core; package fr.devinsy.statoolinfos.properties;
import java.util.Hashtable; import java.util.Hashtable;

View file

@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>. * along with StatoolInfos. If not, see <http://www.gnu.org/licenses/>.
*/ */
package fr.devinsy.statoolinfos.core; package fr.devinsy.statoolinfos.properties;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.File; import java.io.File;