mirror of https://github.com/rancher/ui.git
commit
43aaa2f471
|
|
@ -581,7 +581,13 @@ export default InputTextFile.extend(ManageLabels, ClusterDriver, {
|
|||
if (configs[key] === null) {
|
||||
return
|
||||
}
|
||||
const obj = keysToCamel(configs[key]);
|
||||
let obj;
|
||||
|
||||
if ( key === 'network' ) {
|
||||
obj = keysToCamel(configs[key], ['options']);
|
||||
} else {
|
||||
obj = keysToCamel(configs[key]);
|
||||
}
|
||||
|
||||
if ( clusterKeys.includes(key) ) {
|
||||
set(this, `cluster.${ underlineToCamel(key) }`, obj)
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ export default Component.extend({
|
|||
const maxVersion = maxSatisfying(versions, defaultK8sVersionRange);
|
||||
|
||||
if (!editing && defaultK8sVersionRange) {
|
||||
if (maxVersion) {
|
||||
if ( maxVersion && !versions.includes(get(this, 'value')) ) {
|
||||
set(this, 'value', maxVersion);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -452,7 +452,7 @@ export function underlineToCamel(str) {
|
|||
}).join('');
|
||||
}
|
||||
|
||||
export function keysToCamel(obj) {
|
||||
export function keysToCamel(obj, ignore) {
|
||||
if ( !typeof (obj) === 'object' || typeof (obj) === 'string' || typeof (obj) === 'number' || typeof (obj) === 'boolean' ) {
|
||||
return obj;
|
||||
}
|
||||
|
|
@ -463,6 +463,9 @@ export function keysToCamel(obj) {
|
|||
const key = keys[n];
|
||||
const titleKey = underlineToCamel(key);
|
||||
|
||||
if ( (ignore || []).includes(key) ) {
|
||||
continue;
|
||||
}
|
||||
obj[titleKey] = keysToCamel(obj[key]);
|
||||
if ( key !== titleKey ) {
|
||||
delete obj[key];
|
||||
|
|
|
|||
Loading…
Reference in New Issue