Skip to content

Commit

Permalink
beta1.8.8 【需求】返回主页
Browse files Browse the repository at this point in the history
  • Loading branch information
rivest829 committed Jan 4, 2018
1 parent d2a251f commit f21b647
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 58 deletions.
2 changes: 2 additions & 0 deletions murong/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ def stepResponse(request):

@csrf_exempt
def upload(request):
if request.GET.get('back',''):
return render_to_response('deploy.html')
user = request.COOKIES.get('user', '')
allow_server = models.UserInfo.objects.filter(username=user).get().Permissions.split(' ')
error_msg = '服务器与包名不匹配'
Expand Down
8 changes: 8 additions & 0 deletions templates/dellog.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ <h3 class="text-center">
<small></small>
</p>
</div>
<div class="col-md-12 column">
<br>
<form action="/upload/" method="get" role="form">
<p style="width: 20%;margin: 0 auto;">
<button type="submit" value="back" name="back" class="btn btn-lg btn-danger">回到主页</button>
</p>
</form>
</div>
</div>
</div>
</body>
67 changes: 38 additions & 29 deletions templates/execute.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{# Load the tag library #}
{% load bootstrap3 %}

Expand All @@ -24,48 +23,58 @@ <h3 class="text-center">

<br><br><br>
<br><br>
<p style="width: 20%;margin: 0 auto;">
<label for="exampleInputFile">目标:</label>
<select name="server">
<option value=""></option>
{% for row in permissions %}
<option value="{{ row }}">{{ row }}</option>
{% endfor %}
</select>
<br><br><br>
<label for="exampleInputFile">执行命令:</label>
ygstart
<select name="GorS">
<option value=""></option>
<option value="-s">-s</option>
<option value="-g">-g</option>
</select>
</p>
<br>
<p style="width: 20%;margin: 0 auto;">
<label for="exampleInputFile">目标:</label>
<select name="server">
<option value=""></option>
{% for row in permissions %}
<option value="{{ row }}">{{ row }}</option>
{% endfor %}
</select>
<br><br><br>
<label for="exampleInputFile">执行命令:</label>
ygstart
<select name="GorS">
<option value=""></option>
<option value="-s">-s</option>
<option value="-g">-g</option>
</select>
</p>
<br>
<p style="width: 20%;margin: 0 auto;">
<input class="form-control" name="command" type="text" placeholder="服务名"></input>
</p>
<br><br>
<br><br>
<p style="width: 20%;margin: 0 auto;">
需求/BUG号:<input class="form-control" name="requestNum" type="text" placeholder="需求/BUG号(格式:REQ/BUG-编号)"></input>
需求/BUG号:<input class="form-control" name="requestNum" type="text"
placeholder="需求/BUG号(格式:REQ/BUG-编号)"></input>
</p>
<br>
<br>
<p style="width: 20%;margin: 0 auto;">
额外步骤:<input class="form-control" name="extantionStep" type="text" placeholder="可以为空"></input>
</p>
<br>
<p style="width: 20%;margin: 0 auto;">
<button type="submit" value="Execute!" name="execute" class="btn btn-default">Execute</button>
</p>
<br>
<p style="width: 20%;margin: 0 auto;">
<button type="submit" value="Execute!" name="execute" class="btn btn-default">Execute</button>
</p>
<div>
{# <input type="submit" value="restartJboss" name="restartJboss"/>#}
</div>

</form>

<p class="text-center text-info">
<em>提示:</em> 谨慎检查目标服务器,避免启错机器 <strong></strong> <small>:-)</small>
</p>
<p class="text-center text-info">
<em>提示:</em> 谨慎检查目标服务器,避免启错机器 <strong></strong>
<small>:-)</small>
</p>
</div>
<div class="col-md-12 column">
<br>
<form action="/upload/" method="get" role="form">
<p style="width: 20%;margin: 0 auto;">
<button type="submit" value="back" name="back" class="btn btn-lg btn-danger">回到主页</button>
</p>
</form>
</div>
</div>
</body>
8 changes: 8 additions & 0 deletions templates/stepCallback.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
<body>
<div class="container">
<div class="row clearfix">
<div class="col-md-1 column">
<br>
<form action="/upload/" method="get" role="form">
<p style="width: 20%;margin: 0 auto;">
<button type="submit" value="back" name="back" class="btn btn-lg btn-danger">回到主页</button>
</p>
</form>
</div>
<div class="col-md-12 column">
<table class="table">
<thead>
Expand Down
8 changes: 8 additions & 0 deletions templates/stepResponse.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ <h3 class="text-center">
<small></small>
</p>
</div>
<div class="col-md-12 column">
<br>
<form action="/upload/" method="get" role="form">
<p style="width: 20%;margin: 0 auto;">
<button type="submit" value="back" name="back" class="btn btn-lg btn-danger">回到主页</button>
</p>
</form>
</div>
</div>
</div>
</body>
8 changes: 8 additions & 0 deletions templates/touch.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ <h3 class="text-center">
<small></small>
</p>
</div>
<div class="col-md-12 column">
<br>
<form action="/upload/" method="get" role="form">
<p style="width: 20%;margin: 0 auto;">
<button type="submit" value="back" name="back" class="btn btn-lg btn-danger">回到主页</button>
</p>
</form>
</div>
</div>
</div>
</body>
67 changes: 38 additions & 29 deletions templates/upload.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,48 @@

