es fix1

parent 90e7e04f
......@@ -504,8 +504,7 @@ public class EstadoSistemaEJB {
private String extractHostname(List<String> commandResult) {
String hosnameline = commandResult.stream().filter(s -> s.contains("hostname")).findFirst().orElse(null);
String dirtyHostname = hosnameline.split(":")[1];
String dirtyHostname = commandResult.stream().filter(s -> s.contains("hostname")).findFirst().orElse(null).split(":")[1];
return dirtyHostname.substring(dirtyHostname.indexOf("\"")+1, dirtyHostname.lastIndexOf("\""));
}
......@@ -518,7 +517,9 @@ public class EstadoSistemaEJB {
Process process = processBuilder.start();
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
String line;
int i = 0;
while ((line = reader.readLine()) != null) {
System.out.println((++i) + ": " + command + " -> " + line);
salida.add(line);
}
process.waitFor();
......@@ -608,6 +609,7 @@ public class EstadoSistemaEJB {
schema = dburl.split("/")[3];
dbSize = ((BigDecimal)em.createNativeQuery("SELECT sum(DATA_LENGTH + INDEX_LENGTH) FROM information_schema.TABLES WHERE TABLE_SCHEMA = ? GROUP BY TABLE_SCHEMA").setParameter(1, schema).getResultList().get(0)).toString();
} catch (Exception e) {
dbSize = "";
} finally {
try {
userTransaction.commit();
......
#Generated by Maven Integration for Eclipse
#Mon Jul 27 12:54:34 BRT 2020
#Mon Jul 27 15:40:50 BRT 2020
version=0.0.1-SNAPSHOT
groupId=proygrado
m2e.projectName=Servidor JEE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment