set non-custom domain provider as caas

This commit is contained in:
Girish Ramakrishnan
2015-10-29 12:21:06 -07:00
parent 06aaf98716
commit eb6a217f4a

View File

@@ -202,7 +202,7 @@ app.controller('CustomDomainController', [ '$scope', '$location', 'Wizard', func
$scope.wizard = Wizard;
if (Wizard.dnsConfig === null) $location.path('/step4'); // not using custom domain
if (Wizard.dnsConfig.provider === 'caas') $location.path('/step4'); // not using custom domain
}]);
app.controller('FinishController', ['$scope', '$location', 'Wizard', 'Client', function ($scope, $location, Wizard, Client) {
@@ -218,11 +218,6 @@ app.controller('FinishController', ['$scope', '$location', 'Wizard', 'Client', f
Client.changeCloudronAvatar($scope.wizard.avatarBlob, function (error) {
if (error) return console.error('Unable to set avatar.', error);
if ($scope.wizard.dnsConfig === null) {
window.location.href = '/';
return;
}
Client.setDnsConfig($scope.wizard.dnsConfig, function (error) {
if (error) return console.error('Unable to set dns config.', error);
@@ -250,6 +245,10 @@ app.controller('SetupController', ['$scope', '$location', 'Client', 'Wizard', fu
accessKeyId: null,
secretAccessKey: null
};
} else {
Wizard.dnsConfig = {
provider: 'caas'
};
}
Client.isServerFirstTime(function (error, isFirstTime) {