|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
angular.module('templates', [])
|
|
|
|
|
.controller('TemplatesController', ['$scope', '$q', '$state', '$filter', '$anchorScroll', 'Config', 'Info', 'Container', 'ContainerHelper', 'Image', 'Volume', 'Network', 'Templates', 'TemplateHelper', 'Messages', 'Settings',
|
|
|
|
|
function ($scope, $q, $state, $filter, $anchorScroll, Config, Info, Container, ContainerHelper, Image, Volume, Network, Templates, TemplateHelper, Messages, Settings) {
|
|
|
|
|
.controller('TemplatesController', ['$scope', '$q', '$state', '$filter', '$anchorScroll', 'Config', 'Info', 'Container', 'ContainerHelper', 'Image', 'ImageHelper', 'Volume', 'Network', 'Templates', 'TemplateHelper', 'Messages', 'Settings',
|
|
|
|
|
function ($scope, $q, $state, $filter, $anchorScroll, Config, Info, Container, ContainerHelper, Image, ImageHelper, Volume, Network, Templates, TemplateHelper, Messages, Settings) {
|
|
|
|
|
$scope.state = {
|
|
|
|
|
selectedTemplate: null,
|
|
|
|
|
showAdvancedOptions: false
|
|
|
|
@ -135,7 +135,7 @@ function ($scope, $q, $state, $filter, $anchorScroll, Config, Info, Container, C
|
|
|
|
|
|
|
|
|
|
function prepareImageConfig(config, template) {
|
|
|
|
|
var image = _.toLower(template.image);
|
|
|
|
|
var registry = template.registry;
|
|
|
|
|
var registry = template.registry || '';
|
|
|
|
|
var imageConfig = ImageHelper.createImageConfigForContainer(image, registry);
|
|
|
|
|
config.Image = imageConfig.fromImage + ':' + imageConfig.tag;
|
|
|
|
|
$scope.imageConfig = imageConfig;
|
|
|
|
|