Fix error case in uploading tar, more comments

This commit is contained in:
Sam Chow 2018-06-22 13:21:44 -04:00
parent d6d0bb640a
commit 872be8605a
6 changed files with 37 additions and 17 deletions

View file

@ -2,6 +2,8 @@ import {Component, EventEmitter, Inject, Output} from 'ng-metadata/core';
const templateUrl = require('./load-config.html');
const styleUrl = require('./load-config.css');
declare var bootbox: any;
@Component({
selector: 'load-config',
templateUrl,
@ -29,9 +31,17 @@ export class LoadConfigComponent {
if (success) {
this.configLoaded.emit({});
} else {
this.apiService.errorDisplay('Error loading configuration',
'Could not upload configuration. Please reload the page and try again.\n' +
'If this problem persists, please contact support')();
bootbox.dialog({
"message": 'Could not upload configuration. Please check you have provided a valid tar file' +
'If this problem persists, please contact support',
"title": 'Error Loading Configuration',
"buttons": {
"close": {
"label": "Close",
"className": "btn-primary"
}
}
});
}
});
}