代码质量分析弹框及参数传入
This commit is contained in:
parent
c6bd5e6d31
commit
d21df48961
|
@ -308,13 +308,15 @@ update
|
|||
end
|
||||
|
||||
def quality_analyses
|
||||
language = params[:language]
|
||||
branch = params[:branch]
|
||||
path = params[:path]
|
||||
user_name = User.find(@project.user_id).try(:login)
|
||||
rep_name = params[:repository_id]
|
||||
host = "192.168.0.200"
|
||||
port = "1125"
|
||||
username = "git"
|
||||
password = "123123"
|
||||
##显示文件和系统版本
|
||||
user_name = User.find(@project.user_id).try(:login)
|
||||
rep_name = params[:repository_id]
|
||||
server_cmd1 = "sh gitclone.sh" + " " + user_name + " " + rep_name
|
||||
# 连接到远程主机 foobar
|
||||
ssh = Net::SSH.start(host, username, :port => port, :password => password) do |ssh|
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<%= form_tag( url_for(:controller => 'repositories', :action => 'quality_analyses'), :remote => true , :method => 'post', :class => 'resourcesSearchloadBox mt10', :id => 'resource_search_form') do %>
|
||||
<textarea id="path_description" name="rep[path]" rows="8" placeholder="最多3000个汉字(或6000个英文字符)"></textarea>
|
||||
<%= select_tag :branch, options_for_select(["#{@gitlab_default_branch}"]+ @branch_names, @rev), :id => 'branch' %>
|
||||
<%= select_tag :language, options_for_select(["Java","C"]), :id => 'branch' %>
|
||||
<% end %>
|
|
@ -0,0 +1,8 @@
|
|||
$('#ajax-modal').html('<%= escape_javascript( render :partial => 'repositories/quality_analyses', :locals => {}) %>');
|
||||
showModal('ajax-modal', '615px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal()' style='margin-left: 580px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
|
||||
$('#ajax-modal').parent().css("top","20%").css("left","42%").css("border","3px solid #269ac9");
|
||||
$('#ajax-modal').parent().addClass("popbox_polls");
|
||||
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="project_r_h">
|
||||
<div class="fl"><h2 class="project_h2_repository"><%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %></h2></div>
|
||||
<a href="<%= @zip_path %>" class="btn_zipdown fr" onclick="">ZIP下载</a>
|
||||
<%= link_to "质量分析", quality_analyses_path(:id => @project.id, :repository_id => @repository.identifier) %>
|
||||
<%= link_to "质量分析", quality_analyses_path(:id => @project.id, :repository_id => @repository.identifier), :remote => true, :class => "btn_zipdown fr" %>
|
||||
|
||||
</div>
|
||||
<div class="repository_con" style="line-height:1.9;">
|
||||
|
@ -58,7 +58,6 @@
|
|||
|
||||
<span class="fr mr5"><font class="fb ml2 mr2 vl_commit">
|
||||
<%=link_to @changesets_all_count, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev,:page=>1 ,:commit_count =>"#{@changesets_all_count}"} %></font> 提交
|
||||
|
||||
</span>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue