diff --git a/Frontend Angular 4/package-lock.json b/Frontend Angular 4/package-lock.json index ee713127cd7a61042ce98d375b19eba683598916..3752d4c1968e6330cd8943f361a1c0da07b6b590 100644 --- a/Frontend Angular 4/package-lock.json +++ b/Frontend Angular 4/package-lock.json @@ -1476,9 +1476,9 @@ } }, "caniuse-lite": { - "version": "1.0.30000985", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", - "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==", + "version": "1.0.30000986", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000986.tgz", + "integrity": "sha512-pM+LnkoAX0+QnIH3tpW5EnkmfpEoqOD8FAcoBvsl3Xh6DXkgctiCxeCbXphP/k3XJtJzm+zOAJbi6U6IVkpWZQ==", "dev": true }, "capture-stack-trace": { @@ -2839,9 +2839,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.200", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.200.tgz", - "integrity": "sha512-PUurrpyDA74MuAjJRD+79ss5BqJlU3mdArRbuu4wO/dt6jc3Ic/6BDmFJxkdwbfq39cHf/XKm2vW98XSvut9Dg==", + "version": "1.3.201", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.201.tgz", + "integrity": "sha512-aCTPIfY1Jvuam5b6vuWRjt1F8i4kY7zX0Qtpu5SNd6l1zjuxU9fDNpbM4o6+oJsra+TMD2o7D20GnkSIgpTr9w==", "dev": true }, "elliptic": { diff --git a/Frontend Angular 4/src/app/layout/matefun/matefun.component.ts b/Frontend Angular 4/src/app/layout/matefun/matefun.component.ts index a6ff5d00ae09be70868694101c5103d1d213ad9e..cda41e0eb1532c1fd1c7afa09a73601c53ec9d93 100755 --- a/Frontend Angular 4/src/app/layout/matefun/matefun.component.ts +++ b/Frontend Angular 4/src/app/layout/matefun/matefun.component.ts @@ -574,7 +574,7 @@ export class MateFunComponent { idList.push(archivo.id); } this.lockSaveButton(); - this.ghciService.loadFile(archivo.id,idList); + this.ghciService.loadFile(archivo.id,archivo.nombre,idList); }, error => { this.notifService.error(error); @@ -588,7 +588,7 @@ export class MateFunComponent { if(!idList.some(id => id ==this.archivo.id)){ idList.push(this.archivo.id); } - this.ghciService.loadFile(this.archivo.id,idList); + this.ghciService.loadFile(this.archivo.id,this.archivo.nombre,idList); } }else{ this.haskellService.crearArchivo(this.archivo) @@ -596,7 +596,7 @@ export class MateFunComponent { archivo => { this.archivo = archivo; this.lockSaveButton(); - this.ghciService.loadFile(archivo.id,[]); + this.ghciService.loadFile(archivo.id,archivo.nombre,[]); }, error => { this.notifService.error(error); diff --git a/Frontend Angular 4/src/app/shared/config.ts b/Frontend Angular 4/src/app/shared/config.ts index 9a26f6c32cda95aa8c0bc89eecbbaa9715d18b0c..b7a3aec0d258082f52877e4b0f1007f5d9013676 100755 --- a/Frontend Angular 4/src/app/shared/config.ts +++ b/Frontend Angular 4/src/app/shared/config.ts @@ -25,10 +25,10 @@ // export const GHCI_URL = 'ws://35.198.60.74:9090/endpoint'; // psico -export const SERVER = 'https://matefun.math.psico.edu.uy'; -export const GHCI_URL = 'wss://matefun.math.psico.edu.uy/endpoint'; +// export const SERVER = 'https://matefun.math.psico.edu.uy'; +// export const GHCI_URL = 'wss://matefun.math.psico.edu.uy/endpoint'; //diego docker -// export const SERVER = 'http://localhost:8080'; -//export const GHCI_URL = 'ws://localhost:8080/endpoint'; \ No newline at end of file +export const SERVER = 'http://localhost:8080'; +export const GHCI_URL = 'ws://localhost:8080/endpoint'; \ No newline at end of file diff --git a/Frontend Angular 4/src/app/shared/services/ghci.service.ts b/Frontend Angular 4/src/app/shared/services/ghci.service.ts index d641e6d34dc4610a3ec47b1f634923d14f06e7e9..a23f12d57d5e316d23bc3880e63feb95da1cdac3 100755 --- a/Frontend Angular 4/src/app/shared/services/ghci.service.ts +++ b/Frontend Angular 4/src/app/shared/services/ghci.service.ts @@ -29,7 +29,10 @@ export class GHCIService { private warningText :string = ""; private errorText :string = ""; private lastError : number = -1; + private lastErrorFile :string = ""; private lastWarning :number = -1; + private lastWarningFile :string = ""; + private currentFile :string = ""; translateService: any; private console_error_class : string = "jqconsole-asd"; @@ -56,8 +59,9 @@ export class GHCIService { return this.warnings; } - loadFile(fileId, dependencias) { + loadFile(fileId, fileName, dependencias) { this.waitingForWarning = true; + this.currentFile = fileName; var message = { 'token': this.authService.getToken(), 'load': fileId, @@ -141,7 +145,7 @@ export class GHCIService { var ErrorFinalText = `${this.translateService.get('i18n.codemirror.command.inColumn').value}` + columna + ": " + ErrorTextToShow; - if(this.codemirrorRef!==null){ + if((this.currentFile == this.lastErrorFile) && (this.codemirrorRef!==null)){ var makeMarker = function() { var marker = document.createElement("div"); marker.id = "error_" + line.toString(); @@ -161,6 +165,12 @@ export class GHCIService { }else { try{ var m = JSON.parse(text); + var file = m.resultado + .split(`${this.translateService.get('i18n.codemirror.command.outError').value}:`)[1] + .trim() + .split(`${this.translateService.get('i18n.object.file').value}:`)[1] + .split(" ")[1]; + var line = m.resultado .split(`${this.translateService.get('i18n.codemirror.command.outError').value}:`)[1] .trim() @@ -169,8 +179,8 @@ export class GHCIService { this.waitingForError = true; this.lastError = line; + this.lastErrorFile = file; this.errorText = m.resultado.split(`${this.translateService.get('i18n.codemirror.command.outError').value}:`)[1].trim(); - }catch(err){ } return false; @@ -204,7 +214,7 @@ export class GHCIService { var warningFinalText = `${this.translateService.get('i18n.codemirror.command.inColumn').value}` + columna + ": " + warningTextToShow; - if(this.codemirrorRef!==null){ + if((this.currentFile == this.lastWarningFile) && (this.codemirrorRef!==null)){ var makeMarker = function() { var marker = document.createElement("div"); marker.style.width = "15px"; @@ -227,7 +237,15 @@ export class GHCIService { if(this.warningStepReaded===0){ - try{ + try{ + var file = m.resultado + .split(`${this.translateService.get('i18n.codemirror.command.outWarning').value}:`)[1] + .trim() + .split(`${this.translateService.get('i18n.object.file').value}:`)[1] + .split(" ")[1]; + + + // retrive line of warning var line = m.resultado .split(`${this.translateService.get('i18n.codemirror.command.outWarning').value}:`)[1] @@ -236,6 +254,7 @@ export class GHCIService { .split(" ")[1]-1; this.lastWarning = line; + this.lastWarningFile = file; this.warnings.push(line); var warningText = m.resultado.split(`${this.translateService.get('i18n.codemirror.command.outWarning').value}:`)[1].trim(); this.warningStepReaded = 1; @@ -245,7 +264,6 @@ export class GHCIService { this.outputConsole(`${this.translateService.get('i18n.msg.codemirror.consoleWarnings').value}\n`); this.waitingForWarning = false; } - } catch(err){ diff --git a/Servidor JEE/WebContent/3rdpartylicenses.txt b/Servidor JEE/WebContent/3rdpartylicenses.txt index a3ac88c655d6022a02d023723d976cb844ddeb98..3baf89723501d30cd5659a923b175b1ae8852431 100644 --- a/Servidor JEE/WebContent/3rdpartylicenses.txt +++ b/Servidor JEE/WebContent/3rdpartylicenses.txt @@ -2,7 +2,7 @@ MIT MIT -codemirror@5.48.0 +codemirror@5.48.2 MIT MIT License diff --git a/Servidor JEE/WebContent/index.html b/Servidor JEE/WebContent/index.html index 14f3892dc7d4bb375a6ff0091c66ebd42dbf9aaa..6210752b487ba3f855a462766f1ef4683573d559 100644 --- a/Servidor JEE/WebContent/index.html +++ b/Servidor JEE/WebContent/index.html @@ -1,4 +1,4 @@ <!doctype html><html><head><meta charset="utf-8"><title>Proyecto MateFun</title><base href="/"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" type="image/x-icon" href="favicon.ico"><!-- despues lo saco de aca --><!-- <link rel="stylesheet" type="text/css" href="node_modules/codemirror/addon/hint/show-hint.css"> --><script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script><script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js" crossorigin="anonymous"></script><!-- <script src="https://wzrd.in/standalone/function-plot@1.18.1" crossorigin="anonymous"></script> - --><link href="styles.8e9b76ce39821b2f5328.bundle.css" rel="stylesheet"/></head><body><app-root><div class="loading"><div class="loading-bar"></div><div class="loading-bar"></div><div class="loading-bar"></div><div class="loading-bar"></div><div class="loading-bar"></div></div></app-root><script type="text/javascript" src="inline.7b1a129376036326039f.bundle.js"></script><script type="text/javascript" src="polyfills.d50ac7c762e2eb4097d9.bundle.js"></script><script type="text/javascript" src="scripts.d01654a9119059a68b2b.bundle.js"></script><script type="text/javascript" src="vendor.d3c1758890cc7548bc7b.bundle.js"></script><script type="text/javascript" src="main.94941e96a5bd65bdeb71.bundle.js"></script></body></html> \ No newline at end of file + --><link href="styles.8e9b76ce39821b2f5328.bundle.css" rel="stylesheet"/></head><body><app-root><div class="loading"><div class="loading-bar"></div><div class="loading-bar"></div><div class="loading-bar"></div><div class="loading-bar"></div><div class="loading-bar"></div></div></app-root><script type="text/javascript" src="inline.e4a1c4b538d0a92ac54f.bundle.js"></script><script type="text/javascript" src="polyfills.d50ac7c762e2eb4097d9.bundle.js"></script><script type="text/javascript" src="scripts.d01654a9119059a68b2b.bundle.js"></script><script type="text/javascript" src="vendor.d3c1758890cc7548bc7b.bundle.js"></script><script type="text/javascript" src="main.94941e96a5bd65bdeb71.bundle.js"></script></body></html> \ No newline at end of file diff --git a/Servidor JEE/src/main/java/edu/proygrado/ejb/ArchivosEJB.java b/Servidor JEE/src/main/java/edu/proygrado/ejb/ArchivosEJB.java index cf2819b8e9c97b0dead74af7c3d2d4e111d1a144..cb44550855c1551e378b775d8f27d4168fb56420 100644 --- a/Servidor JEE/src/main/java/edu/proygrado/ejb/ArchivosEJB.java +++ b/Servidor JEE/src/main/java/edu/proygrado/ejb/ArchivosEJB.java @@ -122,7 +122,7 @@ public class ArchivosEJB { // no existe la copia. No se hace nada con esta excepcion. } if (archivo == null) { - throw new Exception("No exite el archivo de id " + archivoId); + throw new Exception("No existe el archivo de id " + archivoId); } Alumno alumno = em.find(Alumno.class, cedula); @@ -172,7 +172,8 @@ public class ArchivosEJB { public void eliminarArchivo(long archivoId) throws Exception { Archivo archivo = em.find(Archivo.class, archivoId); if (archivo != null) { - em.remove(archivo); + //em.remove(archivo); + archivo.setEliminado(true); } }