From ec34976b55d576e37b5920a3e91b00f7ab072e82 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ga=C3=ABlle=20FOURNIER?= <gaelle.fournier.work@gmail.com>
Date: Mon, 14 Sep 2020 10:44:12 +0200
Subject: [PATCH] Fix xelians return

---
 .../referential/common/service/VitamAgencyService.java |  1 -
 .../probativevalue/ProbativeValueInternalService.java  | 10 +++++-----
 .../context-preview/context-preview.component.ts       |  1 -
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/api/api-referential/referential-commons/src/main/java/fr/gouv/vitamui/referential/common/service/VitamAgencyService.java b/api/api-referential/referential-commons/src/main/java/fr/gouv/vitamui/referential/common/service/VitamAgencyService.java
index bc326eca..8c845c67 100644
--- a/api/api-referential/referential-commons/src/main/java/fr/gouv/vitamui/referential/common/service/VitamAgencyService.java
+++ b/api/api-referential/referential-commons/src/main/java/fr/gouv/vitamui/referential/common/service/VitamAgencyService.java
@@ -152,7 +152,6 @@ public class VitamAgencyService {
         RequestResponse r = importAgencies(vitamContext, actualAgencies.stream()
                 .filter( agency -> !id.equals(agency.getId()) )
                 .collect(Collectors.toList()));
-        LOGGER.error("is ok ? {}", r.isOk());
         return r.isOk();
     }
 
diff --git a/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/probativevalue/ProbativeValueInternalService.java b/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/probativevalue/ProbativeValueInternalService.java
index 30d2f878..9f509102 100644
--- a/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/probativevalue/ProbativeValueInternalService.java
+++ b/api/api-referential/referential-internal/src/main/java/fr/gouv/vitamui/referential/internal/server/probativevalue/ProbativeValueInternalService.java
@@ -126,10 +126,10 @@ public class ProbativeValueInternalService {
 			File file = new File(workspaceOperationPath, operationId + ".json");
 			FileUtils.copyInputStreamToFile(reportStream, file);
 		} catch (VitamClientException e) {
-			LOGGER.error(e.getMessage());
+			LOGGER.error("Error while getting probative value report from Vitam", e.getMessage());
 			throw new InternalServerException("Unable to get Probative Value Report from VITAM", e);
 		} catch (IOException e) {
-			LOGGER.error(e.getMessage());
+			LOGGER.error("Error on probative value report", e.getMessage());
 			throw new InternalServerException("Unable to create JSON from Probative Value Report", e);
 		}
 
@@ -153,11 +153,11 @@ public class ProbativeValueInternalService {
 				dataMap.put("report", report);
 				PdfFileGenerator.createPdf(odtTemplate, pdfOutputStream, dataMap);
 			} catch (Exception e) {
-				LOGGER.error(e.getMessage());
+				LOGGER.error("Unable to create PDF from Probative Value Report template ODT", e.getMessage());
 				throw new InternalServerException("Unable to create PDF from Probative Value Report template ODT", e);
 			}
 		} catch (InvalidParseOperationException | VitamClientException exc) {
-			LOGGER.error(exc.getMessage());
+			LOGGER.error("Unable to create PDF from Probative Value Report Json value", exc.getMessage());
 			throw new InternalServerException("Unable to create PDF from Probative Value Report Json value", exc);
 		}
 
@@ -172,7 +172,7 @@ public class ProbativeValueInternalService {
 			streams.put(operationId + ".json", new FileInputStream(jsonFile));
 			streams.put(operationId + ".pdf", new FileInputStream(pdfFile));
 		} catch (FileNotFoundException e) {
-			LOGGER.error(e.getMessage());
+			LOGGER.error("Unable to generate ZIP", e.getMessage());
 			throw new InternalServerException(String.format("Unable to generate ZIP: %s", e.getMessage()), e);
 		}
 		ZipUtils.generate(streams, outputStream);
diff --git a/ui/ui-frontend/projects/referential/src/app/context/context-preview/context-preview.component.ts b/ui/ui-frontend/projects/referential/src/app/context/context-preview/context-preview.component.ts
index 4c21fded..f330f139 100644
--- a/ui/ui-frontend/projects/referential/src/app/context/context-preview/context-preview.component.ts
+++ b/ui/ui-frontend/projects/referential/src/app/context/context-preview/context-preview.component.ts
@@ -98,7 +98,6 @@ export class ContextPreviewComponent implements OnInit {
         );
       });
     } else {
-      console.log('ResetForm: ', this.tabs.selectedIndex);
       this.tabLinks[this.tabs.selectedIndex].resetForm(this.context);
     }
   }
-- 
GitLab