change(with pre fix) 修改安装和jumpserver.conf

上次修改已可以自动获取 ws地址,去掉无用设置和配置文件指定
去掉install.py中的设置
pull/114/head
ibuler 9 years ago
parent 6436fab837
commit c0bacb7c7c

@ -119,7 +119,6 @@ class PreSetup(object):
conf = ConfigParser.ConfigParser()
conf.read(conf_file)
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('db', 'host', self.db_host)
conf.set('db', 'port', self.db_port)

@ -1,6 +1,5 @@
[base]
url = http://192.168.244.129
websocket_url = ws://192.168.244.129
key = i6k2zeu8x6mncl76
ip = 0.0.0.0
port = 80

@ -41,7 +41,6 @@ SSH_KEY_DIR = os.path.join(BASE_DIR, 'keys/role_keys')
KEY = config.get('base', 'key')
URL = config.get('base', 'url')
LOG_LEVEL = config.get('base', 'log')
WEB_SOCKET_URL = config.get('base', 'websocket_url')
IP = config.get('base', 'ip')
PORT = config.get('base', 'port')

@ -354,9 +354,7 @@ def web_terminal(request):
role_name = request.GET.get('role')
asset = get_object(Asset, id=asset_id)
if asset:
print asset
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())

Loading…
Cancel
Save