Ensure error states are cleared

This commit is contained in:
Johannes Zellner
2019-09-19 18:31:11 +02:00
parent 506accfe9b
commit 48d4935c7d

View File

@@ -105,6 +105,8 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
show: function () {
var app = $scope.app;
$scope.display.error = {};
// translate for tag-input
$scope.display.tags = app.tags ? app.tags.join(',') : '';
@@ -182,6 +184,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
show: function () {
var app = $scope.app;
$scope.location.error = {};
$scope.location.location = app.location;
$scope.location.domain = $scope.domains.filter(function (d) { return d.domain === app.domain; })[0];
$scope.location.portBindingsInfo = angular.extend({}, app.manifest.tcpPorts, app.manifest.udpPorts); // Portbinding map only for information
@@ -258,6 +261,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
show: function () {
var app = $scope.app;
$scope.access.error = {};
$scope.access.ftp = app.manifest.addons.localstorage && app.manifest.addons.localstorage.ftp;
$scope.access.ssoAuth = (app.manifest.addons['ldap'] || app.manifest.addons['oauth']) && app.sso;
$scope.access.accessRestrictionOption = app.accessRestriction ? 'groups' : 'any';
@@ -311,6 +315,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
show: function () {
var app = $scope.app;
$scope.resources.error = {};
$scope.resources.currentMemoryLimit = app.memoryLimit || app.manifest.memoryLimit || (256 * 1024 * 1024);
$scope.resources.memoryLimit = $scope.resources.currentMemoryLimit;
$scope.resources.dataDirEnabled = !!app.dataDir;
@@ -377,6 +382,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
show: function () {
var app = $scope.app;
$scope.email.error = {};
$scope.email.mailboxNameEnabled = app.mailboxName && (app.mailboxName.match(/\.app$/) === null);
$scope.email.mailboxName = app.mailboxName || '';
$scope.email.domain = $scope.domains.filter(function (d) { return d.domain === app.domain; })[0];
@@ -414,6 +420,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
show: function () {
var app = $scope.app;
$scope.security.error = {};
$scope.security.currentRobotsTxt = app.robotsTxt;
$scope.security.robotsTxt = $scope.security.currentRobotsTxt;
},
@@ -524,6 +531,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
show: function () {
var app = $scope.app;
$scope.backups.error = {};
$scope.backups.enableBackup = app.enableBackup;
Client.getAppBackups(app.id, function (error, backups) {
@@ -563,6 +571,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
error: {},
show: function () {
$scope.uninstall.error = {};
},
ask: function () {
@@ -623,6 +632,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
show: function (backup) {
var app = $scope.app;
$scope.clone.error = {};
$scope.clone.backup = backup;
$scope.clone.domain = $scope.domains.find(function (d) { return app.domain === d.domain; }); // pre-select the app's domain
$scope.clone.portBindingsInfo = angular.extend({}, app.manifest.tcpPorts, app.manifest.udpPorts); // Portbinding map only for information