fix(portal): 修复集群配置文件中loginNodes配置为字符串数组时报错问题 #1339
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
问题:
获取集群配置信息的接口缺少兼容原有
loginNodes
为字符串数组情况的类型映射,导致按登录节点名称和地址渲染路由时出现undefined
修复:
1.此PR修复上述问题,兼容
loginNodes
为字符串数组时的情况2.由于是集群配置信息获取接口,补充了
loginNodes
中配置了scowd
情况的返回值3.同时此PR删除了 #977 中标注的 deprecated 公共组件已经被再利用的情况的 deprecated 注释
修改后:
上述配置形式时,集群接口配置文件中可以返回
scowd: { port: 9999 }
loginNodes只配置了字符串地址时
页面渲染成功