diff --git a/src/locales/en.json b/src/locales/en.json
index 9a21be46..4706f59e 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -226,7 +226,6 @@
"BareMetal Parameters": "BareMetal Parameters",
"Base Config": "Base Config",
"Base Info": "Base Info",
- "Base Role": "Base Role",
"Basic Parameters": "Basic Parameters",
"Batch Allocate": "Batch Allocate",
"Belarus": "Belarus",
@@ -239,6 +238,7 @@
"Bind Device": "Bind Device",
"Bind Device Type": "Bind Device Type",
"Bind Resource": "Bind Resource",
+ "Bind Resource Name": "Bind Resource Name",
"Binding": "Binding",
"Binding Groups": "Binding Groups",
"Binding Instance": "Binding Instance",
@@ -1049,6 +1049,7 @@
"HealthMonitor Type": "HealthMonitor Type",
"Healthy": "Healthy",
"Heartbeat Timestamp": "Heartbeat Timestamp",
+ "Hello, {name}": "Hello, {name}",
"Heterogeneous Computing": "Heterogeneous Computing",
"Hidden": "Hidden",
"Hide Advanced Options": "Hide Advanced Options",
diff --git a/src/locales/zh.json b/src/locales/zh.json
index 90208fe2..fb1fb607 100644
--- a/src/locales/zh.json
+++ b/src/locales/zh.json
@@ -226,7 +226,6 @@
"BareMetal Parameters": "裸机参数",
"Base Config": "基础配置",
"Base Info": "基本信息",
- "Base Role": "基础角色",
"Basic Parameters": "基本参数",
"Batch Allocate": "批量申请",
"Belarus": "白俄罗斯",
@@ -239,6 +238,7 @@
"Bind Device": "绑定设备",
"Bind Device Type": "绑定设备类型",
"Bind Resource": "绑定资源",
+ "Bind Resource Name": "绑定资源名称",
"Binding": "绑定",
"Binding Groups": "绑定的用户组",
"Binding Instance": "绑定云主机",
@@ -1049,6 +1049,7 @@
"HealthMonitor Type": "健康检查类型",
"Healthy": "健康",
"Heartbeat Timestamp": "心跳时间戳",
+ "Hello, {name}": "您好,{name}",
"Heterogeneous Computing": "异构计算",
"Hidden": "隐藏",
"Hide Advanced Options": "隐藏高级选项",
diff --git a/src/pages/base/containers/Overview/components/ProjectInfo.jsx b/src/pages/base/containers/Overview/components/ProjectInfo.jsx
index 97a5eb43..b1436480 100644
--- a/src/pages/base/containers/Overview/components/ProjectInfo.jsx
+++ b/src/pages/base/containers/Overview/components/ProjectInfo.jsx
@@ -13,33 +13,11 @@
// limitations under the License.
import React, { Component } from 'react';
-import { Card, Descriptions, Button } from 'antd';
+import { Card, Descriptions } from 'antd';
import { inject, observer } from 'mobx-react';
-import { UpOutlined, DownOutlined } from '@ant-design/icons';
import styles from '../style.less';
export class ProjectInfo extends Component {
- constructor(props) {
- super(props);
- this.state = {
- collapsed: true,
- };
- }
-
- onCollapsedCallback = () => {};
-
- handleDetailInfo = () => {
- const { collapsed } = this.state;
- this.setState(
- {
- collapsed: !collapsed,
- },
- () => {
- this.onCollapsedCallback(!collapsed);
- }
- );
- };
-
get rootStore() {
return this.props.rootStore || {};
}
@@ -49,14 +27,9 @@ export class ProjectInfo extends Component {
return user || {};
}
- get showRoles() {
- const { roles = [], baseRoles = [] } = this.rootStore;
- return roles.filter((it) => baseRoles.indexOf(it.name) === -1);
- }
-
- get baseRoles() {
- const { roles = [], baseRoles = [] } = this.rootStore;
- return roles.filter((it) => baseRoles.indexOf(it.name) !== -1);
+ get roles() {
+ const { roles = [] } = this.rootStore;
+ return roles;
}
renderAccount() {
@@ -71,14 +44,14 @@ export class ProjectInfo extends Component {
);
}
- renderShowRole() {
+ renderRoles() {
return (
- {this.showRoles.map((item) => item.name).join(', ')}
+ {this.roles.map((item) => item.name).join(', ')}
);
}
@@ -95,36 +68,6 @@ export class ProjectInfo extends Component {
);
}
- renderBaseRole() {
- const { collapsed } = this.state;
- if (collapsed) {
- return null;
- }
-
- return (
-
- {this.baseRoles.map((item) => item.name).join(', ')}
-
- );
- }
-
- renderButton() {
- const { collapsed } = this.state;
- const icon = collapsed ? : ;
- return (
-
- );
- }
-
render() {
if (!this.currentUser.name) {
return null;
@@ -132,16 +75,14 @@ export class ProjectInfo extends Component {
return (
{this.renderAccount()}
- {this.renderShowRole()}
+ {this.renderRoles()}
{this.renderDomain()}
- {this.renderBaseRole()}
- {this.renderButton()}
);
}
diff --git a/src/pages/user-center/containers/Credentials/actions/Create.jsx b/src/pages/user-center/containers/Credentials/actions/Create.jsx
index 7460528e..8e2ee210 100644
--- a/src/pages/user-center/containers/Credentials/actions/Create.jsx
+++ b/src/pages/user-center/containers/Credentials/actions/Create.jsx
@@ -64,7 +64,6 @@ export class Create extends ModalAction {
static policy = 'identity:create_application_credential';
get roleOptions() {
- // const baseRoles = toJS(globalRootStore.baseRoles);
const roles = toJS(globalRootStore.roles);
return roles.map((i) => ({
diff --git a/src/stores/root.js b/src/stores/root.js
index 4adeac52..d17a153c 100644
--- a/src/stores/root.js
+++ b/src/stores/root.js
@@ -33,9 +33,6 @@ export class RootStore {
@observable
roles = [];
- @observable
- baseRoles = [];
-
@observable
baseDomains = [];
@@ -127,14 +124,8 @@ export class RootStore {
@action
async updateUserRoles(user) {
- const {
- roles = [],
- base_roles = [],
- base_domains,
- user: userInfo = {},
- } = user || {};
+ const { roles = [], base_domains, user: userInfo = {} } = user || {};
this.roles = roles;
- this.baseRoles = base_roles;
this.baseDomains = base_domains;
this.hasAdminPageRole = await this.getUserSystemRoles(userInfo);
this.hasAdminRole = this.hasAdminPageRole;