mirror of https://github.com/rancher/ui.git
commit
3f49cc08b8
|
|
@ -1,5 +1,7 @@
|
|||
import { alias } from '@ember/object/computed';
|
||||
import { get, set, computed, observer } from '@ember/object';
|
||||
import {
|
||||
setProperties, get, set, computed, observer
|
||||
} from '@ember/object';
|
||||
import { scheduleOnce } from '@ember/runloop';
|
||||
import Component from '@ember/component';
|
||||
import NodeDriver from 'shared/mixins/node-driver';
|
||||
|
|
@ -25,14 +27,17 @@ const IPCHOICES = [
|
|||
},
|
||||
];
|
||||
|
||||
const MANAGED = 'managed';
|
||||
const UNMANAGED = 'unmanaged';
|
||||
|
||||
const DISK_CHOICES = [
|
||||
{
|
||||
label: 'nodeDriver.azure.managedDisks.unmanaged',
|
||||
value: 'false',
|
||||
value: UNMANAGED
|
||||
},
|
||||
{
|
||||
label: 'nodeDriver.azure.managedDisks.managed',
|
||||
value: 'true'
|
||||
value: MANAGED
|
||||
}
|
||||
];
|
||||
|
||||
|
|
@ -45,6 +50,7 @@ export default Component.extend(NodeDriver, {
|
|||
publicIpChoices: IPCHOICES,
|
||||
diskChoices: DISK_CHOICES,
|
||||
sizeChoices: sizes,
|
||||
managedDisks: UNMANAGED,
|
||||
|
||||
model: null,
|
||||
openPorts: null,
|
||||
|
|
@ -56,8 +62,11 @@ export default Component.extend(NodeDriver, {
|
|||
this._super(...arguments);
|
||||
|
||||
scheduleOnce('afterRender', () => {
|
||||
set(this, 'publicIpChoice', this.initPublicIpChoices(get(this, 'config.staticPublicIp'), get(this, 'config.noPublicIp')));
|
||||
set(this, 'openPorts', this.initOpenPorts(get(this, 'config.openPort')));
|
||||
setProperties(this, {
|
||||
publicIpChoice: this.initPublicIpChoices(get(this, 'config.staticPublicIp'), get(this, 'config.noPublicIp')),
|
||||
openPorts: this.initOpenPorts(get(this, 'config.openPort')),
|
||||
managedDisks: get(this, 'config.managedDisks') ? MANAGED : UNMANAGED
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
|
@ -67,6 +76,10 @@ export default Component.extend(NodeDriver, {
|
|||
}
|
||||
},
|
||||
|
||||
diskTypeChanged: observer('managedDisks', function() {
|
||||
set(this, 'config.managedDisks', get(this, 'managedDisks') === MANAGED);
|
||||
}),
|
||||
|
||||
evironmentChoiceObserver: observer('config.environment', function() {
|
||||
let environment = get(this, 'config.environment');
|
||||
|
||||
|
|
|
|||
|
|
@ -299,7 +299,7 @@
|
|||
classNames="form-control"
|
||||
content=diskChoices
|
||||
localizedLabel=true
|
||||
value=config.managedDisks
|
||||
value=managedDisks
|
||||
}}
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -2706,7 +2706,7 @@ clusterNew:
|
|||
placeholder: Your Azure tenant ID
|
||||
image:
|
||||
label: Image
|
||||
placeholder: 'canonical:UbuntuServer:16.04.0-LTS:latest'
|
||||
placeholder: 'canonical:UbuntuServer:18.04-LTS:latest'
|
||||
size:
|
||||
label: Size
|
||||
dockerPort:
|
||||
|
|
|
|||
Loading…
Reference in New Issue