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