# Release v3.3.3

dependabot/npm_and_yarn/spug_web/http-proxy-middleware-2.0.7
vapao 2024-10-14 16:20:11 +08:00
parent b847e0426b
commit 129ed9ad67
19 changed files with 55 additions and 41 deletions

View File

@ -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)'}}>

View File

@ -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>
) )

View File

@ -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>

View File

@ -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;
} }

View File

@ -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"/>

View File

@ -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>
)} )}

View File

@ -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}>

View File

@ -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={(

View File

@ -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={(

View File

@ -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}

View File

@ -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 = (

View File

@ -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>

View File

@ -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>

View File

@ -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,

View File

@ -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}/>

View File

@ -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>

View File

@ -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}

View File

@ -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 && (

View File

@ -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="开启"