From fb259f3b4665c5d0439fabf9404326bbb390a3ba Mon Sep 17 00:00:00 2001 From: sumitdaga Date: Mon, 14 Jan 2019 20:09:15 +0530 Subject: [PATCH 1/2] fixes issue 280 --- .../import-data-dialog/import-data-dialog.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/import-data-dialog/import-data-dialog.component.ts b/src/app/components/import-data-dialog/import-data-dialog.component.ts index 07be3e3..c584f35 100644 --- a/src/app/components/import-data-dialog/import-data-dialog.component.ts +++ b/src/app/components/import-data-dialog/import-data-dialog.component.ts @@ -121,7 +121,7 @@ export class ImportDataDialogComponent implements OnInit { }); numberOfSucceed -= this.flushDB ? 1 : 0; this.util.showMessage(`${numberOfSucceed} row(s) are imported successfully, ${totalRow - - numberOfSucceed} row(s) fail.`); + - numberOfSucceed} row(s) failed.`); this.dialogRef.close(); this._store.dispatch(new ReqFetchTree({id: this.instanceId})); }, err => { From 738156b2b3375757b20f0a2b09e6432fb663d941 Mon Sep 17 00:00:00 2001 From: sumitdaga Date: Mon, 14 Jan 2019 20:45:29 +0530 Subject: [PATCH 2/2] fixed text --- .../import-data-dialog/import-data-dialog.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/components/import-data-dialog/import-data-dialog.component.ts b/src/app/components/import-data-dialog/import-data-dialog.component.ts index c584f35..f07440f 100644 --- a/src/app/components/import-data-dialog/import-data-dialog.component.ts +++ b/src/app/components/import-data-dialog/import-data-dialog.component.ts @@ -120,8 +120,9 @@ export class ImportDataDialogComponent implements OnInit { numberOfSucceed += (!!v && v.toString().toLowerCase().indexOf('err') < 0) ? 1 : 0; }); numberOfSucceed -= this.flushDB ? 1 : 0; - this.util.showMessage(`${numberOfSucceed} row(s) are imported successfully, ${totalRow - - numberOfSucceed} row(s) failed.`); + const numberOfFailed = totalRow - numberOfSucceed; + this.util.showMessage(`${numberOfSucceed} row${numberOfSucceed !== 1 ? 's were' : ' was'} imported + successfully, ${numberOfFailed} row${numberOfFailed !== 1 ? 's have' : ' has'} failed.`); this.dialogRef.close(); this._store.dispatch(new ReqFetchTree({id: this.instanceId})); }, err => {