ADD ajax request headers

This commit is contained in:
Jasder 2019-10-24 16:31:51 +08:00
parent 6fef889e19
commit fbfe908d46
1 changed files with 14 additions and 8 deletions

View File

@ -25,7 +25,7 @@
<% else %>
<%= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fl ml10" %>
<% end %>
<% if @project.id == 5787 %>
<% if true %>
<%= link_to '云端编程', "http://106.75.119.131:8080/dashboard/#/ide/che/trustie_che_demo", :class => "btn_zipdown fl ml10"%>
<%= link_to '云端部署', "javascript:void(0)", :class => "btn_zipdown fl ml10", :onclick => "deploy()"%>
<% end %>
@ -80,13 +80,19 @@
<script type="text/javascript">
var i=0;
function deploy(){
$.ajax({
url: 'http://106.75.6.173:8080/job/socks-shop/build?token=socks-shop',
type:'get',
success: function(){ },
beforeSend: function(){ },
complete: function(){ }
});
if (i == 0) {
$.ajax({
url: 'http://106.75.6.173:8080/job/socks-shop/build?token=socks-shop&j_username=jenkins&j_password=123',
type:'get',
contentType: "application/json; charset=utf-8",
success: function(){
console.log('request success!')
},
beforeSend: function(){ },
complete: function(){ }
});
}
i++;
if(i<11) {
$("#deploy-loading").show()