mirror of https://github.com/portainer/portainer
fix(storidge): update 7 - profiles creation + volume details
parent
daacef199a
commit
74382352f8
|
@ -54,6 +54,14 @@
|
|||
<td>IOPS Max</td>
|
||||
<td>{{ $ctrl.volume.IOPSMax }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bandwidth Min</td>
|
||||
<td>{{ $ctrl.volume.BandwidthMin }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bandwidth Max</td>
|
||||
<td>{{ $ctrl.volume.BandwidthMax }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Local Drive Only</td>
|
||||
<td>{{ $ctrl.volume.LocalDriveOnly }}</td>
|
||||
|
|
|
@ -4,6 +4,8 @@ export function StoridgeVolumeModel(data) {
|
|||
this.Directory = data.directory;
|
||||
this.IOPSMax = data.maximumIOPS;
|
||||
this.IOPSMin = data.minimumIOPS;
|
||||
this.BandwidthMin = data.minimumBandwidth;
|
||||
this.BandwidthMax = data.maximumBandwidth;
|
||||
this.LocalDriveOnly = data.localDriveOnly;
|
||||
this.Name = data.name;
|
||||
this.Node = data.node;
|
||||
|
|
|
@ -100,7 +100,7 @@ function ($scope, $state, $transition$, Notifications, StoridgeProfileService) {
|
|||
function initView() {
|
||||
var profile = new StoridgeProfileDefaultModel();
|
||||
profile.Name = $transition$.params().profileName;
|
||||
profile.Directory = '/cio/' + _.toLower(profile.Name);
|
||||
profile.Directory = profile.Directory + _.toLower(profile.Name);
|
||||
$scope.model = profile;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import _ from 'lodash-es';
|
||||
import { StoridgeProfileDefaultModel } from '../../models/profile';
|
||||
|
||||
angular.module('extension.storidge')
|
||||
|
@ -37,7 +38,11 @@ function ($q, $scope, $state, Notifications, StoridgeProfileService) {
|
|||
var model = new StoridgeProfileDefaultModel();
|
||||
model.Labels = {};
|
||||
model.Name = $scope.formValues.Name;
|
||||
model.Directory = model.Directory + model.Name;
|
||||
model.Directory = model.Directory + _.toLower(model.Name);
|
||||
delete model.MinBandwidth;
|
||||
delete model.MaxBandwidth;
|
||||
delete model.MinIOPS;
|
||||
delete model.MaxIOPS;
|
||||
|
||||
$scope.state.actionInProgress = true;
|
||||
StoridgeProfileService.create(model)
|
||||
|
|
Loading…
Reference in New Issue