Skip to content

Commit 8049456

Browse files
authored
Add support for "group" config types. Fixes #1676 (#1677)
1 parent 3f63279 commit 8049456

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/common/viz/ConfigDialog.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,21 @@ define([
120120

121121
ConfigDialog.prototype.getAuthenticationKeys = function (metadata) {
122122
const keys = [];
123-
metadata.configStructure.forEach(config => {
123+
const configItems = metadata.configStructure || metadata.valueItems;
124+
125+
configItems.forEach(config => {
124126
if (config.isAuth) {
125127
keys.push([config.name]);
126128
} else if (config.valueType === 'dict') {
127129
const nestedKeys = config.valueItems
128130
.flatMap(c => this.getAuthenticationKeys(c))
129131
.map(key => [config.name, 'config'].concat(key));
130132

133+
keys.push(...nestedKeys);
134+
} else if (config.valueType === 'group') {
135+
const nestedKeys = this.getAuthenticationKeys(config)
136+
.map(key => [config.name].concat(key));
137+
131138
keys.push(...nestedKeys);
132139
}
133140
});

0 commit comments

Comments
 (0)