diff --git a/km-console/packages/layout-clusters-fe/src/pages/TopicList/Create.tsx b/km-console/packages/layout-clusters-fe/src/pages/TopicList/Create.tsx
index 3c9442b0..218b0754 100644
--- a/km-console/packages/layout-clusters-fe/src/pages/TopicList/Create.tsx
+++ b/km-console/packages/layout-clusters-fe/src/pages/TopicList/Create.tsx
@@ -1,19 +1,6 @@
import React, { useState, useEffect } from 'react';
import { useParams } from 'react-router-dom';
-import {
- Alert,
- Button,
- Checkbox,
- Divider,
- Drawer,
- Form,
- Input,
- InputNumber,
- Modal,
- notification,
- Select,
- Utils,
-} from 'knowdesign';
+import { Alert, Button, Checkbox, Divider, Drawer, Form, Input, InputNumber, Modal, notification, Select, Utils } from 'knowdesign';
import { PlusOutlined, DownOutlined, UpOutlined } from '@ant-design/icons';
import Api from '@src/api/index';
@@ -120,9 +107,9 @@ export default (props: any) => {
res =
item.name === 'cleanup.policy'
? item.defaultValue
- .replace(/\[|\]|\s+/g, '')
- .split(',')
- .filter((_) => _)
+ .replace(/\[|\]|\s+/g, '')
+ .split(',')
+ .filter((_) => _)
: item.defaultValue;
} catch (e) {
res = [];
@@ -317,7 +304,7 @@ export default (props: any) => {
}
/>
-
+
{
{defaultConfigs
.filter((dc) => !customDefaultFields.includes(dc.name))
.map((configItem, i) => (
-
+
))}
diff --git a/km-console/packages/layout-clusters-fe/src/pages/TopicList/index.less b/km-console/packages/layout-clusters-fe/src/pages/TopicList/index.less
index 6dbcc748..669e85fb 100644
--- a/km-console/packages/layout-clusters-fe/src/pages/TopicList/index.less
+++ b/km-console/packages/layout-clusters-fe/src/pages/TopicList/index.less
@@ -19,6 +19,7 @@
align-items: center;
> span {
margin-left: 4px;
+ color: #74788d;
}
}
}
@@ -36,7 +37,7 @@
width: 120px;
margin-right: 8px;
}
- .batch-btn{
+ .batch-btn {
margin-right: 8px;
}
.add-btn {
@@ -51,44 +52,44 @@
}
}
.metric-data-wrap {
- display: flex;
- align-items: center;
+ // display: flex;
+ // align-items: center;
width: 100%;
.cur-val {
- width: 34px;
- margin-right: 11px;
+ display: block;
+ text-align: right;
}
- .dcloud-spin-nested-loading{
+ .dcloud-spin-nested-loading {
flex: 1;
}
}
.del-topic-modal,
.cluster-topic-add {
.tip-info {
- height: 27px;
- line-height: 27px;
+ display: flex;
color: #592d00;
- padding: 0 14px;
+ padding: 6px 14px;
font-size: 13px;
background: #fffae0;
border-radius: 4px;
.anticon {
color: #ffc300;
margin-right: 4px;
+ margin-top: 3px;
}
.test-right-away {
color: #556ee6;
cursor: pointer;
}
- .dcloud-alert-content{
+ .dcloud-alert-content {
flex: none;
}
}
}
.cluster-topic-add {
- .data-save-time-label{
- &>.dcloud-form-item-control{
- &>.dcloud-form-item-explain{
+ .data-save-time-label {
+ & > .dcloud-form-item-control {
+ & > .dcloud-form-item-explain {
display: none;
}
}
@@ -124,11 +125,11 @@
display: flex;
justify-content: center;
align-items: center;
- color: #556EE6;
+ color: #556ee6;
.txt {
width: 26px;
margin-right: 4px;
- color: #556EE6;
+ color: #556ee6;
font-family: @font-family;
}
.anticon {
@@ -226,12 +227,11 @@
}
}
-
-.create-topic-flex-layout{
+.create-topic-flex-layout {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
- .dcloud-form-item{
+ .dcloud-form-item {
width: 370px;
}
-}
\ No newline at end of file
+}
diff --git a/km-console/packages/layout-clusters-fe/src/pages/TopicList/index.tsx b/km-console/packages/layout-clusters-fe/src/pages/TopicList/index.tsx
index 02db801e..5bce3d6c 100644
--- a/km-console/packages/layout-clusters-fe/src/pages/TopicList/index.tsx
+++ b/km-console/packages/layout-clusters-fe/src/pages/TopicList/index.tsx
@@ -91,21 +91,9 @@ const AutoPage = (props: any) => {
if (metricName === 'HealthScore') {
return Math.round(orgVal);
} else if (metricName === 'LogSize') {
- return Number(Utils.formatAssignSize(orgVal, 'MB')).toString().length > 3 ? (
-
- {Number(Utils.formatAssignSize(orgVal, 'MB')).toString().slice(0, 3) + '...'}
-
- ) : (
- Number(Utils.formatAssignSize(orgVal, 'MB'))
- );
+ return Number(Utils.formatAssignSize(orgVal, 'MB'));
} else {
- return Number(Utils.formatAssignSize(orgVal, 'KB')).toString().length > 3 ? (
-
- {Number(Utils.formatAssignSize(orgVal, 'KB')).toString().slice(0, 3) + '...'}
-
- ) : (
- Number(Utils.formatAssignSize(orgVal, 'KB'))
- );
+ return Number(Utils.formatAssignSize(orgVal, 'KB'));
// return Utils.formatAssignSize(orgVal, 'KB');
}
}
@@ -116,15 +104,15 @@ const AutoPage = (props: any) => {
const points = record.metricLines.find((item: any) => item.metricName === metricName)?.metricPoints || [];
return (
- {calcCurValue(record, metricName)}
({ time: item.timeStamp, value: item.value })),
}}
/>
+ {calcCurValue(record, metricName)}
);
};
@@ -268,12 +256,16 @@ const AutoPage = (props: any) => {
const menu = (
);
@@ -345,11 +337,14 @@ const AutoPage = (props: any) => {
setSearchKeywordsInput(e.target.value);
}}
/>
-
- } type="primary" ghost>
- 批量操作
-
-
+ {(global.hasPermission(ClustersPermissionMap.TOPIC_CHANGE_REPLICA) ||
+ global.hasPermission(ClustersPermissionMap.TOPIC_MOVE_REPLICA)) && (
+
+ } type="primary" ghost>
+ 批量变更
+
+
+ )}
{global.hasPermission && global.hasPermission(ClustersPermissionMap.TOPIC_ADD) ? (
) : (