Storage Class view/edit

This commit is contained in:
Vincent Fiduccia 2018-03-14 16:27:52 -07:00
parent d4be5a8b37
commit 5117900f5e
No known key found for this signature in database
GPG Key ID: 2B29AD6BB2BB2582
11 changed files with 79 additions and 15 deletions

View File

@ -0,0 +1,9 @@
import Controller from '@ember/controller';
export default Controller.extend({
actions: {
back() {
this.send('goToPrevious','authenticated.cluster.storage-classes');
},
},
});

View File

@ -0,0 +1,16 @@
import Route from '@ember/routing/route';
import { set } from '@ember/object';
export default Route.extend({
model() {
const original = this.modelFor('authenticated.cluster.storage-classes.detail');
set(this, 'originalModel', original);
return original.clone();
},
setupController(controller/*, model*/) {
this._super(...arguments);
set(controller,'originalModel', this.modelFor('authenticated.cluster.storage-classes.detail'));
}
});

View File

@ -0,0 +1,6 @@
{{cru-storage-class
mode="edit"
model=model
done=(action "back")
cancel=(action "back")
}}

View File

@ -0,0 +1,4 @@
{{cru-storage-class
mode="view"
model=model
}}

View File

@ -0,0 +1,11 @@
import Route from '@ember/routing/route';
import { get } from '@ember/object';
import { inject as service } from '@ember/service';
export default Route.extend({
clusterStore: service(),
model: function(params) {
return get(this, 'clusterStore').find('storageclass', params.storage_class_id);
},
});

View File

@ -27,7 +27,7 @@
{{badge-state model=obj}}
</td>
<td data-title="{{dt.name}}">
{{obj.displayName}}
<a href="{{href-to "authenticated.cluster.storage-classes.detail" obj.id}}">{{obj.displayName}}</a>
</td>
<td data-title="{{dt.provisioner}}">
{{obj.displayProvisioner}}

View File

@ -1,5 +1,5 @@
import Route from '@ember/routing/route';
import { set } from '@ember/object';
import { set } from '@ember/object';
export default Route.extend({
model() {

View File

@ -42,6 +42,7 @@ export function getProvisioners() {
export default Resource.extend({
clusterStore: service(),
router: service(),
type: 'storageClass',
state: 'active',
@ -60,6 +61,7 @@ export default Resource.extend({
},
edit() {
get(this, 'router').transitionTo('authenticated.cluster.storage-classes.detail.edit', get(this, 'id'));
},
},

View File

@ -59,7 +59,9 @@
<div class="col span-6">
<label class="acc-label">{{t 'cruStorageClass.reclaimPolicy.label'}}</label>
{{#if isView}}
{{t (concat 'cruStorageClass.reclaimPolicy.' primaryResource.reclaimPolicy)}}
<div>
{{t (concat 'cruStorageClass.reclaimPolicy.' primaryResource.reclaimPolicy)}}
</div>
{{else}}
<div class="radio">
<label>
@ -85,7 +87,9 @@
<label class="acc-label mt-20">{{t 'cruStorageClass.allowVolumeExpansion.label'}}</label>
{{#if isView}}
{{t (if primaryResource.allowVolumeExpansion 'generic.yes' 'generic.no')}}
<div>
{{t (if primaryResource.allowVolumeExpansion 'generic.yes' 'generic.no')}}
</div>
{{else}}
<div class="radio">
<label>

View File

@ -11,7 +11,9 @@
</div>
{{/each}}
{{else}}
{{t (concat 'cruStorageClass.aws-ebs.type.' volumeType)}}
<div>
{{t (concat 'cruStorageClass.aws-ebs.type.' volumeType)}}
</div>
{{/if}}
{{#if supportsIops}}
@ -22,7 +24,9 @@
<span class="input-group-addon bg-default">{{t 'cruStorageClass.aws-ebs.iopsPerGB.unit'}}</span>
</div>
{{else}}
{{iopsPerGB}} {{t 'cruStorageClass.aws-ebs.iopsPerGB.unit'}}
<div>
{{iopsPerGB}} {{t 'cruStorageClass.aws-ebs.iopsPerGB.unit'}}
</div>
{{/if}}
{{/if}}
@ -46,11 +50,13 @@
{{textarea-autogrow spellcheck="false" required=true value=zones}}
{{/unless}}
{{else}}
{{#if zoneAutomatic}}
{{t 'cruStorageClass.aws-ebs.zone.automatic'}}
{{else}}
{{zones}}
{{/if}}
<div>
{{#if zoneAutomatic}}
{{t 'cruStorageClass.aws-ebs.zone.automatic'}}
{{else}}
{{zones}}
{{/if}}
</div>
{{/if}}
</div>
<div class="col span-4">
@ -69,7 +75,9 @@
</label>
</div>
{{else}}
{{t (if encrypted 'generic.enabled' 'generic.disabled')}}
<div>
{{t (if encrypted 'generic.enabled' 'generic.disabled')}}
</div>
{{/if}}
{{#if encrypted}}
@ -92,9 +100,13 @@
{{input value=kmsKeyId}}
{{/unless}}
{{else if kmsAutomatic}}
{{t 'cruStorageClass.aws-ebs.kmsKeyId.automatic'}}
<div>
{{t 'cruStorageClass.aws-ebs.kmsKeyId.automatic'}}
</div>
{{else}}
{{kmsKeyId}}
<div>
{{kmsKeyId}}
</div>
{{/if}}
{{/if}}
</div>

View File

@ -3477,7 +3477,7 @@ clusterNew:
shortLabel: Imported
command:
instructions: "Run the kubectl command below on an existing Kubernetes 1.8.x cluster to import it into {appName}:"
instructionsInsecure: "If you get an error about 'certificate signed by unknown authority' because your {appName} installation is not running with a SSL certificate signed by a recognized public CA, run the command below instead to bypass the certificate check:"
instructionsInsecure: "If you get an error about 'certificate signed by unknown authority' because your {appName} installation is running with an untrusted/self-signed SSL certificate, run the command below instead to bypass the certificate check:"
nodeDriver:
addTemplate: Add Node Template