mirror of https://github.com/jumpserver/jumpserver
commit
7c08582e7d
|
@ -35,4 +35,6 @@ docs/_build/
|
|||
xpack
|
||||
logs/*
|
||||
### Vagrant ###
|
||||
.vagrant/
|
||||
.vagrant/
|
||||
release/*
|
||||
releashe
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
[![Python3](https://img.shields.io/badge/python-3.6-green.svg?style=plastic)](https://www.python.org/)
|
||||
[![Django](https://img.shields.io/badge/django-2.2-brightgreen.svg?style=plastic)](https://www.djangoproject.com/)
|
||||
[![Docker Pulls](https://img.shields.io/docker/pulls/jumpserver/jms_all.svg)](https://hub.docker.com/u/jumpserver)
|
||||
|
||||
JumpServer 是全球首款开源的堡垒机,使用 GNU GPL v2.0 开源协议,是符合 4A 规范的运维安全审计系统。
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
from django.views.generic import TemplateView
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.shortcuts import redirect
|
||||
from common.permissions import PermissionsMixin, IsValidUser
|
||||
|
||||
|
@ -12,17 +11,3 @@ class IndexView(PermissionsMixin, TemplateView):
|
|||
|
||||
def get(self, request, *args, **kwargs):
|
||||
return redirect('/ui/')
|
||||
|
||||
def dispatch(self, request, *args, **kwargs):
|
||||
if not request.user.is_authenticated:
|
||||
return self.handle_no_permission()
|
||||
if request.user.is_common_user:
|
||||
return redirect('assets:user-asset-list')
|
||||
return super(IndexView, self).dispatch(request, *args, **kwargs)
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context.update({
|
||||
'app': _("Dashboard"),
|
||||
})
|
||||
return context
|
||||
|
|
11
build.sh
11
build.sh
|
@ -1,11 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
|
||||
version=$1
|
||||
if [ -z "$version" ];then
|
||||
echo "Usage: sh build version"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
docker build -t jumpserver/jumpserver:$version .
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# 该build基于registry.fit2cloud.com/public/python:3
|
||||
utils_dir=$(pwd)
|
||||
project_dir=$(dirname "$utils_dir")
|
||||
release_dir=${project_dir}/release
|
||||
|
||||
# 安装依赖包
|
||||
command -v git || yum -y install git
|
||||
|
||||
# 打包
|
||||
cd "${project_dir}" || exit 3
|
||||
rm -rf "${release_dir:?}/*"
|
||||
to_dir="${release_dir}/jumpserver"
|
||||
mkdir -p "${to_dir}"
|
||||
git archive --format tar HEAD | tar x -C "${to_dir}"
|
||||
|
||||
if [[ $(uname) == 'Darwin' ]];then
|
||||
alias sedi="sed -i ''"
|
||||
else
|
||||
alias sedi='sed -i'
|
||||
fi
|
||||
|
||||
# 修改版本号文件
|
||||
if [[ -n ${VERSION} ]]; then
|
||||
sedi "s@VERSION = .*@VERSION = \"${VERSION}\"@g" "${to_dir}/apps/jumpserver/const.py"
|
||||
fi
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
utils_dir=$(dirname "$0")
|
||||
project_dir=$(dirname "${utils_dir}")
|
||||
|
||||
version=$1
|
||||
if [ -z "$version" ]; then
|
||||
echo "Usage: sh build version"
|
||||
exit
|
||||
fi
|
||||
|
||||
cd "${project_dir}" && docker build -t "jumpserver/jumpserver:${version}" .
|
Loading…
Reference in New Issue