Skip to content

Commit

Permalink
1.修复资产导入提示没有upload目录bug
Browse files Browse the repository at this point in the history
2.修复代码部署成功但是前端提示失败bug
  • Loading branch information
welliamcao committed Jan 15, 2018
1 parent 859c372 commit 3688e0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions OpsManage/templates/deploy/deploy_order_status.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ <h4 class="modal-title" id="myDeployLabel">
onOk: function(){
$.ajax({
type: 'POST',
url: '/deploy_order/',
url: '/deploy_order/1/',
data: {
"id":id,
"model":model,
Expand Down Expand Up @@ -301,7 +301,7 @@ <h4 class="modal-title" id="myDeployLabel">
};
$.ajax({
type: 'POST',
url: '/deploy_order/',
url: '/deploy_order/1/',
data: {
"model":model,
'order_cancel':result,
Expand Down Expand Up @@ -333,7 +333,7 @@ <h4 class="modal-title" id="myDeployLabel">
function finishDeploy(obj){
$.ajax({
type: 'POST',
url: '/deploy_order/',
url: '/deploy_order/1/',
data: {
"id":{{order.id}},
"model":'finish',
Expand Down Expand Up @@ -393,7 +393,7 @@ <h4 class="modal-title" id="myDeployLabel">
if (noDeployServer.length == 0){
$.ajax({
type: 'POST',
url: '/deploy_order/',
url: '/deploy_order/1/',
data: {
"id":{{order.id}},
"model":'finish',
Expand Down
1 change: 1 addition & 0 deletions OpsManage/views/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ def assets_import(request):
if request.method == "POST":
f = request.FILES.get('import_file')
filename = os.path.join(os.getcwd() + '/upload/',f.name)
if os.path.isdir(os.path.dirname(filename)) is not True:os.makedirs(os.path.dirname(filename))
fobj = open(filename,'wb')
for chrunk in f.chunks():
fobj.write(chrunk)
Expand Down

0 comments on commit 3688e0e

Please sign in to comment.