Added counter check button in service page. Improved organization one.
This commit is contained in:
parent
39ffde8632
commit
e4d122bbe4
4 changed files with 37 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2020 Christian Pierre MOMON <christian@momon.org>
|
||||
* Copyright (C) 2020-2021 Christian Pierre MOMON <christian@momon.org>
|
||||
*
|
||||
* This file is part of StatoolInfos, simple service statistics tool.
|
||||
*
|
||||
|
@ -29,6 +29,8 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
import fr.devinsy.catgenerator.core.BirdGenerator;
|
||||
import fr.devinsy.statoolinfos.HtmlizerContext;
|
||||
import fr.devinsy.statoolinfos.checker.PropertyChecker;
|
||||
import fr.devinsy.statoolinfos.checker.PropertyChecks;
|
||||
import fr.devinsy.statoolinfos.core.Metric;
|
||||
import fr.devinsy.statoolinfos.core.Organization;
|
||||
import fr.devinsy.statoolinfos.core.Service;
|
||||
|
@ -205,6 +207,23 @@ public class ServicePage
|
|||
data.getIdData("softwareSourceLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
|
||||
}
|
||||
|
||||
{
|
||||
try
|
||||
{
|
||||
PropertyChecker checker = new PropertyChecker();
|
||||
PropertyChecks checks = checker.checkService(service.getInputFile());
|
||||
data.setContent("errorCount", checks.getErrorCount());
|
||||
data.setContent("warningCount", checks.getWarningCount());
|
||||
data.setContent("voidCount", checks.getVoidCount());
|
||||
|
||||
data.setAttribute("alertLink", "href", organization.getTechnicalName() + "-" + service.getTechnicalName() + "-check.xhtml#alerts");
|
||||
}
|
||||
catch (IOException exception)
|
||||
{
|
||||
exception.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
int graphicIndex = 0;
|
||||
// data.setContent("fooChart", graphicIndex++,
|
||||
|
|
|
@ -34,11 +34,11 @@
|
|||
<a id="rawCheckLink" href="#"><img id="rawCheckLinkImg" src="circle-icons/clipboard-mono.svg" title="Fichier propriétés analysé"/></a>
|
||||
<a id="rawLink" href="#"><img id="rawLinkImg" src="circle-icons/document-mono.svg" title="Fichier propriétés"/></a>
|
||||
<a id="statsLink" href="#"><img id="statsLinkImg" src="circle-icons/barchart-mono.svg" title="Statistiques"/></a>
|
||||
<div style="display: inline-block; vertical-align: middle; font-size: smaller; margin-left: 2px;">
|
||||
<div style="display: inline-block; vertical-align: middle; font-size: smaller; margin-left: 2px; width: 35px;">
|
||||
<a id="alertLink" href="#" style="text-decoration: none;">
|
||||
<span id="errorCount" class="bg_error" style="padding: 0 10px;" title="Propriétés en erreurs">n/a</span><br/>
|
||||
<span id="warningCount" class="bg_warning" style="padding: 0 10px;" title="Propriétés attendues">n/a</span><br/>
|
||||
<span id="voidCount" class="bg_void" style="padding: 0 10px;" title="Propriétés Inconnues">n/a</span>
|
||||
<div id="errorCount" class="bg_error" style="padding: 0 10px;" title="Propriétés en erreurs">n/a</div>
|
||||
<div id="warningCount" class="bg_warning" style="padding: 0 10px;" title="Propriétés attendues">n/a</div>
|
||||
<div id="voidCount" class="bg_void" style="padding: 0 10px;" title="Propriétés Inconnues">n/a</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -87,6 +87,12 @@
|
|||
document.getElementById ('alertBlock').style.display = 'block';
|
||||
}
|
||||
}
|
||||
|
||||
document.body.onload = function()
|
||||
{
|
||||
if (window.location.href.endsWith("#alerts"))
|
||||
setView('ALERTS');
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -41,6 +41,13 @@
|
|||
<a id="rawCheckLink" href="#"><img id="rawCheckLinkImg" src="circle-icons/clipboard-mono.svg" title="Fichier propriétés analysé"/></a>
|
||||
<a id="rawLink" href="#"><img id="rawLinkImg" src="circle-icons/document-mono.svg" title="Fichier propriétés"/></a>
|
||||
<a id="statsLink" href="#"><img id="statsLinkImg" src="circle-icons/barchart-mono.svg" title="Statistiques"/></a>
|
||||
<div style="display: inline-block; vertical-align: middle; font-size: smaller; margin-left: 2px; width: 35px;">
|
||||
<a id="alertLink" href="#" style="text-decoration: none;">
|
||||
<div id="errorCount" class="bg_error" style="padding: 0 10px;" title="Propriétés en erreurs">n/a</div>
|
||||
<div id="warningCount" class="bg_warning" style="padding: 0 10px;" title="Propriétés attendues">n/a</div>
|
||||
<div id="voidCount" class="bg_void" style="padding: 0 10px;" title="Propriétés Inconnues">n/a</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content_infos" style="margin: 5px;">
|
||||
Logiciel :
|
||||
|
|
Loading…
Reference in a new issue