remove proxy & fix some bugs on config.html
This commit is contained in:
parent
3597ef7b08
commit
a0387fce44
|
@ -24,6 +24,10 @@ apt-get install -y etcd
|
|||
apt-get install -y glusterfs-client
|
||||
apt-get install -y nginx
|
||||
|
||||
#add ip forward
|
||||
echo "net.ipv4.ip_forward=1" >>/etc/sysctl.conf
|
||||
sysctl -p
|
||||
|
||||
# check cgroup control
|
||||
which cgm &> /dev/null || { echo "FAILED : cgmanager is required, please install cgmanager" && exit 1; }
|
||||
cpucontrol=$(cgm listkeys cpu)
|
||||
|
@ -75,4 +79,3 @@ echo ""
|
|||
|
||||
|
||||
echo "Then start docklet as described in README.md"
|
||||
|
||||
|
|
|
@ -161,6 +161,7 @@ class VclusterMgr(object):
|
|||
info['proxy_url'] = proxy_url
|
||||
info['proxy_server_ip'] = proxy_server_ip
|
||||
info['proxy_public_ip'] = proxy_public_ip
|
||||
info['port_mapping'] = []
|
||||
clusterfile.write(json.dumps(info))
|
||||
clusterfile.close()
|
||||
return [True, info]
|
||||
|
|
|
@ -210,7 +210,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
@ -222,35 +221,6 @@
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">SERVICE</h3>
|
||||
<h5><a href="{{ clusterinfo['proxy_url'] }}" title="click here jump to your proxy server">{{ clusterinfo['proxy_url'] }}</a></h5>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form action="/addproxy/{{master.split("@")[0]}}/{{ clustername }}/" id="addproxy" method="POST">
|
||||
{% if 'proxy_ip' in clusterinfo %}
|
||||
<p>ip:<input type="text" id="proxy_ip" name="proxy_ip" value={{ clusterinfo['proxy_ip'][:clusterinfo['proxy_ip'].index(':')] }} readonly="true"/>port:<input type="text" id="proxy_port" name="proxy_port" value={{ clusterinfo['proxy_ip'][clusterinfo['proxy_ip'].index(':')+1:] }} readonly="true"/>
|
||||
<button type="button" class="btn-xs btn-default">enable</button>
|
||||
<a href="/deleteproxy/{{master.split("@")[0]}}/{{ clustername }}/"><button type="button" class="btn-xs btn-danger">disable</button></a></p>
|
||||
{% else %}
|
||||
<p>ip:<input type="text" id="proxy_ip" name="proxy_ip" value={{ clusterinfo["containers"][0]["ip"][:clusterinfo["containers"][0]["ip"].index("/")] }} />port:<input type="text" id="proxy_port" name="proxy_port" value="80"/>
|
||||
<button type="submit" class="btn-xs btn-success">enable</button>
|
||||
<button type="button" class="btn-xs btn-default">disable</button></p>
|
||||
{% endif %}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<h4 class="box-title">TCP Ports Mapping</h4>
|
||||
|
@ -334,6 +304,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
<div class="row">
|
||||
|
|
|
@ -212,21 +212,21 @@ def saveImage_force(clustername,containername,masterip):
|
|||
saveImageView.description = request.form['description']
|
||||
return saveImageView.as_view()
|
||||
|
||||
@app.route("/addproxy/<masterip>/<clustername>/", methods=['POST'])
|
||||
'''@app.route("/addproxy/<masterip>/<clustername>/", methods=['POST'])
|
||||
@login_required
|
||||
def addproxy(clustername,masterip):
|
||||
addproxyView.clustername = clustername
|
||||
addproxyView.masterip = masterip
|
||||
addproxyView.ip = request.form['proxy_ip']
|
||||
addproxyView.port = request.form['proxy_port']
|
||||
return addproxyView.as_view()
|
||||
return addproxyView.as_view()'''
|
||||
|
||||
@app.route("/deleteproxy/<masterip>/<clustername>/", methods=['GET'])
|
||||
'''@app.route("/deleteproxy/<masterip>/<clustername>/", methods=['GET'])
|
||||
@login_required
|
||||
def deleteproxy(clustername,masterip):
|
||||
deleteproxyView.clustername = clustername
|
||||
deleteproxyView.masterip = masterip
|
||||
return deleteproxyView.as_view()
|
||||
return deleteproxyView.as_view()'''
|
||||
|
||||
@app.route("/port_mapping/add/<masterip>/", methods=['POST'])
|
||||
@login_required
|
||||
|
|
Loading…
Reference in New Issue