Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f398b3c
feature: enhance cluster management with detailed cluster information…
funky-eyes Dec 18, 2025
2c46e34
Merge branch '2.x' of github.com:apache/incubator-seata into 20251218
funky-eyes Dec 19, 2025
737d6f1
feature: enhance cluster management by adding unit vgroup mappings an…
funky-eyes Dec 19, 2025
8ee5490
feature: improve group change logic by adding vgroup creation validation
funky-eyes Dec 19, 2025
85d88c9
Merge branch '2.x' into 20251218
funky-eyes Dec 21, 2025
9595654
feature: update application configuration and enhance group managemen…
funky-eyes Dec 21, 2025
9821b20
Update namingserver/src/main/java/org/apache/seata/namingserver/manag…
funky-eyes Dec 21, 2025
ce740b8
Update namingserver/src/main/java/org/apache/seata/namingserver/manag…
funky-eyes Dec 21, 2025
22db64e
Update namingserver/pom.xml
funky-eyes Dec 21, 2025
80621df
Update console/src/main/resources/static/console-fe/src/pages/Cluster…
funky-eyes Dec 21, 2025
6bd1b4b
Update console/src/main/resources/static/console-fe/src/pages/Transac…
funky-eyes Dec 21, 2025
2a8d4eb
Update console/src/main/resources/static/console-fe/src/pages/Transac…
funky-eyes Dec 21, 2025
6f534e4
Update namingserver/src/main/java/org/apache/seata/namingserver/manag…
funky-eyes Dec 21, 2025
137b10c
Update namingserver/src/main/java/org/apache/seata/namingserver/manag…
funky-eyes Dec 21, 2025
5489567
feature: enhance change group functionality with unit name support an…
funky-eyes Dec 21, 2025
cb80468
Merge branch '20251218' of github.com:a364176773/seata into 20251218
funky-eyes Dec 21, 2025
0d6a277
feature: add role support in cluster management and update localizati…
funky-eyes Dec 21, 2025
f89a895
Update console/src/main/resources/static/console-fe/src/pages/Transac…
funky-eyes Dec 21, 2025
0ddeb62
Update console/src/main/resources/static/console-fe/src/service/clust…
funky-eyes Dec 21, 2025
5787088
Update console/src/main/resources/static/console-fe/src/pages/Cluster…
funky-eyes Dec 21, 2025
627cdab
feature: remove unit vgroup mapping and update vgroup handling logic
funky-eyes Dec 21, 2025
bcc1f8b
opt: refactor VGroupMappingController and enhance unit tests for vGro…
funky-eyes Dec 22, 2025
b2852ba
fix: increase VGROUP refresh delay from 5000ms to 6000ms
funky-eyes Dec 22, 2025
a473ff2
update
funky-eyes Dec 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion console/src/main/resources/static/console-fe/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class App extends React.Component<AppPropsType, AppStateType> {

getVersion = () => {
fetch('version.json').then(response =>
response.json().then(json => this.setState({ ...this.state, version: json.version }))
response.json().then(json => this.setState(prevState => ({ ...prevState, version: json.version })))
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ declare module '*.svg' {
declare module 'lodash';

export interface GlobalProps {
locale: ILocale;
locale: any;
history: History;
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type ClusterManagerLocale = {
};

type ClusterManagerState = {
namespaceOptions: Map<string, { clusters: string[], clusterVgroups: {[key: string]: string[]} }>;
namespaceOptions: Map<string, { clusters: string[], clusterVgroups: {[key: string]: string[]}, clusterTypes: {[key: string]: string} }>;
clusters: Array<string>;
namespace?: string;
cluster?: string;
Expand All @@ -76,7 +76,7 @@ class ClusterManager extends React.Component<GlobalProps, ClusterManagerState> {
};

state: ClusterManagerState = {
namespaceOptions: new Map<string, { clusters: string[], clusterVgroups: {[key: string]: string[]} }>(),
namespaceOptions: new Map<string, { clusters: string[], clusterVgroups: {[key: string]: string[]}, clusterTypes: {[key: string]: string} }>(),
clusters: [],
clusterData: null,
loading: false,
Expand All @@ -94,14 +94,22 @@ class ClusterManager extends React.Component<GlobalProps, ClusterManagerState> {
loadNamespaces = async () => {
try {
const namespaces = await fetchNamespaceV2();
const namespaceOptions = new Map<string, { clusters: string[], clusterVgroups: {[key: string]: string[]} }>();
const namespaceOptions = new Map<string, { clusters: string[], clusterVgroups: {[key: string]: string[]}, clusterTypes: {[key: string]: string} }>();
Object.keys(namespaces).forEach(namespaceKey => {
const namespaceData = namespaces[namespaceKey];
const clusterVgroups: {[key: string]: string[]} = namespaceData.clusterVgroups || {};
const clusters = Object.keys(clusterVgroups);
const clustersData = namespaceData.clusters || {};
const clusterVgroups: {[key: string]: string[]} = {};
const clusterTypes: {[key: string]: string} = {};
Object.keys(clustersData).forEach(clusterName => {
const cluster = clustersData[clusterName];
clusterVgroups[clusterName] = cluster.vgroups || [];
clusterTypes[clusterName] = cluster.type || 'default';
});
const clusters = Object.keys(clustersData);
namespaceOptions.set(namespaceKey, {
clusters,
clusterVgroups,
clusterTypes,
});
});
if (namespaceOptions.size > 0) {
Expand Down Expand Up @@ -215,11 +223,14 @@ class ClusterManager extends React.Component<GlobalProps, ClusterManagerState> {
};

render() {
const { locale = {} } = this.props;
const { locale } = this.props;
const rawLocale = locale.ClusterManager;
const clusterManagerLocale: ClusterManagerLocale = typeof rawLocale === 'object' && rawLocale !== null ? rawLocale : {};
const { title, subTitle, selectNamespaceFilerPlaceholder, selectClusterFilerPlaceholder, searchButtonLabel, unitName, members, clusterType, view, unitDialogTitle, control, transaction, weight, healthy, term, unit, operations, internal, version, metadata, controlEndpoint, transactionEndpoint, metadataDialogTitle } = clusterManagerLocale;
const unitData = this.state.clusterData ? Object.entries(this.state.clusterData.unitData || {}) : [];
const { namespace } = this.state;
const namespaceData = namespace ? this.state.namespaceOptions.get(namespace) : null;
const allClusters = namespaceData ? namespaceData.clusters : [];
return (
<Page
title={title || 'Cluster Manager'}
Expand Down Expand Up @@ -264,7 +275,7 @@ class ClusterManager extends React.Component<GlobalProps, ClusterManagerState> {
</FormItem>
</Form>
{/* unit table */}
<div>
<div style={{ marginTop: '20px' }}>
<Table dataSource={unitData} loading={this.state.loading}>
<Table.Column title={members || 'Members'} dataIndex="1" cell={(val: any) => (val.namingInstanceList ? val.namingInstanceList.length : 0)} />
<Table.Column title={clusterType || 'Cluster Type'} cell={() => (this.state.clusterData ? this.state.clusterData.clusterType : '')} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {
} from '@alicloud/console-components';
import Actions from '@alicloud/console-components-actions';
import { withRouter } from 'react-router-dom';
import { connect } from 'react-redux';
import Page from '@/components/Page';
import { GlobalProps } from '@/module';
import getData, {checkData, deleteData, GlobalLockParam } from '@/service/globalLockInfo';
Expand Down Expand Up @@ -105,8 +106,12 @@ class GlobalLockInfo extends React.Component<GlobalProps, GlobalLockInfoState> {
const namespaceOptions = new Map<string, { clusters: string[], clusterVgroups: {[key: string]: string[]} }>();
Object.keys(namespaces).forEach(namespaceKey => {
const namespaceData = namespaces[namespaceKey];
const clusterVgroups = (namespaceData.clusterVgroups || {}) as {[key: string]: string[]};
const clusters = Object.keys(clusterVgroups);
const clustersData = namespaceData.clusters || {};
const clusterVgroups: {[key: string]: string[]} = {};
Object.keys(clustersData).forEach(clusterName => {
clusterVgroups[clusterName] = clustersData[clusterName].vgroups || [];
});
const clusters = Object.keys(clustersData);
namespaceOptions.set(namespaceKey, {
clusters,
clusterVgroups,
Expand Down Expand Up @@ -149,15 +154,15 @@ class GlobalLockInfo extends React.Component<GlobalProps, GlobalLockInfoState> {
}
}
resetSearchFilter = () => {
this.setState({
this.setState(prevState => ({
globalLockParam: {
// pagination info don`t reset
pageSize: this.state.globalLockParam.pageSize,
pageNum: this.state.globalLockParam.pageNum,
pageSize: prevState.globalLockParam.pageSize,
pageNum: prevState.globalLockParam.pageNum,
},
clusters: [],
vgroups: [],
});
}));
}

search = () => {
Expand Down Expand Up @@ -276,10 +281,10 @@ class GlobalLockInfo extends React.Component<GlobalProps, GlobalLockInfoState> {
}

deleteCell = (val: string, index: number, record: any) => {
const {locale = {}} = this.props;
const { locale } = this.props;
const {
deleteGlobalLockTitle
} = locale;
} = locale.GlobalLockInfo || {};
let width = getCurrentLanguage() === enUsKey ? '120px' : '80px'
return (
<Actions style={{width: width}}>
Expand Down Expand Up @@ -316,7 +321,8 @@ class GlobalLockInfo extends React.Component<GlobalProps, GlobalLockInfoState> {


render() {
const { locale = {} } = this.props;
const { locale } = this.props;
const globalLockInfo = locale.GlobalLockInfo || {};
const { title, subTitle, createTimeLabel,
inputFilterPlaceholder,
selectNamespaceFilerPlaceholder,
Expand All @@ -325,7 +331,7 @@ class GlobalLockInfo extends React.Component<GlobalProps, GlobalLockInfoState> {
searchButtonLabel,
resetButtonLabel,
operateTitle,
} = locale;
} = globalLockInfo;
return (
<Page
title={title}
Expand Down Expand Up @@ -453,4 +459,8 @@ class GlobalLockInfo extends React.Component<GlobalProps, GlobalLockInfoState> {
}
}

export default withRouter(ConfigProvider.config(GlobalLockInfo, {}));
const mapStateToProps = (state: any) => ({
locale: state.locale.locale,
});

export default ConfigProvider.config(withRouter(connect(mapStateToProps)(GlobalLockInfo)), {});
Loading
Loading