Compare commits

...

9 Commits

Author SHA1 Message Date
whyour 3f12d9cbd5 更新版本号 v2.10.12 2021-12-09 23:24:10 +08:00
whyour 54d89754df 修复darkreader最新版bug 2021-12-09 23:22:17 +08:00
whyour 9470524615 更新readme 2021-12-06 23:42:14 +08:00
whyour b5faa6eaaa 修复logo样式 2021-12-06 11:18:19 +08:00
whyour eab476cfe8 更新版本号 v2.10.11 2021-12-05 23:15:49 +08:00
whyour b773def012 修复搜索环境变量urlencode 2021-12-05 23:04:26 +08:00
whyour a9f8b23a7a 修复内容区高度和logo样式 2021-11-29 23:02:42 +08:00
whyour 61bb6535fb 修复最后运行时长被覆盖 2021-11-29 21:49:32 +08:00
雪狐 eb0bdffe06 避免环境变量中出现"字符的时候提前截断字符串 (#966) 2021-11-29 21:43:29 +08:00
16 changed files with 104 additions and 31 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ export default defineConfig({
scripts: [
'https://gw.alipayobjects.com/os/lib/react/16.13.1/umd/react.production.min.js',
'https://gw.alipayobjects.com/os/lib/react-dom/16.13.1/umd/react-dom.production.min.js',
'https://cdn.jsdelivr.net/npm/darkreader@4/darkreader.min.js',
'https://cdn.jsdelivr.net/npm/darkreader@4.9.40/darkreader.min.js',
'https://cdn.jsdelivr.net/npm/codemirror@5/lib/codemirror.min.js',
'https://cdn.jsdelivr.net/npm/codemirror@5/mode/shell/shell.js',
'https://cdn.jsdelivr.net/npm/codemirror@5/mode/python/python.js',
+14 -8
View File
@@ -93,17 +93,21 @@ export default class CronService {
last_running_time: number;
last_execution_time: number;
}) {
const options: any = {
status,
pid,
log_path,
last_execution_time,
};
if (last_running_time > 0) {
options.last_running_time = last_running_time;
}
return new Promise((resolve) => {
this.cronDb.update(
{ _id: { $in: ids } },
{
$set: {
status,
pid,
log_path,
last_running_time,
last_execution_time,
},
$set: options,
},
{ multi: true, returnUpdatedDocs: true },
(err) => {
@@ -155,7 +159,9 @@ export default class CronService {
public async crontabs(searchText?: string): Promise<Crontab[]> {
let query = {};
if (searchText) {
const reg = new RegExp(searchText, 'i');
const encodeText = encodeURIComponent(searchText);
const reg = new RegExp(`${searchText}|${encodeText}`, 'i');
query = {
$or: [
{
+11 -3
View File
@@ -113,7 +113,9 @@ export default class EnvService {
): Promise<Env[]> {
let condition = { ...query };
if (searchText) {
const reg = new RegExp(searchText);
const encodeText = encodeURIComponent(searchText);
const reg = new RegExp(`${searchText}|${encodeText}`, 'i');
condition = {
$or: [
{
@@ -219,11 +221,17 @@ export default class EnvService {
// 忽略不符合bash要求的环境变量名称
if (/^[a-zA-Z_][0-9a-zA-Z_]+$/.test(key)) {
env_string += `export ${key}="${_(group)
let value = _(group)
.filter((x) => x.status !== EnvStatus.disabled)
.map('value')
.join('&')
.replace(/ /g, '')}"\n`;
.replace(/ /g, '');
if (/"/.test(value)) {
value = `'${value}'`;
} else {
value = `"${value}"`;
}
env_string += `export ${key}=${value}\n`;
}
}
}
+3 -1
View File
@@ -97,7 +97,9 @@ export default class OpenService {
): Promise<App[]> {
let condition = { ...query };
if (searchText) {
const reg = new RegExp(searchText);
const encodeText = encodeURIComponent(searchText);
const reg = new RegExp(`${searchText}|${encodeText}`, 'i');
condition = {
$or: [
{
+3
View File
@@ -0,0 +1,3 @@
import * as yargs from 'yargs';
yargs.help('h').alias('h', 'help').help().argv;
+2 -1
View File
@@ -51,7 +51,8 @@
"sockjs": "^0.3.21",
"typedi": "^0.8.0",
"uuid": "^8.3.2",
"winston": "^3.3.3"
"winston": "^3.3.3",
"yargs": "^17.2.1"
},
"devDependencies": {
"@ant-design/icons": "^4.6.2",
-1
View File
@@ -79,6 +79,5 @@ export default {
fixSiderbar: true,
contentWidth: 'Fixed',
splitMenus: false,
logo: 'https://z3.ax1x.com/2021/11/18/I7MpAe.png',
siderWidth: 180,
} as any;
+20 -2
View File
@@ -152,8 +152,8 @@
.ant-layout-content.ant-pro-basicLayout-content.ant-pro-basicLayout-has-header {
margin-bottom: 0 !important;
min-height: calc(100vh - 66px);
min-height: calc(100vh - var(--vh-offset, 0px) - 66px);
min-height: calc(100vh - 72px);
min-height: calc(100vh - var(--vh-offset, 0px) - 72px);
}
.Resizer {
@@ -293,3 +293,21 @@
color: #1890ff;
}
}
.ant-pro-sider-logo {
padding: 16px 8px !important;
h1 {
margin-left: 5px !important;
}
img {
width: 32px !important;
border-radius: 52% !important;
}
}
.ant-pro-global-header-logo {
a img {
// 移动端logo被拉伸
width: auto !important;
}
}
+7 -1
View File
@@ -20,7 +20,7 @@ import './index.less';
import vhCheck from 'vh-check';
import { version, changeLogLink, changeLog } from '../version';
import { useCtx, useTheme } from '@/utils/hooks';
import { message, Badge, Modal, Avatar, Dropdown, Menu, Popover } from 'antd';
import { message, Badge, Modal, Avatar, Dropdown, Menu, Image } from 'antd';
// @ts-ignore
import SockJS from 'sockjs-client';
import * as Sentry from '@sentry/react';
@@ -232,6 +232,12 @@ export default function (props: any) {
selectedKeys={[props.location.pathname]}
loading={loading}
ErrorBoundary={Sentry.ErrorBoundary}
logo={
<Image
preview={false}
src="https://pic.imgdb.cn/item/61acd0dd2ab3f51d912b1986.png"
/>
}
title={
<>
<span style={{ fontSize: 16 }}></span>
+1
View File
@@ -13,6 +13,7 @@
}
.diff-switch-file {
min-width: 768px;
.ant-form-item {
margin-bottom: 8px;
}
+1 -1
View File
@@ -77,7 +77,7 @@ const EnvModal = ({
rules={[
{ required: true, message: '请输入环境变量名称', whitespace: true },
{
pattern: /^[a-zA-Z_][0-9a-zA-Z_]+$/,
pattern: /^[a-zA-Z_][0-9a-zA-Z_]*$/,
message: '只能输入字母数字下划线,且不能以数字开头',
},
]}
+1 -1
View File
@@ -228,7 +228,7 @@ const Initialization = () => {
<img
alt="logo"
className={styles.logo}
src="https://z3.ax1x.com/2021/11/18/I7MpAe.png"
src="https://pic.imgdb.cn/item/61acd0dd2ab3f51d912b1986.png"
/>
<span className={styles.title}></span>
</div>
+1
View File
@@ -32,6 +32,7 @@
.logo {
width: 48px;
height: 48px;
display: block;
margin-bottom: 24px;
}
+1 -1
View File
@@ -127,7 +127,7 @@ const Login = () => {
<img
alt="logo"
className={styles.logo}
src="https://z3.ax1x.com/2021/11/18/I7MpAe.png"
src="https://pic.imgdb.cn/item/61acd0dd2ab3f51d912b1986.png"
/>
<span className={styles.title}>
{twoFactor ? '两步验证' : config.siteName}
+5 -9
View File
@@ -1,10 +1,6 @@
export const version = '2.10.10';
export const changeLogLink = 'https://t.me/jiao_long/229';
export const changeLog = `2.10.10 版本说明
1. 检测更新增加强制更新操作
2. deps目录文件增加软链,支持脚本直接调用。比如 const notify = require('deps/sendNotify')
3. 修复alpine3.12和3.14关于nginx的兼容性问题
4. 修复调试脚本运行路径
5. 修复deps目录依赖文件拷贝
6. 修复使用旧pushplus推送后结果解析失败的问题,感谢 https://github.com/xuzhonglin
export const version = '2.10.12';
export const changeLogLink = 'https://t.me/jiao_long/232';
export const changeLog = `2.10.12 版本说明
1. 修复logo样式
2. 修复暗黑模式无法访问
`;
+33 -1
View File
@@ -2995,6 +2995,15 @@ cliui@^6.0.0:
strip-ansi "^6.0.0"
wrap-ansi "^6.2.0"
cliui@^7.0.2:
version "7.0.4"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==
dependencies:
string-width "^4.2.0"
strip-ansi "^6.0.0"
wrap-ansi "^7.0.0"
clone-response@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b"
@@ -4446,7 +4455,7 @@ gensync@^1.0.0-beta.1, gensync@^1.0.0-beta.2:
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==
get-caller-file@^2.0.1:
get-caller-file@^2.0.1, get-caller-file@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
@@ -10819,6 +10828,11 @@ y18n@^4.0.0:
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf"
integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==
y18n@^5.0.5:
version "5.0.8"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
yallist@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
@@ -10842,6 +10856,11 @@ yargs-parser@^18.1.2:
camelcase "^5.0.0"
decamelize "^1.2.0"
yargs-parser@^20.2.2:
version "20.2.9"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
yargs@^15.4.1:
version "15.4.1"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8"
@@ -10859,6 +10878,19 @@ yargs@^15.4.1:
y18n "^4.0.0"
yargs-parser "^18.1.2"
yargs@^17.2.1:
version "17.2.1"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.2.1.tgz#e2c95b9796a0e1f7f3bf4427863b42e0418191ea"
integrity sha512-XfR8du6ua4K6uLGm5S6fA+FIJom/MdJcFNVY8geLlp2v8GYbOXD4EB1tPNZsRn4vBzKGMgb5DRZMeWuFc2GO8Q==
dependencies:
cliui "^7.0.2"
escalade "^3.1.1"
get-caller-file "^2.0.5"
require-directory "^2.1.1"
string-width "^4.2.0"
y18n "^5.0.5"
yargs-parser "^20.2.2"
yn@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"