PKUHPC / SCOW

Super Computing On Web
https://www.pkuscow.com/
Mulan Permissive Software License, Version 2
180 stars 39 forks source link

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

Closed piccaSun closed 14 hours ago

piccaSun commented 4 days ago

问题:

获取集群配置信息的接口缺少兼容原有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

changeset-bot[bot] commented 4 days ago

🦋 Changeset detected

Latest commit: 4ba9cea14f2caafcfe1f743d04cfc44b926475ec

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