Skip to content

Commit

Permalink
Merge branch 'jumpserver:dev' into v3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Halo1236 authored Jul 2, 2024
2 parents ea038ce + 4ab7883 commit 38f04ee
Show file tree
Hide file tree
Showing 878 changed files with 19,972 additions and 19,370 deletions.
3 changes: 2 additions & 1 deletion .env.development.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ VUE_APP_LOGOUT_PATH = '/core/auth/logout/'
# Dev server for core proxy
VUE_APP_CORE_HOST = 'http://localhost:8080'
VUE_APP_CORE_WS = 'ws://localhost:8080'
VUE_APP_KAEL_HOST = 'http://localhost:8083'
VUE_APP_KOKO_HOST = 'http://localhost:5000'
VUE_APP_KOKO_WS = 'ws://localhost:5000'
VUE_APP_ENV = 'development'
46 changes: 30 additions & 16 deletions .github/workflows/jms-build-test.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,46 @@
name: "Run Build Test"
on:
push:
branches:
- pr@*
- repr@*
paths:
- 'Dockerfile'
- 'Dockerfile*'
- 'package.json'
- 'yarn.lock'

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
component: [lina]
version: [v4]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3

- uses: docker/setup-qemu-action@v2
- name: Prepare Build
run: |
sed -i '[email protected]@registry.yarnpkg.com@g' yarn.lock
- uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/build-push-action@v3
- name: Build Image
uses: docker/build-push-action@v5
with:
context: .
push: false
tags: jumpserver/lina:test
push: true
file: Dockerfile
tags: ghcr.io/jumpserver/${{ matrix.component }}:${{ matrix.version }}
platforms: linux/amd64
build-args: |
VERSION=${{ matrix.version }}
APT_MIRROR=http://deb.debian.org
NPM_REGISTRY=https://registry.yarnpkg.com
outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true
cache-from: type=gha
cache-to: type=gha,mode=max

- uses: LouisBrunner/[email protected]
if: always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Check Build
conclusion: ${{ job.status }}
1 change: 1 addition & 0 deletions .github/workflows/jms-generic-action-handler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ jobs:
- uses: jumpserver/action-generic-handler@master
env:
GITHUB_TOKEN: ${{ secrets.PRIVATE_TOKEN }}
I18N_TOKEN: ${{ secrets.I18N_TOKEN }}
23 changes: 14 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,35 @@ ARG DEPENDENCIES=" \
python3"

ARG APT_MIRROR=http://mirrors.ustc.edu.cn
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=lina \
sed -i "s@http://.*.debian.org@${APT_MIRROR}@g" /etc/apt/sources.list \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
set -ex \
&& rm -f /etc/apt/apt.conf.d/docker-clean \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' >/etc/apt/apt.conf.d/keep-cache \
&& sed -i "s@http://.*.debian.org@${APT_MIRROR}@g" /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends ${DEPENDENCIES} \
&& echo "no" | dpkg-reconfigure dash \
&& rm -rf /var/lib/apt/lists/*
&& apt-get -y install --no-install-recommends ${DEPENDENCIES} \
&& echo "no" | dpkg-reconfigure dash

ARG NPM_REGISTRY="https://registry.npmmirror.com"

RUN set -ex \
&& npm config set registry ${NPM_REGISTRY} \
&& yarn config set registry ${NPM_REGISTRY}

WORKDIR /data

ADD package.json yarn.lock /data
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn,sharing=locked,id=lina \
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn,sharing=locked \
--mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=yarn.lock,target=yarn.lock \
yarn install

ARG VERSION
ENV VERSION=$VERSION

ADD . /data
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn,sharing=locked,id=lina \

RUN --mount=type=cache,target=/usr/local/share/.cache/yarn,sharing=locked \
sed -i "s@version-dev@${VERSION}@g" src/layout/components/NavHeader/About.vue \
&& yarn build

