mirror of https://github.com/portainer/portainer
Merge pull request #187 from cloud-inovasi/feat95-remove-errormsgfilter
feat(ui): remove the errorMsg filter and replace it with proper error…pull/188/head
commit
eac3239817
|
@ -1,6 +1,6 @@
|
|||
angular.module('container', [])
|
||||
.controller('ContainerController', ['$scope', '$state','$stateParams', '$filter', 'Container', 'ContainerCommit', 'ImageHelper', 'Messages', 'errorMsgFilter',
|
||||
function ($scope, $state, $stateParams, $filter, Container, ContainerCommit, ImageHelper, Messages, errorMsgFilter) {
|
||||
.controller('ContainerController', ['$scope', '$state','$stateParams', '$filter', 'Container', 'ContainerCommit', 'ImageHelper', 'Messages',
|
||||
function ($scope, $state, $stateParams, $filter, Container, ContainerCommit, ImageHelper, Messages) {
|
||||
$scope.activityTime = 0;
|
||||
$scope.portBindings = [];
|
||||
$scope.config = {
|
||||
|
@ -149,13 +149,18 @@ function ($scope, $state, $stateParams, $filter, Container, ContainerCommit, Ima
|
|||
|
||||
$scope.renameContainer = function () {
|
||||
Container.rename({id: $stateParams.id, 'name': $scope.container.newContainerName}, function (d) {
|
||||
if (d.name) {
|
||||
$scope.container.Name = d.name;
|
||||
Messages.send("Container successfully renamed", d.name);
|
||||
} else {
|
||||
var error = errorMsgFilter(d);
|
||||
if (d.message) {
|
||||
$scope.container.newContainerName = $scope.container.Name;
|
||||
Messages.error("Unable to rename container", error);
|
||||
Messages.error("Unable to rename container", d.message);
|
||||
} else {
|
||||
$scope.container.Name = $scope.container.newContainerName;
|
||||
Messages.send("Container successfully renamed", d.name);
|
||||
}
|
||||
}, function (e) {
|
||||
if (e.data.message) {
|
||||
Messages.error("Failure", e.data.message);
|
||||
} else {
|
||||
Messages.error("Failure", 'Unable to rename container');
|
||||
}
|
||||
});
|
||||
$scope.container.edit = false;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
angular.module('containerConsole', [])
|
||||
.controller('ContainerConsoleController', ['$scope', '$stateParams', 'Settings', 'Container', 'Exec', '$timeout', 'Messages', 'errorMsgFilter',
|
||||
function ($scope, $stateParams, Settings, Container, Exec, $timeout, Messages, errorMsgFilter) {
|
||||
.controller('ContainerConsoleController', ['$scope', '$stateParams', 'Settings', 'Container', 'Exec', '$timeout', 'Messages',
|
||||
function ($scope, $stateParams, Settings, Container, Exec, $timeout, Messages) {
|
||||
$scope.state = {};
|
||||
$scope.state.command = "bash";
|
||||
$scope.connected = false;
|
||||
|
@ -33,7 +33,10 @@ function ($scope, $stateParams, Settings, Container, Exec, $timeout, Messages, e
|
|||
};
|
||||
|
||||
Container.exec(execConfig, function(d) {
|
||||
if (d.Id) {
|
||||
if (d.message) {
|
||||
$('#loadConsoleSpinner').hide();
|
||||
Messages.error('Error', d.message);
|
||||
} else {
|
||||
var execId = d.Id;
|
||||
resizeTTY(execId, termHeight, termWidth);
|
||||
var url = window.location.href.split('#')[0] + 'ws/exec?id=' + execId;
|
||||
|
@ -43,13 +46,14 @@ function ($scope, $stateParams, Settings, Container, Exec, $timeout, Messages, e
|
|||
url = url.replace('http://', 'ws://');
|
||||
}
|
||||
initTerm(url, termHeight, termWidth);
|
||||
} else {
|
||||
$('#loadConsoleSpinner').hide();
|
||||
Messages.error('Error', errorMsgFilter(d));
|
||||
}
|
||||
}, function (e) {
|
||||
$('#loadConsoleSpinner').hide();
|
||||
Messages.error("Failure", e.data);
|
||||
if (e.data.message) {
|
||||
Messages.error("Failure", e.data.message);
|
||||
} else {
|
||||
Messages.error("Failure", 'Unable to start an exec instance');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -66,10 +70,11 @@ function ($scope, $stateParams, Settings, Container, Exec, $timeout, Messages, e
|
|||
function resizeTTY(execId, height, width) {
|
||||
$timeout(function() {
|
||||
Exec.resize({id: execId, height: height, width: width}, function (d) {
|
||||
var error = errorMsgFilter(d);
|
||||
if (error) {
|
||||
if (d.message) {
|
||||
Messages.error('Error', 'Unable to resize TTY');
|
||||
}
|
||||
}, function (e) {
|
||||
Messages.error("Failure", 'Unable to resize TTY');
|
||||
});
|
||||
}, 2000);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
angular.module('containers', [])
|
||||
.controller('ContainersController', ['$scope', 'Container', 'ContainerHelper', 'Info', 'Settings', 'Messages', 'Config', 'errorMsgFilter',
|
||||
function ($scope, Container, ContainerHelper, Info, Settings, Messages, Config, errorMsgFilter) {
|
||||
.controller('ContainersController', ['$scope', 'Container', 'ContainerHelper', 'Info', 'Settings', 'Messages', 'Config',
|
||||
function ($scope, Container, ContainerHelper, Info, Settings, Messages, Config) {
|
||||
|
||||
$scope.state = {};
|
||||
$scope.state.displayAll = Settings.displayAll;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
angular.module('createContainer', [])
|
||||
.controller('CreateContainerController', ['$scope', '$state', 'Config', 'Container', 'Image', 'Volume', 'Network', 'Messages', 'errorMsgFilter',
|
||||
function ($scope, $state, Config, Container, Image, Volume, Network, Messages, errorMsgFilter) {
|
||||
.controller('CreateContainerController', ['$scope', '$state', 'Config', 'Container', 'Image', 'Volume', 'Network', 'Messages',
|
||||
function ($scope, $state, Config, Container, Image, Volume, Network, Messages) {
|
||||
|
||||
$scope.state = {
|
||||
alwaysPull: true
|
||||
|
@ -86,22 +86,35 @@ function ($scope, $state, Config, Container, Image, Volume, Network, Messages, e
|
|||
// TODO: centralize, already present in templatesController
|
||||
function createContainer(config) {
|
||||
Container.create(config, function (d) {
|
||||
if (d.Id) {
|
||||
if (d.message) {
|
||||
$('#createContainerSpinner').hide();
|
||||
Messages.error('Error', d.message);
|
||||
} else {
|
||||
Container.start({id: d.Id}, {}, function (cd) {
|
||||
$('#createContainerSpinner').hide();
|
||||
Messages.send('Container Started', d.Id);
|
||||
$state.go('containers', {}, {reload: true});
|
||||
if (cd.message) {
|
||||
$('#createContainerSpinner').hide();
|
||||
Messages.error('Error', cd.message);
|
||||
} else {
|
||||
$('#createContainerSpinner').hide();
|
||||
Messages.send('Container Started', d.Id);
|
||||
$state.go('containers', {}, {reload: true});
|
||||
}
|
||||
}, function (e) {
|
||||
$('#createContainerSpinner').hide();
|
||||
Messages.error('Error', errorMsgFilter(e));
|
||||
if (e.data.message) {
|
||||
Messages.error("Failure", e.data.message);
|
||||
} else {
|
||||
Messages.error("Failure", 'Unable to start container');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('#createContainerSpinner').hide();
|
||||
Messages.error('Error', errorMsgFilter(d));
|
||||
}
|
||||
}, function (e) {
|
||||
$('#createContainerSpinner').hide();
|
||||
Messages.error('Error', errorMsgFilter(e));
|
||||
if (e.data.message) {
|
||||
Messages.error("Failure", e.data.message);
|
||||
} else {
|
||||
Messages.error("Failure", 'Unable to create container');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
angular.module('createNetwork', [])
|
||||
.controller('CreateNetworkController', ['$scope', '$state', 'Messages', 'Network', 'errorMsgFilter',
|
||||
function ($scope, $state, Messages, Network, errorMsgFilter) {
|
||||
.controller('CreateNetworkController', ['$scope', '$state', 'Messages', 'Network',
|
||||
function ($scope, $state, Messages, Network) {
|
||||
$scope.formValues = {
|
||||
DriverOptions: [],
|
||||
Subnet: '',
|
||||
|
@ -27,17 +27,21 @@ function ($scope, $state, Messages, Network, errorMsgFilter) {
|
|||
function createNetwork(config) {
|
||||
$('#createNetworkSpinner').show();
|
||||
Network.create(config, function (d) {
|
||||
if (d.Id) {
|
||||
if (d.message) {
|
||||
$('#createNetworkSpinner').hide();
|
||||
Messages.error('Unable to create network', d.message);
|
||||
} else {
|
||||
Messages.send("Network created", d.Id);
|
||||
$('#createNetworkSpinner').hide();
|
||||
$state.go('networks', {}, {reload: true});
|
||||
} else {
|
||||
$('#createNetworkSpinner').hide();
|
||||
Messages.error('Unable to create network', errorMsgFilter(d));
|
||||
}
|
||||
}, function (e) {
|
||||
$('#createNetworkSpinner').hide();
|
||||
Messages.error('Unable to create network', e.data);
|
||||
if (e.data.message) {
|
||||
Messages.error("Failure", e.data.message);
|
||||
} else {
|
||||
Messages.error("Failure", 'Unable to create network');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
angular.module('createVolume', [])
|
||||
.controller('CreateVolumeController', ['$scope', '$state', 'Volume', 'Messages', 'errorMsgFilter',
|
||||
function ($scope, $state, Volume, Messages, errorMsgFilter) {
|
||||
.controller('CreateVolumeController', ['$scope', '$state', 'Volume', 'Messages',
|
||||
function ($scope, $state, Volume, Messages) {
|
||||
|
||||
$scope.formValues = {
|
||||
DriverOptions: []
|
||||
|
@ -21,17 +21,21 @@ function ($scope, $state, Volume, Messages, errorMsgFilter) {
|
|||
function createVolume(config) {
|
||||
$('#createVolumeSpinner').show();
|
||||
Volume.create(config, function (d) {
|
||||
if (d.Name) {
|
||||
if (d.message) {
|
||||
$('#createVolumeSpinner').hide();
|
||||
Messages.error('Unable to create volume', d.message);
|
||||
} else {
|
||||
Messages.send("Volume created", d.Name);
|
||||
$('#createVolumeSpinner').hide();
|
||||
$state.go('volumes', {}, {reload: true});
|
||||
} else {
|
||||
$('#createVolumeSpinner').hide();
|
||||
Messages.error('Unable to create volume', errorMsgFilter(d));
|
||||
}
|
||||
}, function (e) {
|
||||
$('#createVolumeSpinner').hide();
|
||||
Messages.error('Unable to create volume', e.data);
|
||||
if (e.data.message) {
|
||||
Messages.error("Failure", e.data.message);
|
||||
} else {
|
||||
Messages.error("Failure", 'Unable to create volume');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
angular.module('network', [])
|
||||
.controller('NetworkController', ['$scope', 'Network', 'Messages', '$state', '$stateParams', 'errorMsgFilter',
|
||||
function ($scope, Network, Messages, $state, $stateParams, errorMsgFilter) {
|
||||
.controller('NetworkController', ['$scope', 'Network', 'Messages', '$state', '$stateParams',
|
||||
function ($scope, Network, Messages, $state, $stateParams) {
|
||||
|
||||
$scope.disconnect = function disconnect(networkId, containerId) {
|
||||
$('#loadingViewSpinner').show();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
angular.module('networks', [])
|
||||
.controller('NetworksController', ['$scope', '$state', 'Network', 'Config', 'Messages', 'errorMsgFilter',
|
||||
function ($scope, $state, Network, Config, Messages, errorMsgFilter) {
|
||||
.controller('NetworksController', ['$scope', '$state', 'Network', 'Config', 'Messages',
|
||||
function ($scope, $state, Network, Config, Messages) {
|
||||
$scope.state = {};
|
||||
$scope.state.selectedItemCount = 0;
|
||||
$scope.state.advancedSettings = false;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
angular.module('templates', [])
|
||||
.controller('TemplatesController', ['$scope', '$q', '$state', '$filter', 'Config', 'Container', 'ContainerHelper', 'Image', 'Volume', 'Network', 'Templates', 'Messages', 'errorMsgFilter',
|
||||
function ($scope, $q, $state, $filter, Config, Container, ContainerHelper, Image, Volume, Network, Templates, Messages, errorMsgFilter) {
|
||||
.controller('TemplatesController', ['$scope', '$q', '$state', '$filter', 'Config', 'Container', 'ContainerHelper', 'Image', 'Volume', 'Network', 'Templates', 'Messages',
|
||||
function ($scope, $q, $state, $filter, Config, Container, ContainerHelper, Image, Volume, Network, Templates, Messages) {
|
||||
$scope.templates = [];
|
||||
$scope.selectedTemplate = null;
|
||||
$scope.formValues = {
|
||||
|
@ -13,25 +13,39 @@ function ($scope, $q, $state, $filter, Config, Container, ContainerHelper, Image
|
|||
// TODO: centralize, already present in createContainerController
|
||||
function createContainer(config) {
|
||||
Container.create(config, function (d) {
|
||||
if (d.Id) {
|
||||
if (d.message) {
|
||||
$('#createContainerSpinner').hide();
|
||||
Messages.error('Error', d.message);
|
||||
} else {
|
||||
Container.start({id: d.Id}, {}, function (cd) {
|
||||
$('#createContainerSpinner').hide();
|
||||
Messages.send('Container Started', d.Id);
|
||||
$state.go('containers', {}, {reload: true});
|
||||
if (cd.message) {
|
||||
$('#createContainerSpinner').hide();
|
||||
Messages.error('Error', cd.message);
|
||||
} else {
|
||||
$('#createContainerSpinner').hide();
|
||||
Messages.send('Container Started', d.Id);
|
||||
$state.go('containers', {}, {reload: true});
|
||||
}
|
||||
}, function (e) {
|
||||
$('#createContainerSpinner').hide();
|
||||
Messages.error('Error', errorMsgFilter(e));
|
||||
if (e.data.message) {
|
||||
Messages.error("Failure", e.data.message);
|
||||
} else {
|
||||
Messages.error("Failure", 'Unable to start container');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('#createContainerSpinner').hide();
|
||||
Messages.error('Error', errorMsgFilter(d));
|
||||
}
|
||||
}, function (e) {
|
||||
$('#createContainerSpinner').hide();
|
||||
Messages.error('Error', errorMsgFilter(e));
|
||||
if (e.data.message) {
|
||||
Messages.error("Failure", e.data.message);
|
||||
} else {
|
||||
Messages.error("Failure", 'Unable to create container');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// TODO: centralize, already present in createContainerController
|
||||
function pullImageAndCreateContainer(imageConfig, containerConfig) {
|
||||
Image.create(imageConfig, function (data) {
|
||||
|
@ -105,15 +119,19 @@ function ($scope, $q, $state, $filter, Config, Container, ContainerHelper, Image
|
|||
template.volumes.forEach(function (vol) {
|
||||
volumeQueries.push(
|
||||
Volume.create({}, function (d) {
|
||||
if (d.Name) {
|
||||
if (d.message) {
|
||||
Messages.error('Unable to create volume', d.message);
|
||||
} else {
|
||||
Messages.send("Volume created", d.Name);
|
||||
containerConfig.Volumes[vol] = {};
|
||||
containerConfig.HostConfig.Binds.push(d.Name + ':' + vol);
|
||||
} else {
|
||||
Messages.error('Unable to create volume', errorMsgFilter(d));
|
||||
}
|
||||
}, function (e) {
|
||||
Messages.error('Unable to create volume', e.data);
|
||||
if (e.data.message) {
|
||||
Messages.error("Failure", e.data.message);
|
||||
} else {
|
||||
Messages.error("Failure", 'Unable to create volume');
|
||||
}
|
||||
}).$promise
|
||||
);
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
angular.module('volumes', [])
|
||||
.controller('VolumesController', ['$scope', '$state', 'Volume', 'Messages', 'errorMsgFilter',
|
||||
function ($scope, $state, Volume, Messages, errorMsgFilter) {
|
||||
.controller('VolumesController', ['$scope', '$state', 'Volume', 'Messages',
|
||||
function ($scope, $state, Volume, Messages) {
|
||||
$scope.state = {};
|
||||
$scope.state.selectedItemCount = 0;
|
||||
$scope.sortType = 'Name';
|
||||
|
|
|
@ -191,16 +191,4 @@ angular.module('uifordocker.filters', [])
|
|||
return function (obj) {
|
||||
return _.isEmpty(obj);
|
||||
};
|
||||
})
|
||||
|
||||
.filter('errorMsg', function () {
|
||||
return function (object) {
|
||||
var idx = 0;
|
||||
var msg = '';
|
||||
while (object[idx] && typeof(object[idx]) === 'string') {
|
||||
msg += object[idx];
|
||||
idx++;
|
||||
}
|
||||
return msg;
|
||||
};
|
||||
});
|
||||
|
|
|
@ -21,13 +21,13 @@ function jsonObjectsToArrayHandler(data) {
|
|||
return angular.fromJson(str);
|
||||
}
|
||||
|
||||
// The Docker API often returns an empty string on success (Docker 1.9 -> Docker 1.12).
|
||||
// The Docker API often returns an empty string or a valid JSON object on success (Docker 1.9 -> Docker 1.12).
|
||||
// On error, it returns either an error message as a string (Docker < 1.12) or a JSON object with the field message
|
||||
// container the error (Docker = 1.12).
|
||||
// This handler returns an empty object on success or a newly created JSON object with
|
||||
// the field message containing the error message on failure.
|
||||
// Used by the API in: container deletion, network deletion.
|
||||
function deleteGenericHandler(data) {
|
||||
// container the error (Docker = 1.12)
|
||||
// This handler ensure a valid JSON object is returned in any case.
|
||||
// Used by the API in: container deletion, network deletion, network creation, volume creation,
|
||||
// container exec, exec resize.
|
||||
function genericHandler(data) {
|
||||
var response = {};
|
||||
// No data is returned when deletion is successful (Docker 1.9 -> 1.12)
|
||||
if (!data) {
|
||||
|
|
|
@ -8,28 +8,43 @@ angular.module('uifordocker.services', ['ngResource', 'ngSanitize'])
|
|||
}, {
|
||||
query: {method: 'GET', params: {all: 0, action: 'json'}, isArray: true},
|
||||
get: {method: 'GET', params: {action: 'json'}},
|
||||
start: {method: 'POST', params: {id: '@id', action: 'start'}},
|
||||
stop: {method: 'POST', params: {id: '@id', t: 5, action: 'stop'}},
|
||||
restart: {method: 'POST', params: {id: '@id', t: 5, action: 'restart'}},
|
||||
kill: {method: 'POST', params: {id: '@id', action: 'kill'}},
|
||||
pause: {method: 'POST', params: {id: '@id', action: 'pause'}},
|
||||
unpause: {method: 'POST', params: {id: '@id', action: 'unpause'}},
|
||||
changes: {method: 'GET', params: {action: 'changes'}, isArray: true},
|
||||
create: {method: 'POST', params: {action: 'create'}},
|
||||
stats: {method: 'GET', params: {id: '@id', stream: false, action: 'stats'}, timeout: 5000},
|
||||
start: {
|
||||
method: 'POST', params: {id: '@id', action: 'start'},
|
||||
transformResponse: genericHandler
|
||||
},
|
||||
create: {
|
||||
method: 'POST', params: {action: 'create'},
|
||||
transformResponse: genericHandler
|
||||
},
|
||||
remove: {
|
||||
method: 'DELETE', params: {id: '@id', v: 0},
|
||||
transformResponse: deleteGenericHandler
|
||||
transformResponse: genericHandler
|
||||
},
|
||||
rename: {method: 'POST', params: {id: '@id', action: 'rename', name: '@name'}},
|
||||
stats: {method: 'GET', params: {id: '@id', stream: false, action: 'stats'}, timeout: 5000},
|
||||
exec: {method: 'POST', params: {id: '@id', action: 'exec'}}
|
||||
rename: {
|
||||
method: 'POST', params: {id: '@id', action: 'rename', name: '@name'},
|
||||
transformResponse: genericHandler
|
||||
},
|
||||
exec: {
|
||||
method: 'POST', params: {id: '@id', action: 'exec'},
|
||||
transformResponse: genericHandler
|
||||
}
|
||||
});
|
||||
}])
|
||||
.factory('Exec', ['$resource', 'Settings', function ExecFactory($resource, Settings) {
|
||||
'use strict';
|
||||
// https://docs.docker.com/engine/reference/api/docker_remote_api_<%= remoteApiVersion %>/#/exec-resize
|
||||
return $resource(Settings.url + '/exec/:id/:action', {}, {
|
||||
resize: {method: 'POST', params: {id: '@id', action: 'resize', h: '@height', w: '@width'}}
|
||||
resize: {
|
||||
method: 'POST', params: {id: '@id', action: 'resize', h: '@height', w: '@width'},
|
||||
transformResponse: genericHandler
|
||||
}
|
||||
});
|
||||
}])
|
||||
.factory('ContainerCommit', ['$resource', '$http', 'Settings', function ContainerCommitFactory($resource, $http, Settings) {
|
||||
|
@ -137,8 +152,8 @@ angular.module('uifordocker.services', ['ngResource', 'ngSanitize'])
|
|||
return $resource(Settings.url + '/networks/:id/:action', {id: '@id'}, {
|
||||
query: {method: 'GET', isArray: true},
|
||||
get: {method: 'GET'},
|
||||
create: {method: 'POST', params: {action: 'create'}},
|
||||
remove: { method: 'DELETE', transformResponse: deleteGenericHandler },
|
||||
create: {method: 'POST', params: {action: 'create'}, transformResponse: genericHandler},
|
||||
remove: { method: 'DELETE', transformResponse: genericHandler },
|
||||
connect: {method: 'POST', params: {action: 'connect'}},
|
||||
disconnect: {method: 'POST', params: {action: 'disconnect'}}
|
||||
});
|
||||
|
@ -149,7 +164,7 @@ angular.module('uifordocker.services', ['ngResource', 'ngSanitize'])
|
|||
return $resource(Settings.url + '/volumes/:name/:action', {name: '@name'}, {
|
||||
query: {method: 'GET'},
|
||||
get: {method: 'GET'},
|
||||
create: {method: 'POST', params: {action: 'create'}},
|
||||
create: {method: 'POST', params: {action: 'create'}, transformResponse: genericHandler},
|
||||
remove: {method: 'DELETE'}
|
||||
});
|
||||
}])
|
||||
|
|
|
@ -133,203 +133,4 @@ describe('filters', function () {
|
|||
expect(repotagFilter(image)).toBe('ubuntu:latest');
|
||||
}));
|
||||
});
|
||||
|
||||
describe('errorMsgFilter', function () {
|
||||
it('should convert the $resource object to a string message',
|
||||
inject(function (errorMsgFilter) {
|
||||
var response = {
|
||||
'0': 'C',
|
||||
'1': 'o',
|
||||
'2': 'n',
|
||||
'3': 'f',
|
||||
'4': 'l',
|
||||
'5': 'i',
|
||||
'6': 'c',
|
||||
'7': 't',
|
||||
'8': ',',
|
||||
'9': ' ',
|
||||
'10': 'T',
|
||||
'11': 'h',
|
||||
'12': 'e',
|
||||
'13': ' ',
|
||||
'14': 'n',
|
||||
'15': 'a',
|
||||
'16': 'm',
|
||||
'17': 'e',
|
||||
'18': ' ',
|
||||
'19': 'u',
|
||||
'20': 'b',
|
||||
'21': 'u',
|
||||
'22': 'n',
|
||||
'23': 't',
|
||||
'24': 'u',
|
||||
'25': '-',
|
||||
'26': 's',
|
||||
'27': 'l',
|
||||
'28': 'e',
|
||||
'29': 'e',
|
||||
'30': 'p',
|
||||
'31': '-',
|
||||
'32': 'r',
|
||||
'33': 'u',
|
||||
'34': 'n',
|
||||
'35': 't',
|
||||
'36': 'i',
|
||||
'37': 'm',
|
||||
'38': 'e',
|
||||
'39': ' ',
|
||||
'40': 'i',
|
||||
'41': 's',
|
||||
'42': ' ',
|
||||
'43': 'a',
|
||||
'44': 'l',
|
||||
'45': 'r',
|
||||
'46': 'e',
|
||||
'47': 'a',
|
||||
'48': 'd',
|
||||
'49': 'y',
|
||||
'50': ' ',
|
||||
'51': 'a',
|
||||
'52': 's',
|
||||
'53': 's',
|
||||
'54': 'i',
|
||||
'55': 'g',
|
||||
'56': 'n',
|
||||
'57': 'e',
|
||||
'58': 'd',
|
||||
'59': ' ',
|
||||
'60': 't',
|
||||
'61': 'o',
|
||||
'62': ' ',
|
||||
'63': 'b',
|
||||
'64': '6',
|
||||
'65': '9',
|
||||
'66': 'e',
|
||||
'67': '5',
|
||||
'68': '3',
|
||||
'69': 'a',
|
||||
'70': '6',
|
||||
'71': '2',
|
||||
'72': '2',
|
||||
'73': 'c',
|
||||
'74': '8',
|
||||
'75': '.',
|
||||
'76': ' ',
|
||||
'77': 'Y',
|
||||
'78': 'o',
|
||||
'79': 'u',
|
||||
'80': ' ',
|
||||
'81': 'h',
|
||||
'82': 'a',
|
||||
'83': 'v',
|
||||
'84': 'e',
|
||||
'85': ' ',
|
||||
'86': 't',
|
||||
'87': 'o',
|
||||
'88': ' ',
|
||||
'89': 'd',
|
||||
'90': 'e',
|
||||
'91': 'l',
|
||||
'92': 'e',
|
||||
'93': 't',
|
||||
'94': 'e',
|
||||
'95': ' ',
|
||||
'96': '(',
|
||||
'97': 'o',
|
||||
'98': 'r',
|
||||
'99': ' ',
|
||||
'100': 'r',
|
||||
'101': 'e',
|
||||
'102': 'n',
|
||||
'103': 'a',
|
||||
'104': 'm',
|
||||
'105': 'e',
|
||||
'106': ')',
|
||||
'107': ' ',
|
||||
'108': 't',
|
||||
'109': 'h',
|
||||
'110': 'a',
|
||||
'111': 't',
|
||||
'112': ' ',
|
||||
'113': 'c',
|
||||
'114': 'o',
|
||||
'115': 'n',
|
||||
'116': 't',
|
||||
'117': 'a',
|
||||
'118': 'i',
|
||||
'119': 'n',
|
||||
'120': 'e',
|
||||
'121': 'r',
|
||||
'122': ' ',
|
||||
'123': 't',
|
||||
'124': 'o',
|
||||
'125': ' ',
|
||||
'126': 'b',
|
||||
'127': 'e',
|
||||
'128': ' ',
|
||||
'129': 'a',
|
||||
'130': 'b',
|
||||
'131': 'l',
|
||||
'132': 'e',
|
||||
'133': ' ',
|
||||
'134': 't',
|
||||
'135': 'o',
|
||||
'136': ' ',
|
||||
'137': 'a',
|
||||
'138': 's',
|
||||
'139': 's',
|
||||
'140': 'i',
|
||||
'141': 'g',
|
||||
'142': 'n',
|
||||
'143': ' ',
|
||||
'144': 'u',
|
||||
'145': 'b',
|
||||
'146': 'u',
|
||||
'147': 'n',
|
||||
'148': 't',
|
||||
'149': 'u',
|
||||
'150': '-',
|
||||
'151': 's',
|
||||
'152': 'l',
|
||||
'153': 'e',
|
||||
'154': 'e',
|
||||
'155': 'p',
|
||||
'156': '-',
|
||||
'157': 'r',
|
||||
'158': 'u',
|
||||
'159': 'n',
|
||||
'160': 't',
|
||||
'161': 'i',
|
||||
'162': 'm',
|
||||
'163': 'e',
|
||||
'164': ' ',
|
||||
'165': 't',
|
||||
'166': 'o',
|
||||
'167': ' ',
|
||||
'168': 'a',
|
||||
'169': ' ',
|
||||
'170': 'c',
|
||||
'171': 'o',
|
||||
'172': 'n',
|
||||
'173': 't',
|
||||
'174': 'a',
|
||||
'175': 'i',
|
||||
'176': 'n',
|
||||
'177': 'e',
|
||||
'178': 'r',
|
||||
'179': ' ',
|
||||
'180': 'a',
|
||||
'181': 'g',
|
||||
'182': 'a',
|
||||
'183': 'i',
|
||||
'184': 'n',
|
||||
'185': '.',
|
||||
'186': '\n',
|
||||
'$promise': {},
|
||||
'$resolved': true
|
||||
};
|
||||
var message = 'Conflict, The name ubuntu-sleep-runtime is already assigned to b69e53a622c8. You have to delete (or rename) that container to be able to assign ubuntu-sleep-runtime to a container again.\n';
|
||||
expect(errorMsgFilter(response)).toBe(message);
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue