Skip to content

Commit

Permalink
fix: nebula not connect (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
xigongdaEricyang authored Oct 28, 2022
1 parent 13839ba commit 1b771ef
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/pages/ServiceManage/Overview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const mapDispatch: any = (dispatch: IDispatch) => ({
const mapState = (state: IRootState) => ({
spaces: state.nebula.spaces,
currentSpace: state.nebula.currentSpace,
nebulaConnect: state.nebula.nebulaConnect,
});

interface IHaderProps {
Expand All @@ -54,14 +55,16 @@ const OverviewCardHeader = (props: IHaderProps) => {

const Overview: React.FC<IProps> = (props: IProps) => {

const { cluster, currentSpace, spaces, baseRouter = '/management' } = props;
const { cluster, currentSpace, spaces, baseRouter = '/management', nebulaConnect } = props;

const modalHandler = useRef<any>();
const [hosts, setHosts] = useState([]);

useEffect(() => {
asyncGetHostsInfo();
}, []);
if (nebulaConnect) {
asyncGetHostsInfo();
}
}, [nebulaConnect]);

const handleSpaceChange = async space => {
const { code } = await props.asyncUseSpaces(space);
Expand Down

0 comments on commit 1b771ef

Please sign in to comment.