mirror of https://github.com/openspug/spug
# Release v3.3.3
parent
b847e0426b
commit
129ed9ad67
|
@ -18,7 +18,7 @@ export default function () {
|
|||
rel="noopener noreferrer">官网</a>
|
||||
<a className={styles.item} title="Github" href="https://github.com/openspug/spug" target="_blank"
|
||||
rel="noopener noreferrer"><GithubOutlined/></a>
|
||||
<a title="文档" href="https://spug.cc/docs/about-spug/" target="_blank"
|
||||
<a title="文档" href="https://ops.spug.cc/docs/about-spug/" target="_blank"
|
||||
rel="noopener noreferrer">文档</a>
|
||||
</div>
|
||||
<div style={{color: 'rgba(0, 0, 0, .45)'}}>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Layout, Dropdown, Menu, Avatar } from 'antd';
|
||||
import { Layout, Dropdown, Menu, Avatar, Divider } from 'antd';
|
||||
import { MenuFoldOutlined, MenuUnfoldOutlined, UserOutlined, LogoutOutlined, CodeOutlined } from '@ant-design/icons';
|
||||
import { AuthDiv } from 'components';
|
||||
import Notification from './Notification';
|
||||
|
@ -41,22 +41,26 @@ export default function (props) {
|
|||
|
||||
return (
|
||||
<Layout.Header className={styles.header}>
|
||||
<div className={styles.left}>
|
||||
<div className={styles.trigger} onClick={props.toggle}>
|
||||
{props.collapsed ? <MenuUnfoldOutlined/> : <MenuFoldOutlined/>}
|
||||
</div>
|
||||
<div className={styles.trigger} onClick={props.toggle}>
|
||||
{props.collapsed ? <MenuUnfoldOutlined/> : <MenuFoldOutlined/>}
|
||||
</div>
|
||||
<Notification/>
|
||||
<AuthDiv className={styles.terminal} auth="host.console.view|host.console.list" onClick={openTerminal}>
|
||||
<CodeOutlined style={{fontSize: 16}}/>
|
||||
</AuthDiv>
|
||||
<div className={styles.user}>
|
||||
<Dropdown overlay={UserMenu} style={{background: '#000'}}>
|
||||
<span className={styles.action}>
|
||||
<Avatar size="small" src={avatar} style={{marginRight: 8}}/>
|
||||
{localStorage.getItem('nickname')}
|
||||
</span>
|
||||
</Dropdown>
|
||||
<div className={styles.right}>
|
||||
<div className={styles.link} onClick={() => window.open('https://spug.cc/')}>官网</div>
|
||||
<div className={styles.link} onClick={() => window.open('https://ops.spug.cc/docs/about-spug/')}>文档</div>
|
||||
<div className={styles.link} onClick={() => window.open('https://ssl.spug.cc/')}>证书申请</div>
|
||||
<Divider type="vertical"/>
|
||||
<Notification/>
|
||||
<AuthDiv className={styles.terminal} auth="host.console.view|host.console.list" onClick={openTerminal}>
|
||||
<CodeOutlined style={{fontSize: 16}}/>
|
||||
</AuthDiv>
|
||||
<div className={styles.user}>
|
||||
<Dropdown overlay={UserMenu} style={{background: '#000'}}>
|
||||
<span className={styles.action}>
|
||||
<Avatar size="small" src={avatar} style={{marginRight: 8}}/>
|
||||
{localStorage.getItem('nickname')}
|
||||
</span>
|
||||
</Dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</Layout.Header>
|
||||
)
|
||||
|
|
|
@ -50,7 +50,6 @@ export default function () {
|
|||
{Routes}
|
||||
<Route component={NotFound}/>
|
||||
</Switch>
|
||||
<Footer/>
|
||||
</Layout.Content>
|
||||
</Layout>
|
||||
</Layout>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
.header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
padding: 0 12px 0 0;;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
|
@ -8,8 +9,20 @@
|
|||
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
||||
z-index: 2;
|
||||
|
||||
.left {
|
||||
flex: 1;
|
||||
.right {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
.link {
|
||||
color: #333333;
|
||||
cursor: pointer;
|
||||
padding: 0 16px;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, 0.025);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.terminal {
|
||||
|
@ -80,7 +93,7 @@
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
padding: 24px 24px 0;
|
||||
padding: 24px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ export default observer(function () {
|
|||
<Form.Item label="钉钉" extra={<span>
|
||||
钉钉收不到通知?请参考
|
||||
<a target="_blank" rel="noopener noreferrer"
|
||||
href="https://spug.cc/docs/use-problem#use-dd">官方文档</a>
|
||||
href="https://ops.spug.cc/docs/use-problem#use-dd">官方文档</a>
|
||||
</span>}>
|
||||
<Form.Item noStyle name="ding">
|
||||
<Input placeholder="https://oapi.dingtalk.com/robot/send?access_token=xxx"/>
|
||||
|
|
|
@ -78,7 +78,7 @@ export default observer(function () {
|
|||
valuePropName="checked"
|
||||
initialValue={store.record.is_public === undefined || store.record.is_public}
|
||||
tooltip={<a target="_blank" rel="noopener noreferrer"
|
||||
href="https://spug.cc/docs/conf-app">什么是公共/私有配置?</a>}>
|
||||
href="https://ops.spug.cc/docs/conf-app">什么是公共/私有配置?</a>}>
|
||||
<Switch checkedChildren="公共" unCheckedChildren="私有"/>
|
||||
</Form.Item>
|
||||
)}
|
||||
|
|
|
@ -69,7 +69,7 @@ export default observer(function AutoDeploy() {
|
|||
<Form.Item hidden={tagMode} required={!tagMode} label="选择分支" extra={<span>
|
||||
根据你的网络情况,首次刷新可能会很慢,请耐心等待。
|
||||
<a target="_blank" rel="noopener noreferrer"
|
||||
href="https://spug.cc/docs/use-problem#clone">刷新失败?</a>
|
||||
href="https://ops.spug.cc/docs/use-problem#clone">刷新失败?</a>
|
||||
</span>}>
|
||||
<Form.Item style={{display: 'inline-block', marginBottom: 0, width: '246px'}}>
|
||||
<Select placeholder="仅指定分支的事件触发自动发布" value={branch} onChange={setBranch}>
|
||||
|
|
|
@ -89,7 +89,7 @@ export default observer(function Ext1Setup1() {
|
|||
<Form.Item label="消息通知" extra={<span>
|
||||
应用审核及发布成功或失败结果通知,
|
||||
<a target="_blank" rel="noopener noreferrer"
|
||||
href="https://spug.cc/docs/use-problem#use-dd">钉钉收不到通知?</a>
|
||||
href="https://ops.spug.cc/docs/use-problem#use-dd">钉钉收不到通知?</a>
|
||||
</span>}>
|
||||
<Input
|
||||
addonBefore={(
|
||||
|
|
|
@ -83,7 +83,7 @@ export default observer(function Ext2Setup1() {
|
|||
<Form.Item label="消息通知" extra={<span>
|
||||
应用审核及发布成功或失败结果通知,
|
||||
<a target="_blank" rel="noopener noreferrer"
|
||||
href="https://spug.cc/docs/use-problem#use-dd">钉钉收不到通知?</a>
|
||||
href="https://ops.spug.cc/docs/use-problem#use-dd">钉钉收不到通知?</a>
|
||||
</span>}>
|
||||
<Input
|
||||
addonBefore={(
|
||||
|
|
|
@ -165,7 +165,7 @@ class Ext2Setup2 extends React.Component {
|
|||
) : null,
|
||||
<Form.Item key={2} required label="目标路径" extra={<a
|
||||
target="_blank" rel="noopener noreferrer"
|
||||
href="https://spug.cc/docs/deploy-config#transfer">使用前请务必阅读官方文档。</a>}>
|
||||
href="https://ops.spug.cc/docs/deploy-config#transfer">使用前请务必阅读官方文档。</a>}>
|
||||
<Input
|
||||
disabled={store.isReadOnly}
|
||||
spellCheck={false}
|
||||
|
|
|
@ -10,7 +10,7 @@ const Tips1 = (
|
|||
<a
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
href="https://spug.cc/docs/deploy-config#global-env">内置全局变量</a>
|
||||
href="https://ops.spug.cc/docs/deploy-config#global-env">内置全局变量</a>
|
||||
)
|
||||
|
||||
const Tips2 = (
|
||||
|
|
|
@ -117,7 +117,7 @@ export default observer(function () {
|
|||
<Form.Item required label="选择分支/标签/版本" style={{marginBottom: 12}} extra={<span>
|
||||
根据网络情况,首次刷新可能会很慢,请耐心等待。
|
||||
<a target="_blank" rel="noopener noreferrer"
|
||||
href="https://spug.cc/docs/use-problem#clone">clone 失败?</a>
|
||||
href="https://ops.spug.cc/docs/use-problem#clone">clone 失败?</a>
|
||||
</span>}>
|
||||
<Form.Item style={{display: 'inline-block', marginBottom: 0, width: '450px'}}>
|
||||
<Input.Group compact>
|
||||
|
|
|
@ -154,7 +154,7 @@ export default observer(function () {
|
|||
<Form.Item required label="选择分支/标签/版本" style={{marginBottom: 12}} extra={<span>
|
||||
根据网络情况,首次刷新可能会很慢,请耐心等待。
|
||||
<a target="_blank" rel="noopener noreferrer"
|
||||
href="https://spug.cc/docs/use-problem#clone">clone 失败?</a>
|
||||
href="https://ops.spug.cc/docs/use-problem#clone">clone 失败?</a>
|
||||
</span>}>
|
||||
<Form.Item style={{display: 'inline-block', marginBottom: 0, width: '450px'}}>
|
||||
<Input.Group compact>
|
||||
|
|
|
@ -84,7 +84,7 @@ function ComTable() {
|
|||
title: '审核时间',
|
||||
className: S.min120,
|
||||
dataIndex: 'approve_at',
|
||||
render: v => <Tooltip title={v}>{v ? moment(v).fromNow() : null}</Tooltip>,
|
||||
hide: true
|
||||
}, {
|
||||
title: '发布人',
|
||||
className: S.min120,
|
||||
|
@ -94,8 +94,6 @@ function ComTable() {
|
|||
title: '发布时间',
|
||||
className: S.min120,
|
||||
dataIndex: 'do_at',
|
||||
render: v => <Tooltip title={v}>{v ? moment(v).fromNow() : null}</Tooltip>,
|
||||
hide: true
|
||||
}, {
|
||||
title: '备注',
|
||||
className: S.min120,
|
||||
|
|
|
@ -99,7 +99,7 @@ function TaskIndex() {
|
|||
<Radio.Button value="sh" style={{width: 80, textAlign: 'center'}}>Shell</Radio.Button>
|
||||
<Radio.Button value="python" style={{width: 80, textAlign: 'center'}}>Python</Radio.Button>
|
||||
</Radio.Group>
|
||||
<a href="https://spug.cc/docs/batch-exec" target="_blank" rel="noopener noreferrer"
|
||||
<a href="https://ops.spug.cc/docs/batch-exec" target="_blank" rel="noopener noreferrer"
|
||||
className={style.tips}><BulbOutlined/> 使用全局变量?</a>
|
||||
<Button style={{float: 'right'}} icon={<PlusOutlined/>} onClick={store.switchTemplate}>从执行模版中选择</Button>
|
||||
<ACEditor className={style.editor} mode={interpreter} value={command} width="100%" onChange={setCommand}/>
|
||||
|
|
|
@ -59,7 +59,7 @@ export default function () {
|
|||
content: <div>
|
||||
未能获取到访问者的真实IP,无法提供基于请求来源IP的合法性验证,详细信息请参考
|
||||
<a target="_blank"
|
||||
href="https://spug.cc/docs/practice/"
|
||||
href="https://ops.spug.cc/docs/practice/"
|
||||
rel="noopener noreferrer">官方文档</a>。
|
||||
</div>,
|
||||
onOk: () => doLogin(data)
|
||||
|
@ -156,7 +156,7 @@ export default function () {
|
|||
rel="noopener noreferrer">官网</a>
|
||||
<a className={styles.links} title="Github" href="https://github.com/openspug/spug" target="_blank"
|
||||
rel="noopener noreferrer"><GithubOutlined/></a>
|
||||
<a title="文档" href="https://spug.cc/docs/about-spug/" target="_blank"
|
||||
<a title="文档" href="https://ops.spug.cc/docs/about-spug/" target="_blank"
|
||||
rel="noopener noreferrer">文档</a>
|
||||
</div>
|
||||
<div style={{color: 'rgba(0, 0, 0, .45)'}}>Copyright <CopyrightOutlined/> {new Date().getFullYear()} By OpenSpug</div>
|
||||
|
|
|
@ -114,7 +114,7 @@ export default observer(function () {
|
|||
<span>
|
||||
任务执行失败告警通知,
|
||||
<a target="_blank" rel="noopener noreferrer"
|
||||
href="https://spug.cc/docs/use-problem#use-dd">钉钉收不到通知?</a>
|
||||
href="https://ops.spug.cc/docs/use-problem#use-dd">钉钉收不到通知?</a>
|
||||
</span>)}>
|
||||
<Input.Group compact>
|
||||
<Select style={{width: '25%'}} value={notifyMode}
|
||||
|
|
|
@ -34,7 +34,7 @@ class About extends React.Component {
|
|||
top: 88,
|
||||
message: `发现新版本 ${res.version}`,
|
||||
icon: <SmileTwoTone/>,
|
||||
btn: <a target="_blank" rel="noopener noreferrer" href="https://spug.cc/docs/update-version/">如何升级?</a>,
|
||||
btn: <a target="_blank" rel="noopener noreferrer" href="https://ops.spug.cc/docs/update-version/">如何升级?</a>,
|
||||
description: <pre style={{lineHeight: '30px'}}>{res.content}<br/>{res.extra}</pre>
|
||||
})
|
||||
} else if (res.extra) {
|
||||
|
@ -67,8 +67,8 @@ class About extends React.Component {
|
|||
<a href="https://spug.cc" target="_blank" rel="noopener noreferrer">https://spug.cc</a>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="更新日志">
|
||||
<a href="https://spug.cc/docs/change-log/" target="_blank"
|
||||
rel="noopener noreferrer">https://spug.cc/docs/change-log/</a>
|
||||
<a href="https://ops.spug.cc/docs/change-log/" target="_blank"
|
||||
rel="noopener noreferrer">https://ops.spug.cc/docs/change-log/</a>
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
{info['spug_version'] !== VERSION && (
|
||||
|
|
|
@ -74,7 +74,7 @@ export default observer(function () {
|
|||
<Form.Item
|
||||
label="访问IP校验"
|
||||
extra={<span>建议开启,校验是否获取了真实的访问者IP,防止因为增加的反向代理层导致基于IP的安全策略失效,当校验失败时会在登录时弹窗提醒。如果你在内网部署且仅在内网使用可以关闭该特性。<a
|
||||
href="https://spug.cc/docs/practice"
|
||||
href="https://ops.spug.cc/docs/practice"
|
||||
target="_blank" rel="noopener noreferrer">为什么没有获取到真实IP?</a></span>}>
|
||||
<Switch
|
||||
checkedChildren="开启"
|
||||
|
|
Loading…
Reference in New Issue