Merge pull request #2960 from loganhz/windows

Windows
This commit is contained in:
Westly Wright 2019-05-06 09:42:24 -07:00 committed by GitHub
commit 43aaa2f471
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 3 deletions

View File

@ -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)

View File

@ -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);
}
}

View File

@ -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];