Overwrite existing DNS records in repair

This commit is contained in:
Girish Ramakrishnan
2019-09-27 15:39:11 -07:00
parent 417640cfbe
commit 47282afa22
2 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -111,9 +111,10 @@
<h4 class="modal-title">Repair {{ app.fqdn }}</h4>
</div>
<div class="modal-body">
<p>The <b>{{ app.error.task | taskName }}</b> operation failed. Click repair to retry.</p>
<p>The <b>{{ app.error.task | taskName }}</b> operation failed with the following error:</p>
<p class="text-danger">{{ app.error.reason + ': ' + app.error.message }}</p>
<div class="form-group" ng-show="repair.location && repair.domain">
<p>Cloudron will repair the app to use the following domains:</p>
<label class="control-label">Location</label>
<div class="input-group form-inline">
<input type="text" class="form-control" ng-model="repair.location" name="location" placeholder="{{ 'Leave empty to use bare domain' }}" autofocus>
+3 -1
View File
@@ -866,7 +866,9 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
if ($scope.app.error.domain) {
data.location = $scope.repair.location;
data.domain = $scope.repair.domain.domain;
data.alternateDomains = $scope.repair.alternateDomains.filter(function (a) { return a.enabled; }).map(function (d) { return { subdomain: d.subdomain, domain: d.domain.domain })
data.alternateDomains = $scope.repair.alternateDomains.filter(function (a) { return a.enabled; })
.map(function (d) { return { subdomain: d.subdomain, domain: d.domain.domain }; });
data.overwriteDns = true; // always overwriteDns. user can anyway check and uncheck above
}
if ($scope.app.error.backupId) {