diff options
author | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-10-16 18:17:44 +0200 |
---|---|---|
committer | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-10-16 18:17:44 +0200 |
commit | 77ab312b87324090ec6cb619d11f792b53fdddbd (patch) | |
tree | 194cb312f831eabf9a5f1cd93fa7f5c13274fa50 /webapp | |
parent | 4695555e178bcabe54c5bf82117c9c4cef5440b5 (diff) |
Add sanity check when adding a new pathmap project/folder
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/src/app/projects/projectAddModal.component.ts | 2 | ||||
-rw-r--r-- | webapp/src/app/services/alert.service.ts | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/webapp/src/app/projects/projectAddModal.component.ts b/webapp/src/app/projects/projectAddModal.component.ts index 1584b5b..1352060 100644 --- a/webapp/src/app/projects/projectAddModal.component.ts +++ b/webapp/src/app/projects/projectAddModal.component.ts @@ -139,7 +139,7 @@ export class ProjectAddModalComponent { }, err => { - this.alert.error("Configuration ERROR: " + err, 60); + this.alert.error(err, 60); this.hide(); }); } diff --git a/webapp/src/app/services/alert.service.ts b/webapp/src/app/services/alert.service.ts index c3cae7a..2978e84 100644 --- a/webapp/src/app/services/alert.service.ts +++ b/webapp/src/app/services/alert.service.ts @@ -45,10 +45,11 @@ export class AlertService { } public add(al: IAlert) { + let msg = String(al.msg).replace("\n", "<br>"); this._alerts.push({ show: true, type: al.type, - msg: this.sanitizer.sanitize(SecurityContext.HTML, al.msg), + msg: this.sanitizer.sanitize(SecurityContext.HTML, msg), dismissible: al.dismissible || true, dismissTimeout: (al.dismissTimeout * 1000) || 0, id: this.uid, |