"...pointpillars-pytorch.git" did not exist on "0761f6c7592e4311b2bdd75b98c2800e9aed5f24"
Unverified Commit 87677df8 authored by Lijiaoa's avatar Lijiaoa Committed by GitHub
Browse files

fix issue 3549: Broken link on webui (#5154)

parent 7811307c
...@@ -63,7 +63,12 @@ class NavCon extends React.Component<NavProps, NavState> { ...@@ -63,7 +63,12 @@ class NavCon extends React.Component<NavProps, NavState> {
method: 'GET' method: 'GET'
}).then(res => { }).then(res => {
if (res.status === 200) { if (res.status === 200) {
this.setState({ version: res.data }); let formatVersion = res.data;
// 2.0 will get 2.0.0 by node, so delete .0 to get real version
if (formatVersion.endsWith('.0')) {
formatVersion = formatVersion.slice(0, -2);
}
this.setState({ version: formatVersion });
} }
}); });
}; };
...@@ -80,7 +85,12 @@ class NavCon extends React.Component<NavProps, NavState> { ...@@ -80,7 +85,12 @@ class NavCon extends React.Component<NavProps, NavState> {
openGithubNNI = (): void => { openGithubNNI = (): void => {
const { version } = this.state; const { version } = this.state;
const nniLink = `https://github.com/Microsoft/nni/tree/${version}`; // 999.0.0-developing
let formatVersion = `v${version}`;
if (version === '999.0.0-developing') {
formatVersion = 'master';
}
const nniLink = `https://github.com/Microsoft/nni/tree/${formatVersion}`;
window.open(nniLink); window.open(nniLink);
}; };
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment