Fix error case in uploading tar, more comments
This commit is contained in:
parent
d6d0bb640a
commit
872be8605a
6 changed files with 37 additions and 17 deletions
|
@ -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"
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Reference in a new issue