diff --git a/lib/shared/addon/utils/util.js b/lib/shared/addon/utils/util.js index 342005599..3c60a7d3a 100644 --- a/lib/shared/addon/utils/util.js +++ b/lib/shared/addon/utils/util.js @@ -483,6 +483,7 @@ export function keysToDecamelize(obj, ignore = [], drop = []) { return obj; } const UNDER_SCORE_PARAMS = ['.rancher_kubernetes_engine_config.network.options']; +const KUBE_SERVICES = ['.rancher_kubernetes_engine_config.services']; export function keysToCamel(obj, path = '') { 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; - 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); }