<body background="/static/20171116192242.jpg">
<div class="container">
<div class="row clearfix">
<div class="col-md-12 column">
<h3 class="text-center">
沐融部署工具
</h3>
<div class="row clearfix">
<div class="col-md-12 column">
<h3 class="text-center">
沐融部署工具
</h3>
<form class="form-horizontal" action="/upload/" method="post" role="form" enctype="multipart/form-data">
<br><br><br>
<p style="width: 20%;margin: 0 auto;">
<label for="exampleInputFile">目标:</label>
<select name="server" class="selectpicker">
<option value=""></option>
{% for row in permissions %}
<option value="{{ row }}">{{ row }}</option>
{% endfor %}
</select>
<br><br><br>
<br><br><br>
<p style="width: 20%;margin: 0 auto;">
<label for="exampleInputFile">目标:</label>
<select name="server" class="selectpicker">
<option value=""></option>
{% for row in permissions %}
<option value="{{ row }}">{{ row }}</option>
{% endfor %}
</select>
<br><br><br>

<label for="exampleInputFile">选择要部署的包:</label>
</p>
<p style="width: 20%;margin: 0 auto;">
<label for="exampleInputFile">选择要部署的包:</label>
</p>
<p style="width: 20%;margin: 0 auto;">
<input name="data" type="file" class="center"></input>
</p>
<p class="help-block" style="width: 20%;margin: 0 auto;">
<br><br>
</p>
<p class="help-block" style="width: 20%;margin: 0 auto;">
<br><br>

<button type="submit" value="Upload" name="upload" class="btn btn-default">Upload</button>
<span style="color: red">{{ error_msg }}</span>
</p>
</form>
<button type="submit" value="Upload" name="upload" class="btn btn-default">Upload</button>
<span style="color: red">{{ error_msg }}</span>
</p>
</form>
<p class="text-center text-info">
<em>提示:</em> 点击"Upload"后,包中文件将直接覆盖到目标服务器, <strong>请谨慎检查包中文件</strong> <small></small>
</p>
</div>
</div>
<em>提示:</em> 点击"Upload"后,包中文件将直接覆盖到目标服务器, <strong>请谨慎检查包中文件</strong>
<small></small>
</p>
</div>
<div class="col-md-12 column">
<br>
<form action="/upload/" method="get" role="form">
<p style="width: 20%;margin: 0 auto;">
<button type="submit" value="back" name="back" class="btn btn-lg btn-danger">回到主页</button>
</p>
</form>
</div>
</div>
</div>
</body>

0 comments on commit f21b647

Please sign in to comment.