Skip to content

Commit

Permalink
[ISSUE alibaba#8150] Add the namespace description item to the namesp…
Browse files Browse the repository at this point in the history
…ace list page (alibaba#8155)

* [ISSUE alibaba#8150] Add the namespace description item to the namespace list page

Close alibaba#8150

* [ISSUE alibaba#8150] resolve conflict

Close alibaba#8150

* [ISSUE alibaba#8150] Rebuild console-ui
  • Loading branch information
onewe authored Apr 29, 2022
1 parent 2e0eca4 commit 5926c67
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 21 deletions.
2 changes: 2 additions & 0 deletions console-ui/src/pages/NameSpace/NameSpace.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ class NameSpace extends React.Component {
namespace,
namespaceAdd,
namespaceNames,
description,
namespaceNumber,
configuration,
namespaceOperation,
Expand Down Expand Up @@ -328,6 +329,7 @@ class NameSpace extends React.Component {
cell={this.renderName.bind(this)}
/>
<Table.Column title={namespaceNumber} dataIndex="namespace" />
<Table.Column title={description} dataIndex="namespaceDesc" />
<Table.Column title={configuration} dataIndex="configCount" />
<Table.Column
title={namespaceOperation}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.alibaba.nacos.console.controller;

import com.alibaba.nacos.auth.annotation.Secured;
import com.alibaba.nacos.plugin.auth.constant.ActionTypes;
import com.alibaba.nacos.common.model.RestResult;
import com.alibaba.nacos.common.model.RestResultUtils;
import com.alibaba.nacos.common.utils.StringUtils;
Expand All @@ -26,6 +25,7 @@
import com.alibaba.nacos.console.enums.NamespaceTypeEnum;
import com.alibaba.nacos.console.model.Namespace;
import com.alibaba.nacos.console.model.NamespaceAllInfo;
import com.alibaba.nacos.plugin.auth.constant.ActionTypes;
import com.alibaba.nacos.plugin.auth.impl.constant.AuthConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
Expand Down Expand Up @@ -86,8 +86,8 @@ public RestResult<List<Namespace>> getNamespaces() {
namespaces.add(namespace0);
for (TenantInfo tenantInfo : tenantInfos) {
int configCount = persistService.configInfoCount(tenantInfo.getTenantId());
Namespace namespaceTmp = new Namespace(tenantInfo.getTenantId(), tenantInfo.getTenantName(), DEFAULT_QUOTA,
configCount, NamespaceTypeEnum.CUSTOM.getType());
Namespace namespaceTmp = new Namespace(tenantInfo.getTenantId(), tenantInfo.getTenantName(),
tenantInfo.getTenantDesc(), DEFAULT_QUOTA, configCount, NamespaceTypeEnum.CUSTOM.getType());
namespaces.add(namespaceTmp);
}
return RestResultUtils.success(namespaces);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public class Namespace {

private String namespaceShowName;

private String namespaceDesc;

private int quota;

private int configCount;
Expand Down Expand Up @@ -68,6 +70,24 @@ public Namespace(String namespace, String namespaceShowName, int quota, int conf
this.type = type;
}

public Namespace(String namespace, String namespaceShowName, String namespaceDesc, int quota, int configCount,
int type) {
this.namespace = namespace;
this.namespaceShowName = namespaceShowName;
this.quota = quota;
this.configCount = configCount;
this.type = type;
this.namespaceDesc = namespaceDesc;
}

public String getNamespaceDesc() {
return namespaceDesc;
}

public void setNamespaceDesc(String namespaceDesc) {
this.namespaceDesc = namespaceDesc;
}

public int getQuota() {
return quota;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,9 @@
*/
public class NamespaceAllInfo extends Namespace {

private String namespaceDesc;

public String getNamespaceDesc() {
return namespaceDesc;
}

public void setNamespaceDesc(String namespaceDesc) {
this.namespaceDesc = namespaceDesc;
}

public NamespaceAllInfo() {
}

public NamespaceAllInfo(String namespace, String namespaceShowName, int quota, int configCount, int type,
String namespaceDesc) {
super(namespace, namespaceShowName, quota, configCount, type);
this.namespaceDesc = namespaceDesc;
super(namespace, namespaceShowName, namespaceDesc, quota, configCount, type);
}

}
4 changes: 2 additions & 2 deletions console/src/main/resources/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<link rel="stylesheet" type="text/css" href="console-ui/public/css/icon.css">
<link rel="stylesheet" type="text/css" href="console-ui/public/css/font-awesome.css">
<!-- 第三方css结束 -->
<link href="./css/main.css?fd60064fb047286c26f3" rel="stylesheet"></head>
<link href="./css/main.css?1cbbea1b0db3eec7912c" rel="stylesheet"></head>

<body>
<div id="root" style="overflow:hidden"></div>
Expand All @@ -56,6 +56,6 @@
<script src="console-ui/public/js/merge.js"></script>
<script src="console-ui/public/js/loader.js"></script>
<!-- 第三方js结束 -->
<script type="text/javascript" src="./js/main.js?fd60064fb047286c26f3"></script></body>
<script type="text/javascript" src="./js/main.js?1cbbea1b0db3eec7912c"></script></body>

</html>
2 changes: 1 addition & 1 deletion console/src/main/resources/static/js/main.js

Large diffs are not rendered by default.

0 comments on commit 5926c67

Please sign in to comment.