Merge branch 'xss-bug' into 'develop'

ADD 云编程按钮事件



See merge request !192
This commit is contained in:
陈晓婷 2019-10-24 15:40:55 +08:00
commit 48d4ba8a36
3 changed files with 35 additions and 2 deletions

View File

@ -40,6 +40,7 @@
<div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span>
</div>
<div id="deploy-loading" style="display:none;"><span>部署中...</span></div>
<div id="ajax-modal" style="display:none;"></div>
<div id="nh_tx_dialog_html" class="white_content" style="display:none;">
<%=render :partial => 'layouts/upload_avatar', :locals => {:source => @project} %>
@ -58,4 +59,3 @@
</script>
<%= javascript_include_tag 'cookie','project',"avatars", 'header','prettify','select_list_move','attachments' %>
</html>

View File

@ -25,6 +25,10 @@
<% 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 %>
<%= 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 %>
<% end %>
<% unless QualityAnalysis.where(:project_id => @project.id).first.nil? %>
<%= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fl ml10" %>
@ -72,3 +76,25 @@
<%# end %>
<% html_title(l(:label_repository)) -%>
<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(){ }
});
i++;
if(i<11) {
$("#deploy-loading").show()
setTimeout("deploy()",1000);
}else {
i = 0
$("#deploy-loading").hide()
}
}
</script>

View File

@ -99,6 +99,13 @@ a.opnionButton:hover{background: #297fb8; }
padding:0.6em; z-index:100000; opacity: 0.5;}
html>body #ajax-indicator { position: fixed; }
#ajax-indicator span { background-position: 0% 40%; background-repeat: no-repeat; background-image: url(/images/loading.gif); padding-left: 26px; vertical-align: bottom;}
#deploy-loading { position: absolute; /* fixed not supported by IE */ background-color:#eee;border: 1px solid #bbb; top:35%; left:40%; width:20%; font-weight:bold; text-align:center; color: blue;
padding:0.6em; z-index:100000; opacity: 0.5;}
html>body #deploy-loading { position: fixed; }
#deploy-loading span { background-position: 0% 40%; background-repeat: no-repeat; background-image: url(/images/loading.gif); padding-left: 26px; vertical-align: bottom;}
div.modal { border-radius: 5px; background: #fff; z-index: 50; padding: 4px;}
.ui-widget-content { border: 1px solid #ddd; color: #333;}
.ui-widget { font-family: Verdana, sans-serif; font-size: 1.1em;}
@ -1005,4 +1012,4 @@ span.down{display: block;position: absolute;top: 13px;right: 4px;width: 12px;hei
.data_showdetail .detail_part{margin-bottom: 15px;}
.data_showdetail .detail_part label{width: 13%;padding-right: 10px;box-sizing: border-box;text-align: right;display: block;float: left}
.detail_des{border:none;padding: 0px;float: left;width: 818px;word-wrap: break-word;font-size: 14px;outline: none;}
.attachment_notice{color: #888888; font-size: 12px; line-height: 20px;}
.attachment_notice{color: #888888; font-size: 12px; line-height: 20px;}