Fix mounting UI
This commit is contained in:
+1
-2
@@ -836,8 +836,7 @@
|
||||
<tbody>
|
||||
<tr ng-repeat="mount in storage.mounts">
|
||||
<td>
|
||||
<select class="form-control" ng-model="mount.volume">
|
||||
<option ng-repeat="volume in volumes" value="{{ volume }}">{{ volume.name }} ({{ volume.hostPath }})</option>
|
||||
<select class="form-control" ng-model="mount.volume" ng-options="v as v.name + ' (' + v.hostPath + ')' for v in volumes">
|
||||
</select>
|
||||
</td>
|
||||
<td class="text-left elide-table-cell hidden-xs hidden-sm">
|
||||
|
||||
+2
-3
@@ -546,7 +546,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
$scope.storage.dataDir = app.dataDir;
|
||||
$scope.storage.mounts = [];
|
||||
|
||||
Object.keys(app.mounts).forEach(function (mount) { // { volumeId, readOnly }
|
||||
app.mounts.forEach(function (mount) { // { volumeId, readOnly }
|
||||
var volume = $scope.volumes.find(function (v) { return v.id === mount.volumeId; });
|
||||
$scope.storage.mounts.push({ volume: volume, readOnly: mount.readOnly });
|
||||
});
|
||||
@@ -575,7 +575,6 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
},
|
||||
|
||||
addMount: function (event) {
|
||||
console.log('Will add a mount');
|
||||
event.preventDefault();
|
||||
$scope.storage.mounts.push({
|
||||
volume: $scope.volumes[0],
|
||||
@@ -594,7 +593,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
|
||||
var data = [];
|
||||
$scope.storage.mounts.forEach(function (mount) {
|
||||
data.push({ volumeId: mount.volumeId, readOnly: mount.readOnly });
|
||||
data.push({ volumeId: mount.volume.id, readOnly: mount.readOnly });
|
||||
});
|
||||
|
||||
Client.configureApp($scope.app.id, 'mounts', { mounts: data }, function (error) {
|
||||
|
||||
Reference in New Issue
Block a user