1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 22:05:23 +02:00

feat(app): push pull service creation

This commit is contained in:
xAt0mZ 2019-11-21 18:08:36 +01:00
parent 507158e69c
commit e92dcd1450
3 changed files with 3 additions and 8 deletions

View file

@ -159,7 +159,6 @@ function ($q, $scope, $state, $timeout, Service, ServiceHelper, ConfigService, C
$scope.formValues.LogDriverOpts.splice(index, 1);
};
// TODO CHANGE
function prepareImageConfig(config, input) {
var imageConfig = ImageHelper.createImageConfigForContainer(input.RegistryModel);
config.TaskTemplate.ContainerSpec.Image = imageConfig.fromImage;
@ -427,11 +426,9 @@ function ($q, $scope, $state, $timeout, Service, ServiceHelper, ConfigService, C
return config;
}
// TODO CHANGE
function createNewService(config, accessControlData) {
var registry = $scope.formValues.Registry;
var authenticationDetails = registry.Authentication ? RegistryService.encodedCredentials(registry) : '';
const registryModel = $scope.formValues.RegistryModel;
var authenticationDetails = registryModel.Registry.Authentication ? RegistryService.encodedCredentials(registryModel.Registry) : '';
HttpRequestHelper.setRegistryAuthenticationHeader(authenticationDetails);
Service.create(config).$promise

View file

@ -125,7 +125,7 @@
</div>
<div class="form-group">
<div class="col-sm-12">
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !formValues.Image" ng-click="create()" button-spinner="state.actionInProgress">
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !formValues.RegistryModel.Image" ng-click="create()" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress">Create the service</span>
<span ng-show="state.actionInProgress">Creating service...</span>
</button>

View file

@ -111,5 +111,3 @@ function RegistryServiceFactory($q, $async, Registries, DockerHubService, ImageH
return service;
}]);
// retrieveRegistryFromRepository