Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(portal): 修复集群配置文件中loginNodes配置为字符串数组时报错问题 #1339

Merged
merged 5 commits into from
Jul 8, 2024

Conversation

piccaSun
Copy link
Contributor

@piccaSun piccaSun commented Jul 4, 2024

问题:

获取集群配置信息的接口缺少兼容原有loginNodes为字符串数组情况的类型映射,导致按登录节点名称和地址渲染路由时出现undefined

修复:

1.此PR修复上述问题,兼容loginNodes 为字符串数组时的情况
2.由于是集群配置信息获取接口,补充了loginNodes中配置了scowd情况的返回值
3.同时此PR删除了 #977 中标注的 deprecated 公共组件已经被再利用的情况的 deprecated 注释

修改后:

loginNodes:
  # - name: login
  - name:
      i18n:
        default: 登录节点1
        en: loginNode1
        zh_cn: 登录节点1
    address: 111.11.11.111:0000
    scowd:
      port: 9999

上述配置形式时,集群接口配置文件中可以返回scowd: { port: 9999 }

loginNodes只配置了字符串地址时

loginNodes:
  - "111.11.11.111:0000"

页面渲染成功
image

Copy link

changeset-bot bot commented Jul 4, 2024

🦋 Changeset detected

Latest commit: 4ba9cea

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
@scow/portal-server Patch
@scow/portal-web Patch
@scow/config Patch
@scow/lib-server Patch
@scow/lib-web Patch
@scow/ai Patch
@scow/audit-server Patch
@scow/auth Patch
@scow/cli Patch
@scow/mis-server Patch
@scow/mis-web Patch
@scow/gateway Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@piccaSun piccaSun changed the title fix(portal): 修复集群配置文件中loginNode配置为字符串数组时报错问题 fix(portal): 修复集群配置文件中loginNodes配置为字符串数组时报错问题 Jul 4, 2024
@piccaSun piccaSun marked this pull request as ready for review July 8, 2024 11:12
@pkuhpc-review-bot pkuhpc-review-bot bot added the Code-ReviewRequested Code Review Requested label Jul 8, 2024
@pkuhpc-review-bot pkuhpc-review-bot bot requested a review from ddadaal July 8, 2024 11:12
@pkuhpc-review-bot pkuhpc-review-bot bot added Code-Approved Code Review approved ReadyForMerge Ready for merge and removed Code-ReviewRequested Code Review Requested labels Jul 8, 2024
@ddadaal ddadaal merged commit 1a096de into master Jul 8, 2024
9 checks passed
@ddadaal ddadaal deleted the fix-login-nodes-repeated-string branch July 8, 2024 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code-Approved Code Review approved ReadyForMerge Ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants