mirror of https://github.com/rancher/ui.git
commit
6e6edbe07d
|
|
@ -483,6 +483,7 @@ export function keysToDecamelize(obj, ignore = [], drop = []) {
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
const UNDER_SCORE_PARAMS = ['.rancher_kubernetes_engine_config.network.options'];
|
const UNDER_SCORE_PARAMS = ['.rancher_kubernetes_engine_config.network.options'];
|
||||||
|
const KUBE_SERVICES = ['.rancher_kubernetes_engine_config.services'];
|
||||||
|
|
||||||
export function keysToCamel(obj, path = '') {
|
export function keysToCamel(obj, path = '') {
|
||||||
if ( !typeof (obj) === 'object' || typeof (obj) === 'string' || typeof (obj) === 'number' || typeof (obj) === 'boolean' || isEmpty(obj) ) {
|
if ( !typeof (obj) === 'object' || typeof (obj) === 'string' || typeof (obj) === 'number' || typeof (obj) === 'boolean' || isEmpty(obj) ) {
|
||||||
|
|
@ -496,7 +497,9 @@ export function keysToCamel(obj, path = '') {
|
||||||
|
|
||||||
let titleKey = key;
|
let titleKey = key;
|
||||||
|
|
||||||
if ( UNDER_SCORE_PARAMS.indexOf(path) === -1 ) {
|
if ( KUBE_SERVICES.indexOf(path) > -1 ) {
|
||||||
|
titleKey = underlineToCamel(key.replace(/-/g, '_'));
|
||||||
|
} else if ( UNDER_SCORE_PARAMS.indexOf(path) === -1 ) {
|
||||||
titleKey = underlineToCamel(key);
|
titleKey = underlineToCamel(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue