mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +08:00
修复任务详情手机样式
This commit is contained in:
parent
aa288c89b3
commit
ec5f6d20cb
59
.github/workflows/build_base.yml
vendored
59
.github/workflows/build_base.yml
vendored
|
@ -1,59 +0,0 @@
|
||||||
name: Build QL BASE
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '00 18 * * *' # GMT 14:00 => 北京时间 2:00
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
packages: write
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: '14'
|
|
||||||
|
|
||||||
- name: Set time zone
|
|
||||||
uses: szenius/set-timezone@v1.0
|
|
||||||
with:
|
|
||||||
timezoneLinux: "Asia/Shanghai"
|
|
||||||
timezoneMacos: "Asia/Shanghai"
|
|
||||||
timezoneWindows: "China Standard Time"
|
|
||||||
|
|
||||||
- name: Login to DockerHub
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Login to GHCR
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.repository_owner }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v1
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v1
|
|
||||||
|
|
||||||
- name: Build and push
|
|
||||||
id: docker_build
|
|
||||||
uses: docker/build-push-action@v2
|
|
||||||
with:
|
|
||||||
build-args: |
|
|
||||||
MAINTAINER=${{ github.repository_owner }}
|
|
||||||
QL_BRANCH=${{ github.ref_name }}
|
|
||||||
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
|
|
||||||
context: .
|
|
||||||
file: docker/base/Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: whyour/ql:base
|
|
|
@ -1,4 +1,5 @@
|
||||||
FROM whyour/ql:base
|
FROM node:alpine
|
||||||
|
|
||||||
ARG QL_MAINTAINER="whyour"
|
ARG QL_MAINTAINER="whyour"
|
||||||
LABEL maintainer="${QL_MAINTAINER}"
|
LABEL maintainer="${QL_MAINTAINER}"
|
||||||
ARG QL_URL=https://github.com/${QL_MAINTAINER}/qinglong.git
|
ARG QL_URL=https://github.com/${QL_MAINTAINER}/qinglong.git
|
||||||
|
@ -13,18 +14,45 @@ ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
|
||||||
|
|
||||||
WORKDIR ${QL_DIR}
|
WORKDIR ${QL_DIR}
|
||||||
|
|
||||||
RUN git clone -b ${QL_BRANCH} ${QL_URL} ${QL_DIR} \
|
RUN set -x \
|
||||||
|
&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
|
||||||
|
&& apk update -f \
|
||||||
|
&& apk upgrade \
|
||||||
|
&& apk --no-cache add -f bash \
|
||||||
|
coreutils \
|
||||||
|
moreutils \
|
||||||
|
git \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
tzdata \
|
||||||
|
perl \
|
||||||
|
openssl \
|
||||||
|
nginx \
|
||||||
|
python3 \
|
||||||
|
jq \
|
||||||
|
openssh \
|
||||||
|
py3-pip \
|
||||||
|
&& rm -rf /var/cache/apk/* \
|
||||||
|
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||||
|
&& echo "Asia/Shanghai" > /etc/timezone \
|
||||||
|
&& touch ~/.bashrc \
|
||||||
|
&& git config --global user.email "qinglong@@users.noreply.github.com" \
|
||||||
|
&& git config --global user.name "qinglong" \
|
||||||
|
&& npm install -g pnpm \
|
||||||
|
&& pnpm install -g pm2 \
|
||||||
|
&& pnpm install -g ts-node typescript tslib \
|
||||||
|
&& git clone -b ${QL_BRANCH} ${QL_URL} ${QL_DIR} \
|
||||||
&& cd ${QL_DIR} \
|
&& cd ${QL_DIR} \
|
||||||
&& cp -f .env.example .env \
|
&& cp -f .env.example .env \
|
||||||
&& chmod 777 ${QL_DIR}/shell/*.sh \
|
&& chmod 777 ${QL_DIR}/shell/*.sh \
|
||||||
&& chmod 777 ${QL_DIR}/docker/*.sh \
|
&& chmod 777 ${QL_DIR}/docker/*.sh \
|
||||||
&& cp -rf /node_modules ./ \
|
|
||||||
&& rm -rf /node_modules \
|
|
||||||
&& pnpm install --prod \
|
&& pnpm install --prod \
|
||||||
&& rm -rf /root/.pnpm-store \
|
&& rm -rf /root/.pnpm-store \
|
||||||
&& rm -rf /root/.cache \
|
&& rm -rf /root/.cache \
|
||||||
|
&& rm -rf /root/.npm \
|
||||||
&& git clone -b ${QL_BRANCH} https://github.com/${QL_MAINTAINER}/qinglong-static.git /static \
|
&& git clone -b ${QL_BRANCH} https://github.com/${QL_MAINTAINER}/qinglong-static.git /static \
|
||||||
&& mkdir -p ${QL_DIR}/static \
|
&& mkdir -p ${QL_DIR}/static \
|
||||||
&& cp -rf /static/* ${QL_DIR}/static \
|
&& cp -rf /static/* ${QL_DIR}/static \
|
||||||
&& rm -rf /static
|
&& rm -rf /static
|
||||||
|
|
||||||
ENTRYPOINT ["./docker/docker-entrypoint.sh"]
|
ENTRYPOINT ["./docker/docker-entrypoint.sh"]
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
FROM node:alpine
|
|
||||||
ARG QL_MAINTAINER="whyour"
|
|
||||||
LABEL maintainer="${QL_MAINTAINER}"
|
|
||||||
|
|
||||||
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
|
|
||||||
LANG=zh_CN.UTF-8 \
|
|
||||||
SHELL=/bin/bash \
|
|
||||||
PS1="\u@\h:\w \$ "
|
|
||||||
|
|
||||||
COPY package.json /
|
|
||||||
|
|
||||||
RUN set -x \
|
|
||||||
&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
|
|
||||||
&& apk update -f \
|
|
||||||
&& apk upgrade \
|
|
||||||
&& apk --no-cache add -f bash \
|
|
||||||
coreutils \
|
|
||||||
moreutils \
|
|
||||||
git \
|
|
||||||
curl \
|
|
||||||
wget \
|
|
||||||
tzdata \
|
|
||||||
perl \
|
|
||||||
openssl \
|
|
||||||
nginx \
|
|
||||||
python3 \
|
|
||||||
jq \
|
|
||||||
openssh \
|
|
||||||
py3-pip \
|
|
||||||
python2 \
|
|
||||||
g++ \
|
|
||||||
make \
|
|
||||||
&& rm -rf /var/cache/apk/* \
|
|
||||||
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
|
||||||
&& echo "Asia/Shanghai" > /etc/timezone \
|
|
||||||
&& touch ~/.bashrc \
|
|
||||||
&& git config --global user.email "qinglong@@users.noreply.github.com" \
|
|
||||||
&& git config --global user.name "qinglong" \
|
|
||||||
&& npm install -g pnpm \
|
|
||||||
&& pnpm install -g pm2 \
|
|
||||||
&& pnpm install -g ts-node typescript tslib \
|
|
||||||
&& cd / && pnpm install --prod \
|
|
||||||
&& apk --purge del python2 g++ make \
|
|
||||||
&& rm -rf /root/.npm \
|
|
||||||
&& rm -rf /root/.pnpm-store \
|
|
||||||
&& rm -rf /root/.cache \
|
|
||||||
&& rm -f /package.json
|
|
||||||
|
|
||||||
CMD [ "node" ]
|
|
|
@ -50,11 +50,13 @@ const CronDetailModal = ({
|
||||||
handleCancel,
|
handleCancel,
|
||||||
visible,
|
visible,
|
||||||
theme,
|
theme,
|
||||||
|
isPhone,
|
||||||
}: {
|
}: {
|
||||||
cron?: any;
|
cron?: any;
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
handleCancel: (needUpdate?: boolean) => void;
|
handleCancel: (needUpdate?: boolean) => void;
|
||||||
theme: string;
|
theme: string;
|
||||||
|
isPhone: boolean;
|
||||||
}) => {
|
}) => {
|
||||||
const [activeTabKey, setActiveTabKey] = useState('log');
|
const [activeTabKey, setActiveTabKey] = useState('log');
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
|
@ -213,11 +215,11 @@ const CronDetailModal = ({
|
||||||
forceRender
|
forceRender
|
||||||
footer={false}
|
footer={false}
|
||||||
onCancel={() => handleCancel()}
|
onCancel={() => handleCancel()}
|
||||||
width={'80vw'}
|
wrapClassName="crontab-detail"
|
||||||
bodyStyle={{ background: '#eee', padding: 12 }}
|
width={!isPhone ? '80vw' : ''}
|
||||||
>
|
>
|
||||||
<div style={{ height: '80vh' }}>
|
<div style={{ height: '80vh' }}>
|
||||||
<Card bodyStyle={{ display: 'flex', justifyContent: 'space-between' }}>
|
<Card>
|
||||||
<div className="cron-detail-info-item">
|
<div className="cron-detail-info-item">
|
||||||
<div className="cron-detail-info-title">状态</div>
|
<div className="cron-detail-info-title">状态</div>
|
||||||
<div className="cron-detail-info-value">
|
<div className="cron-detail-info-value">
|
||||||
|
|
|
@ -8,6 +8,20 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.crontab-detail {
|
||||||
|
background: '#eee';
|
||||||
|
padding: 12px;
|
||||||
|
|
||||||
|
.ant-card:first-child {
|
||||||
|
overflow-x: auto;
|
||||||
|
|
||||||
|
.ant-body {
|
||||||
|
display: 'flex';
|
||||||
|
justify-content: space-between;
|
||||||
|
min-width: 700px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.cron-detail-info-item {
|
.cron-detail-info-item {
|
||||||
flex: auto;
|
flex: auto;
|
||||||
|
|
||||||
|
@ -19,6 +33,7 @@
|
||||||
margin-top: 18px;
|
margin-top: 18px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.log-item {
|
.log-item {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
@ -968,6 +968,7 @@ const Crontab = ({ headerStyle, isPhone, theme }: any) => {
|
||||||
}}
|
}}
|
||||||
cron={detailCron}
|
cron={detailCron}
|
||||||
theme={theme}
|
theme={theme}
|
||||||
|
isPhone={isPhone}
|
||||||
/>
|
/>
|
||||||
</PageContainer>
|
</PageContainer>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user