clone: use manifest from the backup
This commit is contained in:
@@ -1585,7 +1585,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
portBindingsEnabled: {},
|
||||
|
||||
show: function (backup) {
|
||||
var app = $scope.app; // FIXME: should choose "app" from the backup's manifest
|
||||
var app = $scope.app;
|
||||
|
||||
$scope.clone.error = {};
|
||||
$scope.clone.backup = backup;
|
||||
@@ -1595,14 +1595,16 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
$scope.clone.overwriteDns = false;
|
||||
|
||||
$scope.clone.secondaryDomains = {};
|
||||
app.secondaryDomains.forEach(function (sd) {
|
||||
$scope.clone.secondaryDomains[sd.environmentVariable] = {
|
||||
subdomain: sd.subdomain,
|
||||
domain: $scope.domains.filter(function (d) { return d.domain === sd.domain; })[0]
|
||||
};
|
||||
});
|
||||
|
||||
$scope.clone.portBindingsInfo = angular.extend({}, app.manifest.tcpPorts, app.manifest.udpPorts); // Portbinding map only for information
|
||||
var httpPorts = backup.manifest.httpPorts || {};
|
||||
for (var env2 in httpPorts) {
|
||||
$scope.clone.secondaryDomains[env2] = {
|
||||
subdomain: httpPorts[env2].defaultValue || '',
|
||||
domain: $scope.clone.domain
|
||||
};
|
||||
}
|
||||
|
||||
$scope.clone.portBindingsInfo = angular.extend({}, backup.manifest.tcpPorts, backup.manifest.udpPorts); // Portbinding map only for information
|
||||
// set default ports
|
||||
for (var env in $scope.clone.portBindingsInfo) {
|
||||
$scope.clone.portBindings[env] = $scope.clone.portBindingsInfo[env].defaultValue || 0;
|
||||
|
||||
Reference in New Issue
Block a user