Expand Down
23 changes: 13 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "vue-admin-template",
"version": "4.2.1",
"description": "A vue admin template with Element UI & axios & iconfont & permission control & lint",
"author": "Pan <panfree23@gmail.com>",
"license": "MIT",
"name": "Lina",
"version": "v4.0.0",
"description": "JumpServer Web UI",
"author": "JumpServer Team <support@fit2cloud.com>",
"license": "GPL-3.0-or-later",
"scripts": {
"dev": "vue-cli-service serve",
"serve": "vue-cli-service serve",
Expand All @@ -20,21 +20,23 @@
"vue-i18n-report": "vue-i18n-extract report -v './src/**/*.?(js|vue)' -l './src/i18n/langs/**/*.json'",
"vue-i18n-report-json": "vue-i18n-extract report -v './src/**/*.?(js|vue)' -l './src/i18n/langs/**/*.json' -o /tmp/abc.json",
"vue-i18n-report-add-miss": "vue-i18n-extract report -v './src/**/*.?(js|vue)' -l './src/i18n/langs/**/*.json' -a",
"diff-i18n": "python ./src/i18n/langs/i18n-util.py diff en ja",
"apply-i18n": "python ./src/i18n/langs/i18n-util.py apply en ja"
"diff-i18n": "python ./src/i18n/langs/i18n-util.py diff en ja zh_Hant",
"apply-i18n": "python ./src/i18n/langs/i18n-util.py apply en ja zh_Hant"
},
"dependencies": {
"@babel/plugin-proposal-optional-chaining": "^7.13.12",
"@fontsource/open-sans": "^5.0.24",
"@traptitech/markdown-it-katex": "^3.6.0",
"@ztree/ztree_v3": "3.5.44",
"axios": "0.21.1",
"axios": "0.28.0",
"axios-retry": "^3.1.9",
"cron-parser": "^4.0.0",
"crypto-js": "^4.1.1",
"css-color-function": "^1.3.3",
"decimal.js": "^10.4.3",
"deepmerge": "^4.2.2",
"echarts": "^4.7.0",
"element-ui": "2.13.2",
"echarts": "4.7.0",
"element-ui": "2.15.14",
"eslint-plugin-html": "^6.0.0",
"highlight.js": "^11.9.0",
"install": "^0.13.0",
Expand Down Expand Up @@ -63,6 +65,7 @@
"npm": "^7.8.0",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
"v-sanitize": "^0.0.13",
"vue": "2.6.10",
"vue-codemirror": "4.0.6",
"vue-cookie": "^1.1.4",
Expand Down
3 changes: 3 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
if(pathname.indexOf('/ui') === -1) {
window.location.href = window.location.origin + '/ui/#' + pathname
}
if (pathname.startsWith('/ui/#/chat')) {
window.location.href = window.location.origin + pathname
}
}
</script>
<div id="app"></div>
Expand Down
79 changes: 56 additions & 23 deletions public/theme/element-extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,39 @@
}

.el-alert--info.is-light {
background-color: light-9;
color: light-2;
background-color: rgba(255, 255, 255, 0.5);
color: info;
border: 1px solid;
}

.el-alert--info .el-alert__description {
color: light-2;
color: info;
}

.el-pagination.is-background {
.el-pagination__total,
.el-pagination__sizes,
.el-pager {
color: var(--color-icon-primary);
}
}

.el-pagination.is-background .el-pager li:not(.disabled):hover {
color: white;
color: #fff;
background-color: primary;
}

.el-pagination.is-background .btn-next,
.el-pagination.is-background .btn-prev,
.el-pagination.is-background .el-pager li {
margin: 0 5px;
background-color: white;
color: #606266;
min-width: 28px;
border-radius: 2px;
border: 1px solid #DCDFE6;
font-size: 12px;
line-height: 26px;
font-weight: 400;
margin: 0 5px;
background-color: #fff;
color: var(--color-icon-primary);
min-width: 28px;
border-radius: 2px;
border: 1px solid #DCDFE6;
font-size: 12px;
font-weight: 400;
}

.el-breadcrumb__inner,
Expand Down Expand Up @@ -85,8 +92,12 @@


td .el-button.el-button--mini {
padding: 1px 5px;
padding: 1px 6px;
line-height: 1.5;

.el-icon--right {
margin-bottom: 2px;
}
}

