diff --git a/src/js/client.js b/src/js/client.js index badb516cd..7e579346e 100644 --- a/src/js/client.js +++ b/src/js/client.js @@ -395,7 +395,8 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout accessRestriction: config.accessRestriction, cert: config.cert, key: config.key, - sso: config.sso + sso: config.sso, + overwriteDns: config.overwriteDns }; post('/api/v1/apps/install', data, null, function (error, data, status) { diff --git a/src/views/appstore.html b/src/views/appstore.html index 3686be570..570ad63ba 100644 --- a/src/views/appstore.html +++ b/src/views/appstore.html @@ -35,10 +35,6 @@ -
Add an A record manually for {{ appInstall.location }} to this Cloudron's public IP
@@ -159,7 +155,7 @@
-
+
diff --git a/src/views/appstore.js b/src/views/appstore.js
index d68d3fb69..4b5147ed6 100644
--- a/src/views/appstore.js
+++ b/src/views/appstore.js
@@ -43,7 +43,6 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
error: {},
app: {},
needsOverwrite: false,
- overwriteDns: false,
location: '',
domain: null,
portBindings: {},
@@ -67,7 +66,6 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
$scope.appInstall.app = {};
$scope.appInstall.error = {};
$scope.appInstall.needsOverwrite = false;
- $scope.appInstall.overwriteDns = false;
$scope.appInstall.location = '';
$scope.appInstall.domain = null;
$scope.appInstall.portBindings = {};
@@ -151,7 +149,6 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
$scope.appInstall.error.other = null;
$scope.appInstall.error.location = null;
$scope.appInstall.error.port = null;
- $scope.appInstall.needsOverwrite = false;
// only use enabled ports from portBindings
var finalPortBindings = {};
@@ -169,7 +166,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
}
var data = {
- overwriteDns: $scope.appInstall.overwriteDns,
+ overwriteDns: $scope.appInstall.needsOverwrite,
location: $scope.appInstall.location || '',
domain: $scope.appInstall.domain.domain,
portBindings: finalPortBindings,
@@ -185,7 +182,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
if (!data.overwriteDns) {
if (result.error || result.needsOverwrite) {
$scope.appInstall.needsOverwrite = true;
- $scope.appInstall.error.location = result.error ? result.error.message : 'DNS Record already exists outside of Cloudron';
+ $scope.appInstall.error.location = result.error ? result.error.message : 'DNS Record already exists outside of Cloudron. Resubmit to overwrite.';
$scope.appInstall.busy = false;
$scope.appInstallForm.location.$setPristine();
$('#appInstallLocationInput').focus();