= ({ onClose, visible }) => {
// }
// },
{
- title: 'Disk均衡率',
+ title: (
+
+ Disk{'(已均衡丨未均衡)'}
+
+ ),
dataIndex: 'disk',
render: (text: any, row: any) => {
- return `${row?.sub?.disk?.successNu} (已均衡) / ${row?.sub?.disk?.failedNu} (未均衡)`;
+ // return `${row?.sub?.disk?.successNu} 丨 ${row?.sub?.disk?.failedNu}`;
+ return (
+
+ {row?.sub?.disk?.successNu}
+ 丨
+ {row?.sub?.disk?.failedNu}
+
+ );
},
},
{
- title: 'BytesIn均衡率',
+ title: (
+
+ BytesIn{'(已均衡丨未均衡)'}
+
+ ),
dataIndex: 'bytesIn',
render: (text: any, row: any) => {
- return `${row?.sub?.bytesIn?.successNu} (已均衡) / ${row?.sub?.bytesIn?.failedNu} (未均衡)`;
+ // return `${row?.sub?.bytesIn?.successNu} 丨 ${row?.sub?.bytesIn?.failedNu}`;
+ return (
+
+ {row?.sub?.bytesIn?.successNu}
+ 丨
+ {row?.sub?.bytesIn?.failedNu}
+
+ );
},
},
{
- title: 'BytesOut均衡率',
+ title: (
+
+ BytesOut{'(已均衡丨未均衡)'}
+
+ ),
dataIndex: 'bytesOut',
render: (text: any, row: any) => {
- return `${row?.sub?.bytesOut?.successNu} (已均衡) / ${row?.sub?.bytesOut?.failedNu} (未均衡)`;
+ // return `${row?.sub?.bytesOut?.successNu} 丨 ${row?.sub?.bytesOut?.failedNu}`;
+ return (
+
+ {row?.sub?.bytesOut?.successNu}
+ 丨
+ {row?.sub?.bytesOut?.failedNu}
+
+ );
},
},
{
@@ -124,7 +157,7 @@ const HistoryDrawer: React.FC = ({ onClose, visible }) => {
};
const onTableChange = (curPagination: any) => {
- getList({ page: curPagination.current, size: curPagination.pageSize });
+ getList({ pageNo: curPagination.current, pageSize: curPagination.pageSize });
};
return (
diff --git a/km-console/packages/layout-clusters-fe/src/pages/LoadRebalance/index.less b/km-console/packages/layout-clusters-fe/src/pages/LoadRebalance/index.less
index 927a069f..648346c9 100644
--- a/km-console/packages/layout-clusters-fe/src/pages/LoadRebalance/index.less
+++ b/km-console/packages/layout-clusters-fe/src/pages/LoadRebalance/index.less
@@ -143,3 +143,19 @@
// margin: 0 !important;
// }
}
+
+.balance-history-column{
+ display: flex;
+ &>span:nth-child(1){
+ width: 20px;
+ }
+ &>span:nth-child(2){
+ color: #74788d;
+ font-size: 12px;
+ opacity: 0.3;
+ }
+ &>span:last-child{
+ width: 20px;
+ margin-left: 8px;
+ }
+}
diff --git a/km-console/packages/layout-clusters-fe/src/pages/LoadRebalance/index.tsx b/km-console/packages/layout-clusters-fe/src/pages/LoadRebalance/index.tsx
index cc0a6c02..2ff2b960 100644
--- a/km-console/packages/layout-clusters-fe/src/pages/LoadRebalance/index.tsx
+++ b/km-console/packages/layout-clusters-fe/src/pages/LoadRebalance/index.tsx
@@ -8,6 +8,7 @@ import api from '../../api';
import './index.less';
import LoadRebalanceCardBar from '@src/components/CardBar/LoadRebalanceCardBar';
import { BalanceFilter } from './BalanceFilter';
+import { ClustersPermissionMap } from '../CommonConfig';
const Balance_Status_OPTIONS = [
{
@@ -288,21 +289,17 @@ const LoadBalance: React.FC = (props: any) => {
setVisible(false);
};
- const balanceClick = (val: boolean = false) => {
- if (val) {
- Utils.request(api.getBalanceForm(global?.clusterInfo?.id), {
- method: 'GET',
+ const balanceClick = (val: boolean) => {
+ Utils.request(api.getBalanceForm(global?.clusterInfo?.id), {
+ method: 'GET',
+ })
+ .then((res: any) => {
+ const dataDe = res || {};
+ setCircleFormData(dataDe);
})
- .then((res: any) => {
- const dataDe = res || {};
- setCircleFormData(dataDe);
- })
- .catch(() => {
- setCircleFormData(null);
- });
- } else {
- setCircleFormData(null);
- }
+ .catch(() => {
+ setCircleFormData(null);
+ });
setIsCycle(val);
setVisible(true);
};
@@ -365,19 +362,23 @@ const LoadBalance: React.FC = (props: any) => {
value: searchValue,
onChange: setSearchValue,
placeholder: '请输入 Host',
- style: { width: '210px' },
+ style: { width: '248px' },
maxLength: 128,
}}
/>
-
-
+ {global.hasPermission(ClustersPermissionMap.REBALANCE_CYCLE) && (
+
+ )}
+ {global.hasPermission(ClustersPermissionMap.REBALANCE_IMMEDIATE) && (
+
+ )}
{filterList && filterList.length > 0 && (