Commit 2bed39f3d50d11d84db42263007bf6325142d594

Authored by 96409975520
1 parent d29944c4
Exists in master

Correções para o suporte ao Azure.

src/main/java/br/com/ases/controller/AvaliacaoController.java
@@ -331,6 +331,8 @@ public class AvaliacaoController { @@ -331,6 +331,8 @@ public class AvaliacaoController {
331 url = "http://" + url; 331 url = "http://" + url;
332 332
333 WebChecker pagina = WebChecker.from(url).withGetRequest().execute(); 333 WebChecker pagina = WebChecker.from(url).withGetRequest().execute();
  334 +
  335 +
334 336
335 int[] errorsWarningsCss = avaliacaoBusiness.getErrorCount(true, url); 337 int[] errorsWarningsCss = avaliacaoBusiness.getErrorCount(true, url);
336 int[] errorsWarningsHtml = avaliacaoBusiness.getErrorCount(false, url); 338 int[] errorsWarningsHtml = avaliacaoBusiness.getErrorCount(false, url);
@@ -509,6 +511,7 @@ public class AvaliacaoController { @@ -509,6 +511,7 @@ public class AvaliacaoController {
509 novaChave = "contentLenght" + chaveAvaliacao; 511 novaChave = "contentLenght" + chaveAvaliacao;
510 String contentLenght = 512 String contentLenght =
511 (String) VRaptorRequestHolder.currentRequest().getServletContext().getAttribute(novaChave); 513 (String) VRaptorRequestHolder.currentRequest().getServletContext().getAttribute(novaChave);
  514 +
512 this.sumarizarResultasNoResponse(checkerList, result); 515 this.sumarizarResultasNoResponse(checkerList, result);
513 516
514 // ================================================ GERAR RELAT�RIO 517 // ================================================ GERAR RELAT�RIO
@@ -575,6 +578,8 @@ public class AvaliacaoController { @@ -575,6 +578,8 @@ public class AvaliacaoController {
575 ManagerReport managerReport = 578 ManagerReport managerReport =
576 new ManagerReport(this.application.getRealPath("") 579 new ManagerReport(this.application.getRealPath("")
577 + "/WEB-INF/templates-relatorios/relatorio-avaliacao.jrxml"); 580 + "/WEB-INF/templates-relatorios/relatorio-avaliacao.jrxml");
  581 +
  582 +
578 String path = null; 583 String path = null;
579 584
580 try { 585 try {
@@ -925,8 +930,10 @@ public class AvaliacaoController { @@ -925,8 +930,10 @@ public class AvaliacaoController {
925 930
926 ManagerReport managerReport = 931 ManagerReport managerReport =
927 new ManagerReport(this.application.getRealPath("") 932 new ManagerReport(this.application.getRealPath("")
928 - + "/WEB-INF/templates-relatorios/relatorio-detalhes-avaliacao.jrxml"); 933 + + "/WEB-INF/templates-relatorios/relatorio-detalhes-avaliacao.jrxml");
929 934
  935 +
  936 +
930 String path = null; 937 String path = null;
931 938
932 try { 939 try {
@@ -960,8 +967,7 @@ public class AvaliacaoController { @@ -960,8 +967,7 @@ public class AvaliacaoController {
960 967
961 @Get("/servico-avaliacao-acessibilidade-salvando") 968 @Get("/servico-avaliacao-acessibilidade-salvando")
962 @Post("/servico-avaliacao-acessibilidade-salvando") 969 @Post("/servico-avaliacao-acessibilidade-salvando")
963 - public void servicoAvaliacaoAcessibilidadeSalvando(@QueryParam("url") String url,  
964 - String codigoHash) { 970 + public void servicoAvaliacaoAcessibilidadeSalvando(@QueryParam("url") String url) {
965 971
966 Boolean retornoNota = false; 972 Boolean retornoNota = false;
967 ErroWs erroWs = new ErroWs(); 973 ErroWs erroWs = new ErroWs();
@@ -974,7 +980,7 @@ public class AvaliacaoController { @@ -974,7 +980,7 @@ public class AvaliacaoController {
974 980
975 if (validate.url(url)) { 981 if (validate.url(url)) {
976 982
977 - if (url.startsWith("www")) { 983 + if (!url.startsWith("http")) {
978 url = "http://" + url; 984 url = "http://" + url;
979 } 985 }
980 986
src/main/java/br/com/ases/model/utilities/ManagerReport.java
@@ -37,16 +37,19 @@ public class ManagerReport { @@ -37,16 +37,19 @@ public class ManagerReport {
37 } 37 }
38 38
39 public String gerarRelatorio(List list, HashMap<String, Object> map, int tipoRelatorio, String fileName) throws JRException, IOException{ 39 public String gerarRelatorio(List list, HashMap<String, Object> map, int tipoRelatorio, String fileName) throws JRException, IOException{
40 - 40 + System.out.println("erro_01");
  41 +
41 JasperReport report = JasperCompileManager.compileReport(this.pathTemplate); 42 JasperReport report = JasperCompileManager.compileReport(this.pathTemplate);
42 - 43 + System.out.println("erro_02");
  44 +
43 JasperPrint print = JasperFillManager.fillReport(report, map,new JRBeanCollectionDataSource( 45 JasperPrint print = JasperFillManager.fillReport(report, map,new JRBeanCollectionDataSource(
44 this.criterioOrdenacao(Ordenacao.ordenarLista(this.carregarBean(list),null, true))) 46 this.criterioOrdenacao(Ordenacao.ordenarLista(this.carregarBean(list),null, true)))
45 ); 47 );
46 - 48 + System.out.println("erro_03");
  49 +
47 List listOrdenado = this.criterioOrdenacao(Ordenacao.ordenarLista(this.carregarBean(list),null, true)); 50 List listOrdenado = this.criterioOrdenacao(Ordenacao.ordenarLista(this.carregarBean(list),null, true));
48 //JasperPrint print = JasperFillManager.fillReport(report, map,new JRBeanCollectionDataSource(Ordenacao.ordenarLista(this.carregarBean(list),null))); 51 //JasperPrint print = JasperFillManager.fillReport(report, map,new JRBeanCollectionDataSource(Ordenacao.ordenarLista(this.carregarBean(list),null)));
49 - 52 + System.out.println("erro_04");
50 return this.getRelatorio(print, tipoRelatorio, fileName); 53 return this.getRelatorio(print, tipoRelatorio, fileName);
51 } 54 }
52 55
src/main/webapp/WEB-INF/eselo.properties
1 #url=https://sistemas-treinamento.ifbaiano.edu.br/intg_ases_selo/calcular-nota 1 #url=https://sistemas-treinamento.ifbaiano.edu.br/intg_ases_selo/calcular-nota
  2 +#url=http://localhost:18080/eselo/calcular-nota
2 #url=http://189.9.137.162:8080/eselo/calcular-nota 3 #url=http://189.9.137.162:8080/eselo/calcular-nota
3 -url=http://localhost:18080/eselo/calcular-nota  
4 -urlServicoSalvandoAvaliacao=http://localhost:18080/eselo/calcular-nota-salvando-avaliacao  
5 -urlAutenticacaoServico=http://localhost:18080/eselo/existe_usuario_servico_web  
6 -#urlAutenticacaoServico=http://localhost:18080/eselo/existe_usuario_servico_web 4 +url=http://eselo-prd.brazilsouth.cloudapp.azure.com/calcular-nota
  5 +
  6 +
  7 +
  8 +#urlAutenticacaoServico=http://189.9.137.162:8080/eselo/existe_usuario_servico_web
  9 +urlAutenticacaoServico=http://eselo-prd.brazilsouth.cloudapp.azure.com/existe_usuario_servico_web
7 10
8 #Esconde a nota caso não esteja usando o ESELO 11 #Esconde a nota caso não esteja usando o ESELO
9 #Se atribuir o valor "sem_nota" na chave 'sem_nota', não exibirá a nota 12 #Se atribuir o valor "sem_nota" na chave 'sem_nota', não exibirá a nota
src/main/webapp/WEB-INF/jsp/avaliacao/avaliar.jsp
@@ -7,8 +7,7 @@ @@ -7,8 +7,7 @@
7 7
8 <div class="tile --NOVALUE--"> 8 <div class="tile --NOVALUE--">
9 9
10 - <!-- Adicionando avisos(erros) da ferramenta de verificação da sintaxe html e css -->  
11 - <c:if test="${not empty avisosFerramentasHtmlCssW3c}"> 10 + <c:if test="${not empty avisosFerramentasHtmlCssW3c}">
12 <c:forEach items="${avisosFerramentasHtmlCssW3c}" var="error"> 11 <c:forEach items="${avisosFerramentasHtmlCssW3c}" var="error">
13 <div class="warning"> 12 <div class="warning">
14 <div class="alinName">${error}</div> 13 <div class="alinName">${error}</div>
@@ -197,16 +196,7 @@ @@ -197,16 +196,7 @@
197 </div> 196 </div>
198 197
199 </div> 198 </div>
200 -<!-- <br>  
201 - <hr class="hr_linhaDupla">  
202 -  
203 - <h2 class="outstanding-title">Aviso</h2>  
204 -  
205 -  
206 -<p>Avaliação tem por base testes automáticos em código-fonte (X)HTML interpretados do <a href="http://emag.governoeletronico.gov.br/">Modelo de Acessibilidade em Governo Eletrônico (eMAG) (link para novo sítio)</a>. </p>  
207 199
208 -<p>Lembrar que nota não contempla os itens classificados como avisos e os itens passíveis de avaliação humana. Para saber quais testes são contemplados pelo software, <a href="${pageContext.request.contextPath}/criteriosSucesso">favor verificar os critérios de sucesso trabalhados pelo ASESWEB</a>.</p>  
209 - -->  
210 <hr class="hr_linhaDupla"> 200 <hr class="hr_linhaDupla">
211 <h2 class="outstanding-title">Exportar Resultado</h2> 201 <h2 class="outstanding-title">Exportar Resultado</h2>
212 <form name="form1" action="relatorioavaliacao" method="post"> 202 <form name="form1" action="relatorioavaliacao" method="post">
src/main/webapp/WEB-INF/mail.properties
1 #com autenticação alterar o valor da chave "prop.email.auth = false" para "prop.email.auth = true" e 1 #com autenticação alterar o valor da chave "prop.email.auth = false" para "prop.email.auth = true" e
2 #atribuir login e senha nas chaves respectivas "prop.email.authuser = ", "prop.email.authpass =". 2 #atribuir login e senha nas chaves respectivas "prop.email.authuser = ", "prop.email.authpass =".
3 -prop.email.host = 189.9.150.53 3 +#prop.email.host = 189.9.150.53
  4 +prop.email.host =191.235.89.55
4 prop.email.port = 25 5 prop.email.port = 25
5 prop.email.authuser = "" 6 prop.email.authuser = ""
6 prop.email.authpass = "" 7 prop.email.authpass = ""
src/main/webapp/WEB-INF/tags/baseLayout.tag
@@ -104,7 +104,7 @@ @@ -104,7 +104,7 @@
104 <h1> 104 <h1>
105 <span id="portal-title-1">Avaliador e Simulador de 105 <span id="portal-title-1">Avaliador e Simulador de
106 Acessibilidade em Sítios 106 Acessibilidade em Sítios
107 - </span> <a id="portal-logo" href="${pageContext.request.contextPath}"> 107 + </span> <a id="portal-logo" href="${pageContext.request.contextPath}/">
108 <span id="portal-title" class="corto">ASES</span> 108 <span id="portal-title" class="corto">ASES</span>
109 </a> <span id="portal-description">Governo Federal </span> 109 </a> <span id="portal-description">Governo Federal </span>
110 </h1> 110 </h1>
@@ -129,9 +129,9 @@ @@ -129,9 +129,9 @@
129 <div id="main"> 129 <div id="main">
130 <div id="content"> 130 <div id="content">
131 <a id="inicioConteudo" class="oculto">Início do conteúdo</a> 131 <a id="inicioConteudo" class="oculto">Início do conteúdo</a>
132 - <!-- Início Conteudo --> 132 +
133 <jsp:doBody /> 133 <jsp:doBody />
134 - <!-- Término Conteudo--> 134 +
135 <a id="fimConteudo" class="oculto">Fim do conteúdo</a> 135 <a id="fimConteudo" class="oculto">Fim do conteúdo</a>
136 </div> 136 </div>
137 <div id="voltar-topo"> 137 <div id="voltar-topo">
src/main/webapp/inicial_arquivos/css/default.css
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 padding-top:30px; 17 padding-top:30px;
18 height:105px; 18 height:105px;
19 font-size:14px; 19 font-size:14px;
20 - background-image: url("/ases/inicial_arquivos/imagens/loading.gif"); 20 + background-image: url("/inicial_arquivos/imagens/loading.gif");
21 text-align: center; 21 text-align: center;
22 background-position: bottom; 22 background-position: bottom;
23 background-repeat: no-repeat; 23 background-repeat: no-repeat;
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
41 padding-top:30px; 41 padding-top:30px;
42 height:105px; 42 height:105px;
43 font-size:14px; 43 font-size:14px;
44 - background-image: url("/ases/inicial_arquivos/imagens/loading.gif"); 44 + background-image: url("/inicial_arquivos/imagens/loading.gif");
45 text-align: center; 45 text-align: center;
46 background-position: bottom; 46 background-position: bottom;
47 background-repeat: no-repeat; 47 background-repeat: no-repeat;
@@ -238,7 +238,7 @@ @@ -238,7 +238,7 @@
238 .warning { 238 .warning {
239 color: #9F6000; 239 color: #9F6000;
240 background-color: #FEEFB3; 240 background-color: #FEEFB3;
241 - background-image: url('/ases/inicial_arquivos/imagens/warning.png'); 241 + background-image: url('/inicial_arquivos/imagens/warning.png');
242 } 242 }
243 .info, .success, .warning, .error, .validation { 243 .info, .success, .warning, .error, .validation {
244 border: 1px solid; 244 border: 1px solid;
@@ -271,7 +271,7 @@ @@ -271,7 +271,7 @@
271 padding-top:30px; 271 padding-top:30px;
272 height:105px; 272 height:105px;
273 font-size:14px; 273 font-size:14px;
274 - background-image: url("/ases/inicial_arquivos/imagens/loading.gif"); 274 + background-image: url("/inicial_arquivos/imagens/loading.gif");
275 text-align: center; 275 text-align: center;
276 background-position: bottom; 276 background-position: bottom;
277 background-repeat: no-repeat; 277 background-repeat: no-repeat;
@@ -300,7 +300,7 @@ @@ -300,7 +300,7 @@
300 padding-top:5px; 300 padding-top:5px;
301 height:105px; 301 height:105px;
302 font-size:12px; 302 font-size:12px;
303 - background-image: url("/ases/inicial_arquivos/imagens/loading.gif"); 303 + background-image: url("/inicial_arquivos/imagens/loading.gif");
304 text-align: center; 304 text-align: center;
305 background-position: bottom; 305 background-position: bottom;
306 background-repeat: no-repeat; 306 background-repeat: no-repeat;
@@ -313,7 +313,7 @@ @@ -313,7 +313,7 @@
313 padding-top:5px; 313 padding-top:5px;
314 height:105px; 314 height:105px;
315 font-size:12px; 315 font-size:12px;
316 - background-image: url("/ases/inicial_arquivos/imagens/loading_altoContraste.gif"); 316 + background-image: url("/inicial_arquivos/imagens/loading_altoContraste.gif");
317 text-align: center; 317 text-align: center;
318 background-position: bottom; 318 background-position: bottom;
319 background-repeat: no-repeat; 319 background-repeat: no-repeat;
@@ -516,7 +516,7 @@ @@ -516,7 +516,7 @@
516 .warning { 516 .warning {
517 color: #9F6000; 517 color: #9F6000;
518 background-color: #FEEFB3; 518 background-color: #FEEFB3;
519 - background-image: url('/ases/inicial_arquivos/imagens/warning.png'); 519 + background-image: url('/inicial_arquivos/imagens/warning.png');
520 } 520 }
521 .info, .success, .warning, .error, .validation { 521 .info, .success, .warning, .error, .validation {
522 border: 1px solid; 522 border: 1px solid;