From 2a0bbc1aa786c8f25a735d3fd451f940144158f4 Mon Sep 17 00:00:00 2001 From: Daniel Chang Date: Wed, 7 Aug 2024 14:14:55 -0400 Subject: [PATCH] parameter with strata suffixes (#4370) --- .../src/model-representation/mira/mira.ts | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/packages/client/hmi-client/src/model-representation/mira/mira.ts b/packages/client/hmi-client/src/model-representation/mira/mira.ts index af15b87125..e53f06821f 100644 --- a/packages/client/hmi-client/src/model-representation/mira/mira.ts +++ b/packages/client/hmi-client/src/model-representation/mira/mira.ts @@ -100,18 +100,11 @@ export const collapseParameters = (miraModel: MiraModel, miraTemplateParams: Mir const tokens = key.split('_') as string[]; const rootName = _.first(tokens) as string; - // Ignore non-numerics - if (tokens.length > 1) { - let numerical = true; - for (let j = 1; j < tokens.length; j++) { - if (Number.isNaN(parseInt(tokens[j], 10))) { - numerical = false; - } - } - if (!numerical) { - map.set(name, [name]); - continue; - } + // There are some cases where parameter names have underscores but are not stratified + const displayName = miraModel.parameters[key].display_name; + if (tokens.length > 1 && displayName === key) { + map.set(name, [name]); + continue; } if (map.has(rootName)) {