diff --git a/src/filemanager.html b/src/filemanager.html
index 85064f4d5..7f555593e 100644
--- a/src/filemanager.html
+++ b/src/filemanager.html
@@ -319,6 +319,9 @@
{{ 'filemanager.toolbar.restartApp' | tr }}
{{ 'filemanager.toolbar.openLogs' | tr }}
{{ 'filemanager.toolbar.openTerminal' | tr }}
+
+ Volumes
+ {{ volume.name }}
diff --git a/src/js/filemanager.js b/src/js/filemanager.js
index 0915d81c8..2b6b67ed1 100644
--- a/src/js/filemanager.js
+++ b/src/js/filemanager.js
@@ -75,6 +75,7 @@ app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Cl
$scope.sortAsc = true;
$scope.sortProperty = 'fileName';
$scope.view = 'fileTree';
+ $scope.volumes = [];
$scope.owners = [
{ name: 'cloudron', value: 1000 },
@@ -703,6 +704,22 @@ app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Cl
}
};
+ function fetchVolumesInfo(mounts) {
+ $scope.volumes = [];
+
+ async.each(mounts, function (mount, callback) {
+ Client.getVolume(mount.volumeId, function (error, result) {
+ if (error) return callback(error);
+
+ $scope.volumes.push(result);
+
+ callback();
+ });
+ }, function (error) {
+ if (error) console.error('Failed to fetch volumes info.', error);
+ });
+ }
+
function init() {
Client.getStatus(function (error, status) {
@@ -738,6 +755,9 @@ app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Cl
return;
}
+ // fine to do async
+ fetchVolumesInfo(result.mounts || []);
+
$scope.title = $scope.type === 'app' ? (result.label || result.fqdn) : result.name;
window.document.title = $scope.title + ' - ' + $translate.instant('filemanager.title');