1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-21 22:39:41 +02:00

Moved LineChart to services, cleaned up remaining functions in controller, cleanup.

This commit is contained in:
Kevan Ahlquist 2014-11-29 00:06:06 -06:00
parent e3eb37ba56
commit ada1c6a4e4
9 changed files with 82 additions and 83 deletions

View file

@ -13,6 +13,10 @@ function($scope, $routeParams, $location, Container, Messages) {
};
$scope.commandPlaceholder = '["/bin/echo", "Hello world"]';
function failedRequestHandler(e, Messages) {
Messages.send({class: 'text-error', data: e.data});
}
$scope.create = function() {
var cmds = null;
if ($scope.config.commands !== '') {
@ -39,6 +43,8 @@ function($scope, $routeParams, $location, Container, Messages) {
}, function(e) {
failedRequestHandler(e, Messages);
});
} else {
failedRequestHandler(d, Messages);
}
}, function(e) {
failedRequestHandler(e, Messages);