@@ -4531,7 +4531,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
4531
4531
"</div>\n" +
4532
4532
"<form name=\"createPersistentVolumeClaimForm\" class=\"mar-top-lg\">\n" +
4533
4533
"<fieldset ng-disabled=\"disableInputs\">\n" +
4534
- "<osc-persistent-volume-claim model=\"claim\"></osc-persistent-volume-claim>\n" +
4534
+ "<osc-persistent-volume-claim model=\"claim\" project-name=\"projectName\" ></osc-persistent-volume-claim>\n" +
4535
4535
"<div class=\"button-group gutter-bottom\">\n" +
4536
4536
"<button type=\"submit\" class=\"btn btn-primary btn-lg\" ng-click=\"createPersistentVolumeClaim()\" ng-disabled=\"createPersistentVolumeClaimForm.$invalid || disableInputs\" value=\"\">Create</button>\n" +
4537
4537
"<a class=\"btn btn-default btn-lg\" href=\"\" back>Cancel</a>\n" +
@@ -7547,7 +7547,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
7547
7547
"</div>\n" +
7548
7548
"</div>\n" +
7549
7549
"<div class=\"form-group\">\n" +
7550
- "<label class=\"required\">Access Mode</label><br/> \n" +
7550
+ "<label class=\"required\">Access Mode</label>\n" +
7551
7551
"<div class=\"radio\">\n" +
7552
7552
"<label class=\"radio-inline\">\n" +
7553
7553
"<input type=\"radio\" name=\"accessModes\" ng-model=\"claim.accessModes\" value=\"ReadWriteOnce\" aria-describedby=\"access-modes-help\" ng-checked=\"true\">\n" +
@@ -7567,13 +7567,31 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
7567
7567
"</div>\n" +
7568
7568
"</div>\n" +
7569
7569
"\n" +
7570
- "<div class=\"form-group\">\n" +
7570
+ "<div ng-if=\"capacityReadOnly\" class=\"form-group mar-bottom-xl\">\n" +
7571
+ "<label>Size</label>\n" +
7572
+ "<div class=\"static-form-value-large\">\n" +
7573
+ "{{claim.amount}} {{claim.unit | humanizeUnit : 'storage'}}\n" +
7574
+ "<small>(cannot be changed)</small>\n" +
7575
+ "</div>\n" +
7576
+ "</div>\n" +
7577
+ "<div ng-if=\"!capacityReadOnly\" class=\"form-group\">\n" +
7571
7578
"<fieldset class=\"form-inline compute-resource\">\n" +
7572
- "<label class=\"required\">Size</label>\n" +
7573
- "<div class=\"resource-size\">\n" +
7574
- "<div class=\"resource-amount\" ng-class=\"{ 'has-error': persistentVolumeClaimForm.capacity.$invalid && persistentVolumeClaimForm.capacity.$touched && !claimDisabled }\">\n" +
7575
- "<label class=\"sr-only\">Amount</label>\n" +
7576
- "<input type=\"number\" name=\"capacity\" ng-attr-id=\"claim-amount\" ng-model=\"claim.amount\" ng-required=\"true\" min=\"0\" ng-attr-placeholder=\"10\" class=\"form-control\" ng-attr-aria-describedby=\"claim-capacity-help\">\n" +
7579
+ "<label class=\"required\">\n" +
7580
+ "Size\n" +
7581
+ "<small ng-if=\"limits.min && limits.max\">\n" +
7582
+ "{{limits.min | usageWithUnits : 'storage'}} min to {{limits.max | usageWithUnits : 'storage'}} max\n" +
7583
+ "</small>\n" +
7584
+ "<small ng-if=\"limits.min && !limits.max\">\n" +
7585
+ "Min: {{limits.min | usageWithUnits : 'storage'}}\n" +
7586
+ "</small>\n" +
7587
+ "<small ng-if=\"limits.max && !limits.min\">\n" +
7588
+ "Max: {{limits.max | usageWithUnits : 'storage'}}\n" +
7589
+ "</small>\n" +
7590
+ "</label>\n" +
7591
+ "<div class=\"resource-size\" ng-class=\"{ 'has-error': persistentVolumeClaimForm.capacity.$invalid && persistentVolumeClaimForm.capacity.$touched && !claimDisabled }\">\n" +
7592
+ "<div class=\"resource-amount\">\n" +
7593
+ "<label for=\"claim-amount\" class=\"sr-only\">Amount</label>\n" +
7594
+ "<input type=\"number\" name=\"capacity\" id=\"claim-amount\" ng-model=\"claim.amount\" required min=\"0\" class=\"form-control\" aria-describedby=\"claim-capacity-help\">\n" +
7577
7595
"</div>\n" +
7578
7596
"<div class=\"resource-unit\">\n" +
7579
7597
"<label class=\"sr-only\">Unit</label>\n" +
@@ -7588,16 +7606,28 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
7588
7606
"<div id=\"claim-capacity-help\" class=\"help-block\">\n" +
7589
7607
"Desired storage capacity.\n" +
7590
7608
"</div>\n" +
7591
- "<div class=\"has-error\" ng-show=\"persistentVolumeClaimForm.capacity.$error.number && persistentVolumeClaimForm.capacity.$touched && !claimDisabled\">\n" +
7609
+ "<div ng-if=\"persistentVolumeClaimForm.capacity.$touched && !claimDisabled\">\n" +
7610
+ "<div class=\"has-error\" ng-show=\"persistentVolumeClaimForm.capacity.$error.number\">\n" +
7592
7611
"<span class=\"help-block\">\n" +
7593
7612
"Must be a number.\n" +
7594
7613
"</span>\n" +
7595
7614
"</div>\n" +
7596
- "<div class=\"has-error\" ng-show=\"persistentVolumeClaimForm.capacity.$error.min && persistentVolumeClaimForm.capacity.$touched && !claimDisabled \">\n" +
7615
+ "<div class=\"has-error\" ng-show=\"persistentVolumeClaimForm.capacity.$error.min\">\n" +
7597
7616
"<span class=\"help-block\">\n" +
7598
7617
"Must be a positive number.\n" +
7599
7618
"</span>\n" +
7600
7619
"</div>\n" +
7620
+ "<div ng-if=\"persistentVolumeClaimForm.capacity.$error.limitRangeMin\" class=\"has-error\">\n" +
7621
+ "<span class=\"help-block\">\n" +
7622
+ "Can't be less than {{limits.min | usageWithUnits : 'storage'}}.\n" +
7623
+ "</span>\n" +
7624
+ "</div>\n" +
7625
+ "<div ng-if=\"persistentVolumeClaimForm.capacity.$error.limitRangeMax\" class=\"has-error\">\n" +
7626
+ "<span class=\"help-block\">\n" +
7627
+ "Can't be greater than {{limits.max | usageWithUnits : 'storage'}}.\n" +
7628
+ "</span>\n" +
7629
+ "</div>\n" +
7630
+ "</div>\n" +
7601
7631
"<div class=\"learn-more-block mar-top-sm\">\n" +
7602
7632
"<a href=\"\" ng-click=\"showComputeUnitsHelp()\">What are GiB?</a>\n" +
7603
7633
"</div>\n" +
0 commit comments