1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 15:29:42 +02:00

Removed typescript

This commit is contained in:
Michael Crosby 2013-06-08 16:20:29 -09:00
parent 353751ea4e
commit af0cce171e
10 changed files with 154 additions and 525 deletions

View file

@ -1,124 +1,33 @@
'use strict';
angular.module('dockerui.services', [
'ngResource'
]).factory('Container', function ($resource, DOCKER_ENDPOINT) {
return $resource(DOCKER_ENDPOINT + '/containers/:id/:action', {
}, {
query: {
method: 'GET',
params: {
all: 0,
action: 'json'
},
isArray: true
},
get: {
method: 'GET',
params: {
action: 'json'
}
},
start: {
method: 'POST',
params: {
action: 'start'
}
},
stop: {
method: 'POST',
params: {
t: 5,
action: 'stop'
}
},
restart: {
method: 'POST',
params: {
t: 5,
action: 'restart'
}
},
kill: {
method: 'POST',
params: {
action: 'kill'
}
},
changes: {
method: 'GET',
params: {
action: 'changes'
},
isArray: true
},
create: {
method: 'POST',
params: {
action: 'create'
}
},
remove: {
method: 'DELETE',
params: {
v: 0
}
}
angular.module('dockerui.services', ['ngResource'])
.factory('Container', function($resource, DOCKER_ENDPOINT) {
// Resource for interacting with the docker containers
// http://docs.docker.io/en/latest/api/docker_remote_api.html#containers
return $resource(DOCKER_ENDPOINT + '/containers/:id/:action', {}, {
query: {method: 'GET', params:{ all: 0, action: 'json'}, isArray: true},
get :{method: 'GET', params: { action:'json'}},
start: {method: 'POST', params: { action: 'start'}},
stop: {method: 'POST', params: {t: 5, action: 'stop'}},
restart: {method: 'POST', params: {t: 5, action: 'restart' }},
kill :{method: 'POST', params: {action:'kill'}},
changes :{method: 'GET', params: {action:'changes'}, isArray: true},
create :{method: 'POST', params: {action:'create'}},
remove :{method: 'DELETE', params: {v:0}}
});
})
.factory('Image', function($resource, DOCKER_ENDPOINT) {
// Resource for docker images
// http://docs.docker.io/en/latest/api/docker_remote_api.html#images
return $resource(DOCKER_ENDPOINT + '/images/:name/:action', {}, {
query: {method: 'GET', params:{ all: 0, action: 'json'}, isArray: true},
get :{method: 'GET', params: { action:'json'}},
search :{method: 'GET', params: { action:'search'}},
history :{method: 'GET', params: { action:'history'}},
create :{method: 'POST', params: {action:'create'}},
insert :{method: 'POST', params: {action:'insert'}},
push :{method: 'POST', params: {action:'push'}},
tag :{method: 'POST', params: {action:'tag'}},
delete :{method: 'DELETE'}
});
});
}).factory('Image', function ($resource, DOCKER_ENDPOINT) {
return $resource(DOCKER_ENDPOINT + '/images/:name/:action', {
}, {
query: {
method: 'GET',
params: {
all: 0,
action: 'json'
},
isArray: true
},
get: {
method: 'GET',
params: {
action: 'json'
}
},
search: {
method: 'GET',
params: {
action: 'search'
}
},
history: {
method: 'GET',
params: {
action: 'history'
}
},
create: {
method: 'POST',
params: {
action: 'create'
}
},
insert: {
method: 'POST',
params: {
action: 'insert'
}
},
push: {
method: 'POST',
params: {
action: 'push'
}
},
tag: {
method: 'POST',
params: {
action: 'tag'
}
},
delete: {
method: 'DELETE'
}
});
});