1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-20 05:49:40 +02:00

feat(ui): new exception management

This commit is contained in:
Anthony Lapenna 2016-09-02 17:40:03 +12:00
parent eac3239817
commit 74b97a0036
13 changed files with 59 additions and 109 deletions

View file

@ -35,7 +35,7 @@ function ($scope, $stateParams, Settings, Container, Exec, $timeout, Messages) {
Container.exec(execConfig, function(d) {
if (d.message) {
$('#loadConsoleSpinner').hide();
Messages.error('Error', d.message);
Messages.error("Error", {}, d.message);
} else {
var execId = d.Id;
resizeTTY(execId, termHeight, termWidth);
@ -49,11 +49,7 @@ function ($scope, $stateParams, Settings, Container, Exec, $timeout, Messages) {
}
}, function (e) {
$('#loadConsoleSpinner').hide();
if (e.data.message) {
Messages.error("Failure", e.data.message);
} else {
Messages.error("Failure", 'Unable to start an exec instance');
}
Messages.error("Failure", e, 'Unable to start an exec instance');
});
};
@ -71,10 +67,10 @@ function ($scope, $stateParams, Settings, Container, Exec, $timeout, Messages) {
$timeout(function() {
Exec.resize({id: execId, height: height, width: width}, function (d) {
if (d.message) {
Messages.error('Error', 'Unable to resize TTY');
Messages.error('Error', {}, 'Unable to resize TTY');
}
}, function (e) {
Messages.error("Failure", 'Unable to resize TTY');
Messages.error("Failure", {}, 'Unable to resize TTY');
});
}, 2000);