diff --git a/src/fr/devinsy/statoolinfos/core/Service.java b/src/fr/devinsy/statoolinfos/core/Service.java index 0355119..6d4aa54 100644 --- a/src/fr/devinsy/statoolinfos/core/Service.java +++ b/src/fr/devinsy/statoolinfos/core/Service.java @@ -42,7 +42,7 @@ public class Service extends PathPropertyList ALERT, ERROR, OVER, - UNKNOWN + VOID } private Organization organization; @@ -340,9 +340,9 @@ public class Service extends PathPropertyList String value = get("service.status", "service.status.level"); - if ((StringUtils.isBlank(value)) || (StringUtils.equals(value, "unknonw"))) + if ((StringUtils.isBlank(value)) || (StringUtils.equalsAnyIgnoreCase(value, "unknown", "void"))) { - result = Status.UNKNOWN; + result = Status.VOID; } else if (StringUtils.equalsAnyIgnoreCase(value, "ON", "OK")) { @@ -352,17 +352,17 @@ public class Service extends PathPropertyList { result = Status.ALERT; } - else if (StringUtils.equalsAnyIgnoreCase(value, "error", "KO", "broken")) + else if (StringUtils.equalsAnyIgnoreCase(value, "error", "ko", "broken", "off")) { result = Status.ERROR; } - else if (StringUtils.equalsAnyIgnoreCase(value, "over", "terminated", "closed")) + else if (StringUtils.equalsAnyIgnoreCase(value, "over", "terminated", "closed", "ended")) { result = Status.OVER; } else { - result = Status.UNKNOWN; + result = Status.VOID; } // @@ -384,11 +384,14 @@ public class Service extends PathPropertyList return result; } + /** + * @return + */ public String getTechnicalDocWebsite() { String result; - result = get("service.documentation.technical", "service.documentation.technical.url"); + result = get("service.documentation.technical", "service.documentationtechnical.url", "service.technical", "service.technical.url", "service.guide.technical", "service.guide.technical.url"); // return result; @@ -433,7 +436,10 @@ public class Service extends PathPropertyList { String result; - result = get("service.documentation.user", "service.documentation.user.url", "service.documentation.tutorial", "service.documentation.tutorial.url"); + result = get("service.documentation", "service.documentation.url", "service.documentation.user", "service.documentation.user.url", "service.documentation.tutorial", + "service.documentation.tutorial.url", + "service.guide.user", + "service.guide.user.url"); // return result; diff --git a/src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java b/src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java index 31ce855..a5ec22f 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java +++ b/src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java @@ -18,6 +18,7 @@ */ package fr.devinsy.statoolinfos.htmlize; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -73,6 +74,41 @@ public class ServiceListView data.setEscapedContent("serviceListLine", index, "serviceListLineSoftware", service.getSoftwareName()); data.setEscapedContent("serviceListLine", index, "serviceListLineDate", service.getCrawledDate().toString()); + data.setAttribute("serviceListLine", index, "serviceStatusImg", "src", "status-" + service.getStatus().toString().toLowerCase() + ".png"); + data.setAttribute("serviceListLine", index, "serviceStatusImg", "title", StringUtils.defaultIfBlank(service.getStatusDescription(), service.getStatus().toString())); + + if (StringUtils.isNotBlank(service.getLegalWebsite())) + { + data.setAttribute("serviceListLine", index, "legalLink", "href", service.getLegalWebsite()); + data.setAttribute("serviceListLine", index, "legalLinkImg", "class", ""); + data.getIdData("serviceListLine", index, "legalLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE); + } + if (StringUtils.isNotBlank(service.getContactWebsite())) + { + data.setAttribute("serviceListLine", index, "contactLink", "href", service.getContactWebsite()); + data.setAttribute("serviceListLine", index, "contactLinkImg", "class", ""); + data.getIdData("serviceListLine", index, "contactLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE); + } + if (StringUtils.isNotBlank(service.getContactEmail())) + { + data.setAttribute("serviceListLine", index, "emailLink", "href", "mailto:" + service.getContactEmail()); + data.setAttribute("serviceListLine", index, "emailLinkImg", "class", ""); + data.getIdData("serviceListLine", index, "emailLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE); + } + if (StringUtils.isNotBlank(service.getUserDocWebsite())) + { + data.setAttribute("serviceListLine", index, "userDocLink", "href", service.getUserDocWebsite()); + data.setAttribute("serviceListLine", index, "userDocLinkImg", "class", ""); + data.getIdData("serviceListLine", index, "userDocLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE); + } + if (StringUtils.isNotBlank(service.getTechnicalDocWebsite())) + { + data.setAttribute("serviceListLine", index, "technicalDocLink", "href", service.getTechnicalDocWebsite()); + data.setAttribute("serviceListLine", index, "technicalDocLinkImg", "class", ""); + data.getIdData("serviceListLine", index, "technicalDocLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE); + } + + // if (service.isRegistrationNone()) { data.setAttribute("serviceListLine", index, "serviceListLineRegistrationNoneImg", "class", "toto"); @@ -94,6 +130,29 @@ public class ServiceListView data.getIdData("serviceListLine", index, "serviceListLineRegistrationClientImg").getAttribute("class").setMode(DisplayMode.REPLACE); } + // + data.setContent("softwareName", StringUtils.defaultIfBlank(service.getSoftwareName(), "n/a")); + data.setContent("softwareVersion", StringUtils.defaultIfBlank(service.getSoftwareVersion(), "n/a")); + data.setContent("softwareLicenseName", StringUtils.defaultIfBlank(service.getSoftwareLicenseName(), "n/a")); + if (StringUtils.isNotBlank(service.getSoftwareWebsite())) + { + data.setAttribute("serviceListLine", index, "softwareWebsiteLink", "href", service.getSoftwareWebsite()); + data.setAttribute("serviceListLine", index, "softwareWebsiteLinkImg", "class", ""); + data.getIdData("serviceListLine", index, "softwareWebsiteLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE); + } + if (StringUtils.isNotBlank(service.getSoftwareLicenseWebpage())) + { + data.setAttribute("serviceListLine", index, "softwareLicenseLink", "href", service.getSoftwareLicenseWebpage()); + data.setAttribute("serviceListLine", index, "softwareLicenseLinkImg", "class", ""); + data.getIdData("serviceListLine", index, "softwareLicenseLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE); + } + if (StringUtils.isNotBlank(service.getSoftwareSourceWebsite())) + { + data.setAttribute("serviceListLine", index, "softwareSourceLink", "href", service.getSoftwareSourceWebsite()); + data.setAttribute("serviceListLine", index, "softwareSourceLinkImg", "class", ""); + data.getIdData("serviceListLine", index, "softwareSourceLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE); + } + index += 1; } diff --git a/src/fr/devinsy/statoolinfos/htmlize/ServicePage.java b/src/fr/devinsy/statoolinfos/htmlize/ServicePage.java index d25b01e..6a310e7 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/ServicePage.java +++ b/src/fr/devinsy/statoolinfos/htmlize/ServicePage.java @@ -91,12 +91,6 @@ public class ServicePage data.setAttribute("emailLinkImg", "class", ""); data.getIdData("emailLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE); } - if (StringUtils.isNotBlank(service.getContactEmail())) - { - data.setAttribute("contactDocLink", "href", service.getContactWebsite()); - data.setAttribute("contactDocLinkImg", "class", ""); - data.getIdData("contactDocLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE); - } if (StringUtils.isNotBlank(service.getUserDocWebsite())) { data.setAttribute("userDocLink", "href", service.getUserDocWebsite()); diff --git a/src/fr/devinsy/statoolinfos/htmlize/category.xhtml b/src/fr/devinsy/statoolinfos/htmlize/category.xhtml index b455054..99bc951 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/category.xhtml +++ b/src/fr/devinsy/statoolinfos/htmlize/category.xhtml @@ -11,15 +11,13 @@ -
-
-

Catégorie n/a

- -

Bla bla description

-
Logiciels : Bla bla logiciels
-
Nombre de services : n/a
-
-
+
+

Catégorie n/a

+ +

n/a

+
Logiciels : n/a
+
Nombre de services : n/a
+
diff --git a/src/fr/devinsy/statoolinfos/htmlize/organization.xhtml b/src/fr/devinsy/statoolinfos/htmlize/organization.xhtml index d7460c3..9503495 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/organization.xhtml +++ b/src/fr/devinsy/statoolinfos/htmlize/organization.xhtml @@ -11,17 +11,15 @@ -
-
-

Organization name

- -
- Raw -
-

Bla bla description

-
Nombre de services : n/a
+
+

Organization name

+ +
+ Raw
-
+

n/a

+
Nombre de services : n/a
+
diff --git a/src/fr/devinsy/statoolinfos/htmlize/service.xhtml b/src/fr/devinsy/statoolinfos/htmlize/service.xhtml index 069abc7..30c2111 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/service.xhtml +++ b/src/fr/devinsy/statoolinfos/htmlize/service.xhtml @@ -23,29 +23,29 @@
-
Date ouverture : n/a – Date fermeture : n/a – Statut :
-
+
Date ouverture : n/a – Date fermeture : n/a – Statut :
+ -
- Service : - - - - - - + -
+
diff --git a/src/fr/devinsy/statoolinfos/htmlize/serviceListView.xhtml b/src/fr/devinsy/statoolinfos/htmlize/serviceListView.xhtml index 0dd8f88..9ddd86e 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/serviceListView.xhtml +++ b/src/fr/devinsy/statoolinfos/htmlize/serviceListView.xhtml @@ -11,8 +11,8 @@ -
- +
+
@@ -20,19 +20,22 @@ + + + - - + - - - - - + + + + + + + + + + + diff --git a/src/fr/devinsy/statoolinfos/htmlize/services.xhtml b/src/fr/devinsy/statoolinfos/htmlize/services.xhtml index b9240cb..e8d6a58 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/services.xhtml +++ b/src/fr/devinsy/statoolinfos/htmlize/services.xhtml @@ -11,13 +11,12 @@ -
-
-

Tous les services

- -
Nombre de services : n/a
-
-
+
+

Tous les services

+ +
Nombre de services : n/a
+ +
diff --git a/src/fr/devinsy/statoolinfos/htmlize/stuff/statoolinfos.css b/src/fr/devinsy/statoolinfos/htmlize/stuff/statoolinfos.css index 51708a1..1fef7c4 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/stuff/statoolinfos.css +++ b/src/fr/devinsy/statoolinfos/htmlize/stuff/statoolinfos.css @@ -744,3 +744,30 @@ table > tfoot > tr > th.danger font-family: ITCAvantGardeStd-Md, Arial, Helvetica, sans-serif; text-decoration: none; } + +.content_infos img, +.content_infos a img +{ + width: 50px; + height: 50px; + padding-top:0; + padding-bottom: 0; + vertical-align: middle;" +} + +.td_icon_alone +{ + margin: 0 !important; + padding: 0 0 !important; + text-align: center; +} + +.td_icon_alone a img, +.td_icon_alone img +{ + width: 25px; + height: 25px; + padding: 0; + vertical-align: middle; +} +
Nom du serviceURL Logiciel Utilisateurs mensuelsStatut RegistrationLiensLogiciel Date
+
 n/a +  n/a @@ -41,17 +44,48 @@ n/a n/a n/a - + + + - + + + - + + - + + + + + + + + + + + + + + + + + + + + n/a