mirror of https://github.com/portainer/portainer
201 lines
12 KiB
HTML
201 lines
12 KiB
HTML
<rd-header>
|
|
<rd-header-title title-text="Create profile"></rd-header-title>
|
|
<rd-header-content>
|
|
<a ui-sref="storidge.cluster">Storidge</a> > <a ui-sref="storidge.profiles">Profiles</a> > Add profile
|
|
</rd-header-content>
|
|
</rd-header>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<rd-widget>
|
|
<rd-widget-body>
|
|
<form class="form-horizontal" name="storidgeCreateProfileForm">
|
|
<!-- name-input -->
|
|
<div class="form-group" ng-class="{ 'has-error': storidgeCreateProfileForm.profile_name.$invalid }">
|
|
<label for="profile_name" class="col-sm-2 col-lg-1 control-label text-left">Name</label>
|
|
<div class="col-sm-10 col-lg-11">
|
|
<input type="text" class="form-control" ng-model="model.Name" name="profile_name" placeholder="e.g. myProfile" ng-change="updatedName()" required>
|
|
</div>
|
|
</div>
|
|
<div class="form-group" ng-show="storidgeCreateProfileForm.profile_name.$invalid">
|
|
<div class="col-sm-12 small text-warning">
|
|
<div ng-messages="storidgeCreateProfileForm.profile_name.$error">
|
|
<p ng-message="required"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field is required.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- !name-input -->
|
|
<div class="col-sm-12 form-section-title">
|
|
Profile configuration
|
|
</div>
|
|
<!-- directory -->
|
|
<div class="form-group" ng-class="{ 'has-error': storidgeCreateProfileForm.profile_directory.$invalid }">
|
|
<label for="profile_directory" class="col-sm-2 col-lg-1 control-label text-left">Directory</label>
|
|
<div class="col-sm-10 col-lg-11">
|
|
<input type="text" class="form-control" ng-model="model.Directory" name="profile_directory" placeholder="e.g. /cio/myProfile" ng-change="updatedDirectory()" required>
|
|
</div>
|
|
</div>
|
|
<div class="form-group" ng-show="storidgeCreateProfileForm.profile_directory.$invalid">
|
|
<div class="col-sm-12 small text-warning">
|
|
<div ng-messages="storidgeCreateProfileForm.profile_directory.$error">
|
|
<p ng-message="required"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field is required.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- !directory -->
|
|
<!-- capacity -->
|
|
<div class="form-group" ng-class="{ 'has-error': storidgeCreateProfileForm.profile_capacity.$invalid }">
|
|
<label for="profile_capacity" class="col-sm-2 col-lg-1 control-label text-left">Capacity</label>
|
|
<div class="col-sm-10 col-lg-11">
|
|
<input type="number" class="form-control" ng-model="model.Capacity" name="profile_capacity" ng-min="1" ng-max="64000" placeholder="2" required>
|
|
</div>
|
|
</div>
|
|
<div class="form-group" ng-show="storidgeCreateProfileForm.profile_capacity.$invalid">
|
|
<div class="col-sm-12 small text-warning">
|
|
<div ng-messages="storidgeCreateProfileForm.profile_capacity.$error">
|
|
<p ng-message="required"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field is required.</p>
|
|
<p ng-message="min"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Minimum value for capacity: 1.</p>
|
|
<p ng-message="max"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Maximum value for capacity: 64000.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- !capacity -->
|
|
<!-- redundancy -->
|
|
<div class="form-group">
|
|
<label for="profile_redundancy" class="col-sm-2 col-lg-1 control-label text-left">Redundancy</label>
|
|
<div class="col-sm-10 col-lg-11">
|
|
<select name="profile_redundancy" ng-model="model.Redundancy" ng-options="+(opt.value) as opt.label for opt in RedundancyOptions" class="form-control">
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<!-- !redudancy -->
|
|
<!-- provisioning -->
|
|
<div class="form-group">
|
|
<label for="profile_provisioning" class="col-sm-2 col-lg-1 control-label text-left">Provisioning</label>
|
|
<div class="col-sm-10 col-lg-11">
|
|
<select name="profile_provisioning" ng-model="model.Provisioning" class="form-control">
|
|
<option value="thin">Thin</option>
|
|
<option value="thick">Thick</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<!-- !provisioning -->
|
|
<!-- type -->
|
|
<div class="form-group">
|
|
<label for="profile_type" class="col-sm-2 col-lg-1 control-label text-left">Type</label>
|
|
<div class="col-sm-10 col-lg-11">
|
|
<select name="profile_type" ng-model="model.Type" class="form-control">
|
|
<option value="ssd">SSD</option>
|
|
<option value="hdd">HDD</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<!-- !type -->
|
|
<!-- iops -->
|
|
<div ng-if="!state.LimitBandwidth || state.NoLimit">
|
|
<div class="col-sm-12 form-section-title">
|
|
IOPS
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<label for="permissions" class="control-label text-left">
|
|
Limit IOPS
|
|
</label>
|
|
<label class="switch" style="margin-left: 20px;">
|
|
<input type="checkbox" ng-model="state.LimitIOPS" ng-change="state.NoLimit = (!state.LimitBandwidth && !state.LimitIOPS)"><i></i>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="form-group" ng-if="state.LimitIOPS">
|
|
<label for="min_iops" class="col-sm-1 control-label text-left">Min</label>
|
|
<div class="col-sm-5" ng-class="{ 'has-error': storidgeCreateProfileForm.min_iops.$invalid }">
|
|
<input type="number" class="form-control" ng-model="model.MinIOPS" name="min_iops" ng-min="30" ng-max="999999" placeholder="100" required>
|
|
</div>
|
|
<label for="max_iops" class="col-sm-1 control-label text-left">Max</label>
|
|
<div class="col-sm-5" ng-class="{ 'has-error': storidgeCreateProfileForm.max_iops.$invalid }">
|
|
<input type="number" class="form-control" ng-model="model.MaxIOPS" name="max_iops" ng-min="30" ng-max="999999" placeholder="2000" required>
|
|
</div>
|
|
</div>
|
|
<div class="form-group" ng-show="storidgeCreateProfileForm.min_iops.$invalid">
|
|
<div class="col-sm-12 small text-warning">
|
|
<div ng-messages="storidgeCreateProfileForm.min_iops.$error">
|
|
<p ng-message="required"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> A value is required for Min IOPS.</p>
|
|
<p ng-message="min"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Minimum value for Min IOPS: 30.</p>
|
|
<p ng-message="max"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Maximum value for Min IOPS: 999999.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group" ng-show="storidgeCreateProfileForm.max_iops.$invalid">
|
|
<div class="col-sm-12 small text-warning">
|
|
<div ng-messages="storidgeCreateProfileForm.max_iops.$error">
|
|
<p ng-message="required"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> A value is required for Max IOPS.</p>
|
|
<p ng-message="min"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Minimum value for Max IOPS: 30.</p>
|
|
<p ng-message="max"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Maximum value for Max IOPS: 999999.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- !iops -->
|
|
<!-- bandwidth -->
|
|
<div ng-if="!state.LimitIOPS || state.NoLimit">
|
|
<div class="col-sm-12 form-section-title">
|
|
Bandwidth
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<label for="permissions" class="control-label text-left">
|
|
Limit bandwidth
|
|
</label>
|
|
<label class="switch" style="margin-left: 20px;">
|
|
<input type="checkbox" ng-model="state.LimitBandwidth" ng-change="state.NoLimit = (!state.LimitBandwidth && !state.LimitIOPS)"><i></i>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="form-group" ng-if="state.LimitBandwidth">
|
|
<label for="min_bandwidth" class="col-sm-1 control-label text-left">Min</label>
|
|
<div class="col-sm-5" ng-class="{ 'has-error': storidgeCreateProfileForm.min_bandwidth.$invalid }">
|
|
<input type="number" class="form-control" ng-model="model.MinBandwidth" name="min_bandwidth" ng-min="1" ng-max="5000" placeholder="1" required>
|
|
</div>
|
|
<label for="max_bandwidth" class="col-sm-1 control-label text-left">Max</label>
|
|
<div class="col-sm-5" ng-class="{ 'has-error': storidgeCreateProfileForm.max_bandwidth.$invalid }">
|
|
<input type="number" class="form-control" ng-model="model.MaxBandwidth" name="max_bandwidth" ng-min="1" ng-max="5000" placeholder="100" required>
|
|
</div>
|
|
</div>
|
|
<div class="form-group" ng-show="storidgeCreateProfileForm.min_bandwidth.$invalid">
|
|
<div class="col-sm-12 small text-warning">
|
|
<div ng-messages="storidgeCreateProfileForm.min_bandwidth.$error">
|
|
<p ng-message="required"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> A value is required for Min bandwidth.</p>
|
|
<p ng-message="min"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Minimum value for Min bandwidth: 1.</p>
|
|
<p ng-message="max"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Maximum value for Min bandwidth: 5000.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group" ng-show="storidgeCreateProfileForm.max_bandwidth.$invalid">
|
|
<div class="col-sm-12 small text-warning">
|
|
<div ng-messages="storidgeCreateProfileForm.max_bandwidth.$error">
|
|
<p ng-message="required"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> A value is required for Max bandwidth.</p>
|
|
<p ng-message="min"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Minimum value for Max bandwidth: 1.</p>
|
|
<p ng-message="max"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Maximum value for Max bandwidth: 5000.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- !bandwidth -->
|
|
<div class="col-sm-12 form-section-title">
|
|
Actions
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<button type="button" class="btn btn-primary btn-sm" ng-click="create()" ng-disabled="state.actionInProgress || !storidgeCreateProfileForm.$valid" button-spinner="state.actionInProgress">
|
|
<span ng-hide="state.actionInProgress">Create the profile</span>
|
|
<span ng-show="state.actionInProgress">Creating profile...</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<!-- !actions -->
|
|
</form>
|
|
</rd-widget-body>
|
|
</rd-widget>
|
|
</div>
|
|
</div>
|