mirror of
https://github.com/portainer/portainer.git
synced 2025-08-07 23:05:26 +02:00
This commit is contained in:
parent
d2702d6d7b
commit
5bca9560c9
16 changed files with 278 additions and 10 deletions
|
@ -10,7 +10,6 @@ angular.module('portainer.app')
|
|||
|
||||
service.buildImage = function(names, file, path) {
|
||||
var endpointID = EndpointProvider.endpointID();
|
||||
Upload.setDefaults({ ngfMinSize: 10 });
|
||||
return Upload.http({
|
||||
url: 'api/endpoints/' + endpointID + '/docker/build',
|
||||
headers : {
|
||||
|
@ -28,6 +27,18 @@ angular.module('portainer.app')
|
|||
});
|
||||
};
|
||||
|
||||
service.loadImages = function(file) {
|
||||
var endpointID = EndpointProvider.endpointID();
|
||||
return Upload.http({
|
||||
url: 'api/endpoints/' + endpointID + '/docker/images/load',
|
||||
headers : {
|
||||
'Content-Type': file.type
|
||||
},
|
||||
data: file,
|
||||
ignoreLoadingBar: true
|
||||
});
|
||||
};
|
||||
|
||||
service.createSwarmStack = function(stackName, swarmId, file, env, endpointId) {
|
||||
return Upload.upload({
|
||||
url: 'api/stacks?method=file&type=1&endpointId=' + endpointId,
|
||||
|
|
|
@ -156,6 +156,20 @@ angular.module('portainer.app')
|
|||
});
|
||||
};
|
||||
|
||||
service.confirmImageExport = function(callback) {
|
||||
service.confirm({
|
||||
title: 'Caution',
|
||||
message: 'The export may take several minutes, do not navigate away whilst the export is in progress.',
|
||||
buttons: {
|
||||
confirm: {
|
||||
label: 'Continue',
|
||||
className: 'btn-primary'
|
||||
}
|
||||
},
|
||||
callback: callback
|
||||
});
|
||||
};
|
||||
|
||||
service.confirmServiceForceUpdate = function(message, callback) {
|
||||
service.customPrompt({
|
||||
title: 'Are you sure ?',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue