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>IOPS Max</td>
|
||||||
<td>{{ $ctrl.volume.IOPSMax }}</td>
|
<td>{{ $ctrl.volume.IOPSMax }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Bandwidth Min</td>
|
||||||
|
<td>{{ $ctrl.volume.BandwidthMin }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Bandwidth Max</td>
|
||||||
|
<td>{{ $ctrl.volume.BandwidthMax }}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Local Drive Only</td>
|
<td>Local Drive Only</td>
|
||||||
<td>{{ $ctrl.volume.LocalDriveOnly }}</td>
|
<td>{{ $ctrl.volume.LocalDriveOnly }}</td>
|
||||||
|
|
|
@ -4,6 +4,8 @@ export function StoridgeVolumeModel(data) {
|
||||||
this.Directory = data.directory;
|
this.Directory = data.directory;
|
||||||
this.IOPSMax = data.maximumIOPS;
|
this.IOPSMax = data.maximumIOPS;
|
||||||
this.IOPSMin = data.minimumIOPS;
|
this.IOPSMin = data.minimumIOPS;
|
||||||
|
this.BandwidthMin = data.minimumBandwidth;
|
||||||
|
this.BandwidthMax = data.maximumBandwidth;
|
||||||
this.LocalDriveOnly = data.localDriveOnly;
|
this.LocalDriveOnly = data.localDriveOnly;
|
||||||
this.Name = data.name;
|
this.Name = data.name;
|
||||||
this.Node = data.node;
|
this.Node = data.node;
|
||||||
|
|
|
@ -100,7 +100,7 @@ function ($scope, $state, $transition$, Notifications, StoridgeProfileService) {
|
||||||
function initView() {
|
function initView() {
|
||||||
var profile = new StoridgeProfileDefaultModel();
|
var profile = new StoridgeProfileDefaultModel();
|
||||||
profile.Name = $transition$.params().profileName;
|
profile.Name = $transition$.params().profileName;
|
||||||
profile.Directory = '/cio/' + _.toLower(profile.Name);
|
profile.Directory = profile.Directory + _.toLower(profile.Name);
|
||||||
$scope.model = profile;
|
$scope.model = profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import _ from 'lodash-es';
|
||||||
import { StoridgeProfileDefaultModel } from '../../models/profile';
|
import { StoridgeProfileDefaultModel } from '../../models/profile';
|
||||||
|
|
||||||
angular.module('extension.storidge')
|
angular.module('extension.storidge')
|
||||||
|
@ -37,7 +38,11 @@ function ($q, $scope, $state, Notifications, StoridgeProfileService) {
|
||||||
var model = new StoridgeProfileDefaultModel();
|
var model = new StoridgeProfileDefaultModel();
|
||||||
model.Labels = {};
|
model.Labels = {};
|
||||||
model.Name = $scope.formValues.Name;
|
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;
|
$scope.state.actionInProgress = true;
|
||||||
StoridgeProfileService.create(model)
|
StoridgeProfileService.create(model)
|
||||||
|
|
Loading…
Reference in New Issue