mirror of https://github.com/rancher/ui.git
working changes for exoscale
This commit is contained in:
parent
8deb832312
commit
f47a005ce2
|
|
@ -40,7 +40,7 @@ let RANCHER_INGRESS_RULES = [
|
|||
export default Ember.Component.extend(Driver, {
|
||||
driverName : 'exoscale',
|
||||
model : null,
|
||||
exoscaleConfig : Ember.computed.alias('model.exoscaleConfig'),
|
||||
exoscaleConfig : Ember.computed.alias('model.publicValues.exoscaleConfig'),
|
||||
|
||||
allDiskSizes : null,
|
||||
allInstanceProfiles : null,
|
||||
|
|
@ -69,15 +69,22 @@ export default Ember.Component.extend(Driver, {
|
|||
let config = this.get('store').createRecord({
|
||||
type: 'exoscaleConfig',
|
||||
apiKey: '',
|
||||
apiSecretKey: '',
|
||||
diskSize: 50,
|
||||
instanceProfile: 'small',
|
||||
securityGroup: 'rancher-machine'
|
||||
});
|
||||
|
||||
this.set('model', this.get('store').createRecord({
|
||||
type: 'host',
|
||||
exoscaleConfig: config
|
||||
type: 'hostTemplate',
|
||||
driver: 'exoscale',
|
||||
publicValues: {
|
||||
exoscaleConfig: config
|
||||
},
|
||||
secretValues: {
|
||||
exoscaleConfig: {
|
||||
apiSecretKey: '',
|
||||
}
|
||||
}
|
||||
}));
|
||||
},
|
||||
|
||||
|
|
@ -110,7 +117,7 @@ export default Ember.Component.extend(Driver, {
|
|||
this.set('step', 2);
|
||||
|
||||
this.set('exoscaleConfig.apiKey', (this.get('exoscaleConfig.apiKey')||'').trim());
|
||||
this.set('exoscaleConfig.apiSecretKey', (this.get('exoscaleConfig.apiSecretKey')||'').trim());
|
||||
this.set('model.secretValues.exoscaleConfig.apiSecretKey', (this.get('model.secretValues.exoscaleConfig.apiSecretKey')||'').trim());
|
||||
|
||||
this.apiRequest('listSecurityGroups').then((res) => {
|
||||
let groups = [];
|
||||
|
|
@ -293,7 +300,7 @@ export default Ember.Component.extend(Driver, {
|
|||
.sort()
|
||||
.join('&');
|
||||
settings.data += '&signature=' + encodeURIComponent(AWS.util.crypto.hmac(
|
||||
this.get('exoscaleConfig.apiSecretKey'), qs, 'base64', 'sha1'));
|
||||
this.get('model.secretValues.exoscaleConfig.apiSecretKey'), qs, 'base64', 'sha1'));
|
||||
return true;
|
||||
},
|
||||
data: params}, true);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,21 @@
|
|||
<section class="horizontal-form">
|
||||
<form>
|
||||
<div class="container-fluid">
|
||||
<div class="over-hr mt-20 mb-20">
|
||||
<span>{{t 'machine.driverExoscale.instanceSection'}}</span>
|
||||
</div>
|
||||
|
||||
<div class="row mb-20">
|
||||
{{form-name-description
|
||||
name=model.name
|
||||
description=model.description
|
||||
nameRequired=true
|
||||
namePlaceholder="hostPartial.host.addCommon.new.form.name.placeholder"
|
||||
descriptionShown=true
|
||||
descriptionExpanded=true
|
||||
}}
|
||||
</div>
|
||||
|
||||
<div class="over-hr mb-20">
|
||||
<span>{{t 'machine.driverExoscale.accountSection'}}</span>
|
||||
</div>
|
||||
|
|
@ -23,7 +38,7 @@
|
|||
</div>
|
||||
<div class="col span-10">
|
||||
{{#if isStep1}}
|
||||
{{input type="password" name="password" classNames="form-control" placeholder=(t 'machine.driverExoscale.secretKey.placeholder') value=exoscaleConfig.apiSecretKey}}
|
||||
{{input type="password" name="password" classNames="form-control" placeholder=(t 'machine.driverExoscale.secretKey.placeholder') value=model.secretValues.exoscaleConfig.apiSecretKey}}
|
||||
{{else}}
|
||||
<div class="text-muted text-italic">{{t 'machine.driverExoscale.secretKey.provided'}}</div>
|
||||
{{/if}}
|
||||
|
|
@ -128,13 +143,9 @@
|
|||
<section class="horizontal-form pt-0 {{unless isGteStep6 'hide'}}">
|
||||
<div class="container-fluid">
|
||||
<div class="over-hr mt-20 mb-20">
|
||||
<span>{{t 'machine.driverExoscale.instanceSection'}}</span>
|
||||
<span>{{t 'machine.driverExoscale.instanceOptionsSection'}}</span>
|
||||
</div>
|
||||
|
||||
{{#if showNameScale}}
|
||||
{{partial "host/add-common"}}
|
||||
{{/if}}
|
||||
|
||||
<div class="row inline-form">
|
||||
<div class="col span-2 col-inline">
|
||||
<label>{{t 'machine.driverExoscale.instanceProfile.label'}}</label>
|
||||
|
|
|
|||
|
|
@ -2972,6 +2972,7 @@ machine:
|
|||
selectSecurityGroupAction: "Next: Set Instance options"
|
||||
loadingInstance: Fetching available Instance settings...
|
||||
instanceSection: Instance
|
||||
instanceOptionsSection: Instance Options
|
||||
instanceProfile:
|
||||
label: Instance Profile
|
||||
diskSize:
|
||||
|
|
|
|||
Loading…
Reference in New Issue