Skip to content

Commit 38866a4

Browse files
committed
fix: closes #1476
1 parent 024cf2a commit 38866a4

File tree

4 files changed

+66
-9
lines changed

4 files changed

+66
-9
lines changed

console/src/main/resources/static/console-fe/src/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import ServiceList from './pages/ServiceManagement/ServiceList';
4343
import ServiceDetail from './pages/ServiceManagement/ServiceDetail';
4444
import SubscriberList from './pages/ServiceManagement/SubscriberList';
4545
import ClusterNodeList from './pages/ClusterManagement/ClusterNodeList';
46+
import Welcome from './pages/Welcome/Welcome';
4647

4748
import reducers from './reducers';
4849
import { changeLanguage } from './reducers/locale';
@@ -70,7 +71,8 @@ const store = createStore(
7071
);
7172

7273
const MENU = [
73-
{ path: '/', exact: true, render: () => <Redirect to="/configurationManagement" /> },
74+
{ path: '/', exact: true, render: () => <Redirect to="/welcome" /> },
75+
{ path: '/welcome', component: Welcome },
7476
{ path: '/namespace', component: Namespace },
7577
{ path: '/newconfig', component: Newconfig },
7678
{ path: '/configsync', component: Configsync },
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright 1999-2018 Alibaba Group Holding Ltd.
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
* http://www.apache.org/licenses/LICENSE-2.0
7+
* Unless required by applicable law or agreed to in writing, software
8+
* distributed under the License is distributed on an "AS IS" BASIS,
9+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
* See the License for the specific language governing permissions and
11+
* limitations under the License.
12+
*/
13+
14+
import React from 'react';
15+
import PropTypes from 'prop-types';
16+
import { connect } from 'react-redux';
17+
import { Redirect } from 'react-router-dom';
18+
19+
@connect(state => ({ ...state.base }))
20+
class Welcome extends React.Component {
21+
static propTypes = {
22+
functionMode: PropTypes.string,
23+
};
24+
25+
render() {
26+
const { functionMode } = this.props;
27+
return (
28+
<div>
29+
{functionMode !== '' && (
30+
<Redirect
31+
to={`/${functionMode === 'naming' ? 'serviceManagement' : 'configurationManagement'}`}
32+
/>
33+
)}
34+
</div>
35+
);
36+
}
37+
}
38+
39+
export default Welcome;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
* Copyright 1999-2018 Alibaba Group Holding Ltd.
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
* http://www.apache.org/licenses/LICENSE-2.0
7+
* Unless required by applicable law or agreed to in writing, software
8+
* distributed under the License is distributed on an "AS IS" BASIS,
9+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
* See the License for the specific language governing permissions and
11+
* limitations under the License.
12+
*/
13+
14+
import Welcome from './Welcome';
15+
16+
export default Welcome;

console/src/main/resources/static/js/main.js

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)