diff --git a/src/views/app.html b/src/views/app.html index d2213620c..b1ee38c22 100644 --- a/src/views/app.html +++ b/src/views/app.html @@ -438,17 +438,16 @@
+ +

+ By default, this app's data is located at /home/yellowtent/appsdata/{{ app.id }}. If the server is running out of disk space, + you can mount an external disk and move this app's data there. +

-
- - -

- By default, this app's data is located at /home/yellowtent/appsdata/{{ app.id }}. If the server is running out of disk space, - you can mount an external disk and move this app's data there. -

-
{{ resources.error.dataDir }}
- +
+
{{ resources.error.dataDir }}
+
diff --git a/src/views/app.js b/src/views/app.js index dd64c15ce..ed437b0d1 100644 --- a/src/views/app.js +++ b/src/views/app.js @@ -306,8 +306,6 @@ angular.module('Application').controller('AppController', ['$scope', '$location' memoryLimit: 0, memoryTicks: [], dataDir: null, - currentDataDirEnabled: false, - dataDirEnabled: false, show: function () { var app = $scope.app; @@ -315,8 +313,6 @@ angular.module('Application').controller('AppController', ['$scope', '$location' $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; - $scope.resources.currentDataDirEnabled = $scope.resources.dataDirEnabled $scope.resources.dataDir = app.dataDir; // create ticks starting from manifest memory limit. the memory limit here is currently split into ram+swap (and thus *2 below) @@ -350,7 +346,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location' $scope.resources.busyDataDir = true; $scope.resources.error = {}; - Client.configureApp($scope.app.id, 'data_dir', { dataDir: $scope.resources.dataDirEnabled ? $scope.resources.dataDir : null }, function (error) { + Client.configureApp($scope.app.id, 'data_dir', { dataDir: $scope.resources.dataDir || null }, function (error) { if (error && error.statusCode === 400) { $scope.resources.error.dataDir = error.message; $scope.resources.busyDataDir = false; @@ -358,7 +354,6 @@ angular.module('Application').controller('AppController', ['$scope', '$location' } if (error) return Client.error(error); - $scope.resources.currentDataDirEnabled = $scope.resources.dataDirEnabled; $scope.resourcesDataDirForm.$setPristine(); $scope.resources.busyDataDir = false;