Skip to content

Commit 49a676d

Browse files
authored
Merge pull request topcoderinc#436 from topcoderinc/issue-280
fixes issue 280
2 parents cc6d8ca + 738156b commit 49a676d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/app/components/import-data-dialog/import-data-dialog.component.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@ export class ImportDataDialogComponent implements OnInit {
119119
numberOfSucceed += (!!v && v.toString().toLowerCase().indexOf('err') < 0) ? 1 : 0;
120120
});
121121
numberOfSucceed -= this.flushDB ? 1 : 0;
122-
this.util.showMessage(`${numberOfSucceed} row(s) are imported successfully, ${totalRow
123-
- numberOfSucceed} row(s) fail.`);
122+
const numberOfFailed = totalRow - numberOfSucceed;
123+
this.util.showMessage(`${numberOfSucceed} row${numberOfSucceed !== 1 ? 's were' : ' was'} imported
124+
successfully, ${numberOfFailed} row${numberOfFailed !== 1 ? 's have' : ' has'} failed.`);
124125
this.dialogRef.close();
125126
this._store.dispatch(new ReqFetchTree({id: this.instanceId}));
126127
}, err => {

0 commit comments

Comments
 (0)