.el-tabs__item.is-active, .el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active {
Expand Down Expand Up @@ -191,7 +202,7 @@ td .el-button.el-button--mini {
}

.el-input--small .el-input__icon {
line-height: 34px;
line-height: 30px;
}

.option-group .el-select-dropdown__item.hover, .option-group .el-select-dropdown__item.selected {
Expand Down Expand Up @@ -224,8 +235,10 @@ td .el-button.el-button--mini {
}

.el-tag.el-tag--info .el-tag__close {
color: #333333!important;
background-color: inherit;
display: inline-block;
margin-top: 3px;
color: var(--color-text-primary);
background-color: inherit;
}

.el-tag.el-tag--info.is-hit {
Expand Down Expand Up @@ -280,7 +293,7 @@ td .el-button.el-button--mini {
}

.el-textarea__inner {
border-radius: 0;
color: var(--color-text-primary);
}

.el-pagination.is-background .number {
Expand Down Expand Up @@ -313,11 +326,11 @@ td .el-button.el-button--mini {

.el-tooltip__popper.is-light {
background: #FFF;
max-width: 500px;
border: 1px solid #e7eaec;
}

.el-tooltip__popper.is-light .popper__arrow {
border-bottom-color: #e7eaec !important;
box-shadow: 0 1.6px 3.6px 0 rgba(0, 0, 0, .132), 0 .3px .9px 0 rgba(0, 0, 0, .108);
line-height: 1.5;
padding: 10px;
}

.el-dialog__headerbtn .el-dialog__close {
Expand All @@ -326,7 +339,7 @@ td .el-button.el-button--mini {
}

.el-table__header thead tr th {
border-bottom: 1px solid #e7e7e7 !important;
/*border-bottom: 1px solid #e7e7e7 !important;*/
}

.el-table .cell,
Expand Down Expand Up @@ -423,14 +436,34 @@ td .el-button.el-button--mini {
flex-direction: column;
}

.el-dialog .el-dialog__header .el-dialog__title {
color: var(--color-text-primary);
}

.el-dialog .el-dialog__body {
max-height: 80vh;
overflow: auto;
padding: 30px;
}

.el-dialog .el-dialog__body .el-transfer-panel .el-transfer-panel__body .el-input__inner,
.el-dialog .el-dialog__body .el-transfer-panel .el-transfer-panel__header .el-checkbox__label,
.el-dialog .el-dialog__body .el-transfer-panel .el-transfer-panel__body .el-checkbox-group .el-checkbox.el-transfer-panel__item {
color: var(--color-text-primary);
}

.el-dialog .el-dialog__body .opera .el-button.is-disabled,
.el-dialog .el-dialog__body .el-transfer-panel .vip-footer .el-button.is-disabled {
color: var(--color-input-border);
}

.el-dialog .el-dialog__body .opera .el-button.is-disabled.el-button--primary {
color: #fff;
}

.el-dialog .el-dialog__body form {
padding-right: 20px;
margin-right: 20px;
}

.el-dialog .el-dialog__footer {
Expand Down
3 changes: 0 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,3 @@ export default {
}
}
</script>

<style>
</style>
9 changes: 9 additions & 0 deletions src/api/component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import request from '@/utils/request'

export function getLokiLog(data) {
return request({
url: `/api/v1/terminal/loki/logs/`,
method: 'get',
params: data
})
}
9 changes: 9 additions & 0 deletions src/api/ops.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ export function createJob(form) {
})
}

export function StopJob(form) {
return request({
url: '/api/v1/ops/job-executions/stop/',
method: 'post',
data: form
})
}

export function JobUploadFile(form) {
return request({
url: '/api/v1/ops/jobs/upload/',
Expand All @@ -62,3 +70,4 @@ export function JobUploadFile(form) {
data: form
})
}

1 change: 0 additions & 1 deletion src/api/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export function getProfile(token) {
return request({
url: '/api/v1/users/profile/',
method: 'get'
// params: { token }
})
}

Expand Down
1 change: 1 addition & 0 deletions src/assets/img/cloud/ali.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/img/cloud/aws_china.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 38f04ee

Please sign in to comment.