|
|
|
@@ -49,6 +49,7 @@ const routerMap = { |
|
|
|
deployment: '/console/deployment', |
|
|
|
playground: '/console/playground', |
|
|
|
personal: '/console/personal', |
|
|
|
monitoring: 'https://monitor.lancerouter.ai/', |
|
|
|
}; |
|
|
|
|
|
|
|
const SiderBar = ({ onNavigate = () => {} }) => { |
|
|
|
@@ -189,6 +190,12 @@ const SiderBar = ({ onNavigate = () => {} }) => { |
|
|
|
to: '/setting', |
|
|
|
className: isRoot() ? '' : 'tableHiddle', |
|
|
|
}, |
|
|
|
{ |
|
|
|
text: t('监控'), |
|
|
|
itemKey: 'monitoring', |
|
|
|
to: 'https://monitor.lancerouter.ai/', |
|
|
|
className: isRoot() ? '' : 'tableHiddle', |
|
|
|
}, |
|
|
|
]; |
|
|
|
|
|
|
|
// 根据配置过滤项目 |
|
|
|
@@ -416,6 +423,21 @@ const SiderBar = ({ onNavigate = () => {} }) => { |
|
|
|
// 如果没有路由,直接返回元素 |
|
|
|
if (!to) return itemElement; |
|
|
|
|
|
|
|
// 外部链接用 <a> 在新窗口打开 |
|
|
|
if (to.startsWith('http')) { |
|
|
|
return ( |
|
|
|
<a |
|
|
|
style={{ textDecoration: 'none' }} |
|
|
|
href={to} |
|
|
|
target='_blank' |
|
|
|
rel='noopener noreferrer' |
|
|
|
onClick={onNavigate} |
|
|
|
> |
|
|
|
{itemElement} |
|
|
|
</a> |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
return ( |
|
|
|
<Link |
|
|
|
style={{ textDecoration: 'none' }} |
|
|
|
|