mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-12 14:18:33 +00:00
change(with pre fix) 修改安装和jumpserver.conf
上次修改已可以自动获取 ws地址,去掉无用设置和配置文件指定 去掉install.py中的设置
This commit is contained in:
parent
6436fab837
commit
c0bacb7c7c
@ -119,7 +119,6 @@ class PreSetup(object):
|
|||||||
conf = ConfigParser.ConfigParser()
|
conf = ConfigParser.ConfigParser()
|
||||||
conf.read(conf_file)
|
conf.read(conf_file)
|
||||||
conf.set('base', 'url', 'http://%s' % self.ip)
|
conf.set('base', 'url', 'http://%s' % self.ip)
|
||||||
conf.set('base', 'websocket_url', 'ws://%s' % self.ip)
|
|
||||||
conf.set('base', 'key', self.key)
|
conf.set('base', 'key', self.key)
|
||||||
conf.set('db', 'host', self.db_host)
|
conf.set('db', 'host', self.db_host)
|
||||||
conf.set('db', 'port', self.db_port)
|
conf.set('db', 'port', self.db_port)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
[base]
|
[base]
|
||||||
url = http://192.168.244.129
|
url = http://192.168.244.129
|
||||||
websocket_url = ws://192.168.244.129
|
|
||||||
key = i6k2zeu8x6mncl76
|
key = i6k2zeu8x6mncl76
|
||||||
ip = 0.0.0.0
|
ip = 0.0.0.0
|
||||||
port = 80
|
port = 80
|
||||||
|
@ -41,7 +41,6 @@ SSH_KEY_DIR = os.path.join(BASE_DIR, 'keys/role_keys')
|
|||||||
KEY = config.get('base', 'key')
|
KEY = config.get('base', 'key')
|
||||||
URL = config.get('base', 'url')
|
URL = config.get('base', 'url')
|
||||||
LOG_LEVEL = config.get('base', 'log')
|
LOG_LEVEL = config.get('base', 'log')
|
||||||
WEB_SOCKET_URL = config.get('base', 'websocket_url')
|
|
||||||
IP = config.get('base', 'ip')
|
IP = config.get('base', 'ip')
|
||||||
PORT = config.get('base', 'port')
|
PORT = config.get('base', 'port')
|
||||||
|
|
||||||
|
@ -354,9 +354,7 @@ def web_terminal(request):
|
|||||||
role_name = request.GET.get('role')
|
role_name = request.GET.get('role')
|
||||||
asset = get_object(Asset, id=asset_id)
|
asset = get_object(Asset, id=asset_id)
|
||||||
if asset:
|
if asset:
|
||||||
print asset
|
|
||||||
hostname = asset.hostname
|
hostname = asset.hostname
|
||||||
web_terminal_url = '%s/ws/terminal?id=%s&role=%s' % (WEB_SOCKET_URL, asset_id, role_name)
|
|
||||||
return render_to_response('jlog/web_terminal.html', locals())
|
return render_to_response('jlog/web_terminal.html', locals())
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user