代码质量分析样式
This commit is contained in:
parent
ce6e6116b5
commit
9f15a8aa4e
|
@ -0,0 +1,148 @@
|
|||
<div style="min-height: 687px;" id="RSide" class="fl">
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2" style="width:180px;">SonarQube质量分析</h2>
|
||||
</div>
|
||||
<div class="repositorytitle mr15">
|
||||
<form accept-charset="UTF-8" action="/projects/2/repository" class="fl c_grey02 ml5" id="revision_selector" method="get">
|
||||
<!-- Branches Dropdown -->
|
||||
分支:
|
||||
<select id="branch" name="branch">
|
||||
<option value=""></option>
|
||||
<option value="Branch_szzh">Branch_szzh</option>
|
||||
<option value="CourseModify">CourseModify</option>
|
||||
<option value="GitlabVersion">GitlabVersion</option>
|
||||
<option value="Homework">Homework</option>
|
||||
<option value="Poll">Poll</option>
|
||||
<option value="alan_competition">alan_competition</option>
|
||||
<option value="api">api</option>
|
||||
<option value="competition">competition</option>
|
||||
<option value="course_group">course_group</option>
|
||||
<option value="dev_chuangbin">dev_chuangbin</option>
|
||||
<option value="dev_cxt2">dev_cxt2</option>
|
||||
<option value="dev_dingxu">dev_dingxu</option>
|
||||
<option value="dev_hjq">dev_hjq</option>
|
||||
<option value="dev_repository_hjq">dev_repository_hjq</option>
|
||||
<option value="dev_zanle">dev_zanle</option>
|
||||
<option value="develop">develop</option>
|
||||
<option value="email_verify">email_verify</option>
|
||||
<option value="enterprise">enterprise</option>
|
||||
<option value="exceptionHandle">exceptionHandle</option>
|
||||
<option value="gitlab">gitlab</option>
|
||||
<option value="gitlab_guange">gitlab_guange</option>
|
||||
<option value="guange_dev">guange_dev</option>
|
||||
<option value="guange_homework">guange_homework</option>
|
||||
<option value="master" selected="selected">master</option>
|
||||
<option value="memcached_alan">memcached_alan</option>
|
||||
<option value="ouyang">ouyang</option>
|
||||
<option value="ouyangxuhua">ouyangxuhua</option>
|
||||
<option value="president">president</option>
|
||||
<option value="redis_cache">redis_cache</option>
|
||||
<option value="shapgroup">shapgroup</option>
|
||||
<option value="sw_new_course">sw_new_course</option>
|
||||
<option value="szzh">szzh</option>
|
||||
<option value="yutao">yutao</option>
|
||||
<option value="zh">zh</option>
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
||||
<a href="javascript:void(0);" class="blue_btn_cir fl mt5 c_white" style="background-color:#64bdd9;">开始分析</a>
|
||||
<div class="cl"></div>
|
||||
<div class="tac f20 fb mt35 mb30">项目代码质量分析报告</div>
|
||||
<div class="analysis-tag-wrap f16"> <span class="analysis-tag fl mr15"></span> <span class="fb fl">概要信息</span></div>
|
||||
<div class="analysis-block mt10 mb40 flex f14">
|
||||
<div class="analysis-genral"><img src="images/homepageImage.jpg" width="90" class="image-cir" />
|
||||
<p class="fontGrey3 mt15">质量等级</p>
|
||||
<p class="fontBlue2 pr">A<span class="f8 c_white analysis-genral-icon b_green2 borderRadius">正常</span></p>
|
||||
</div>
|
||||
<div class="analysis-genral"><img src="images/homepageImage.jpg" width="90" class="image-cir" />
|
||||
<p class="fontGrey3 mt15">复杂度</p>
|
||||
<p class="fontBlue2 pr">44<span class="f8 c_white analysis-genral-icon b_green2 borderRadius">正常</span></p>
|
||||
</div>
|
||||
<div class="analysis-genral"><img src="images/homepageImage.jpg" width="90" class="image-cir" />
|
||||
<p class="fontGrey3 mt15">重复</p>
|
||||
<p class="fontBlue2 pr">44%<span class="f8 c_white analysis-genral-icon b_green2 borderRadius">正常</span></p>
|
||||
</div>
|
||||
<div class="analysis-genral"><img src="images/homepageImage.jpg" width="90" class="image-cir" />
|
||||
<p class="fontGrey3 mt15">注释率</p>
|
||||
<p class="fontBlue2 pr">12%<span class="f8 c_white analysis-genral-icon b_red borderRadius">偏低</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="analysis-tag-wrap f16"> <span class="analysis-tag fl mr15"></span> <span class="fb fl mr10">质量等级</span><span class="mr10 fontGrey2"><span class="c_red f18" style="margin-top:-5px; display:inline-block;">2</span>/5分</span><span class="fontGrey2">可定性评价为:<span class="c_red">质量中等</span></span></div>
|
||||
<div class="analysis-block mt10 mb40 f14">
|
||||
<div><span class="fontGrey3 mr30">技术债务</span><span class="fontBlue2 w70 pInline">14天</span><span class="fontGrey2">查看详情</span></div>
|
||||
<div><span class="fontGrey3 mr30">质量问题</span><span class="fontBlue2 w70 pInline">130</span><span class="fontGrey2">问题分类如下:</span></div>
|
||||
<div class="ml90 mt15">
|
||||
<div class="mb10"><span class="analysis-block-icon mr5"></span><span class="fontGrey3 mr45">阻断</span><span class="fontBlue2 w70 pInline">4</span><span class="quality-percentage"><span class="quality-percentage-rate"></span></span></div>
|
||||
<div class="mb10"><span class="analysis-serious-icon mr5"></span><span class="fontGrey3 mr45">严重</span><span class="fontBlue2 w70 pInline">75</span><span class="quality-percentage"><span class="quality-percentage-rate"></span></span></div>
|
||||
<div class="mb10"><span class="analysis-main-icon mr5"></span><span class="fontGrey3 mr45">主要</span><span class="fontBlue2 w70 pInline">428</span><span class="quality-percentage"><span class="quality-percentage-rate"></span></span></div>
|
||||
<div class="mb10"><span class="analysis-secondary-icon mr5"></span><span class="fontGrey3 mr45">次要</span><span class="fontBlue2 w70 pInline">225</span><span class="quality-percentage"><span class="quality-percentage-rate"></span></span></div>
|
||||
<div><span class="analysis-info-icon mr5"></span><span class="fontGrey3 mr45">信息</span><span class="fontBlue2 w70 pInline">114</span><span class="quality-percentage"><span class="quality-percentage-rate"></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="analysis-tag-wrap f16"> <span class="analysis-tag fl mr15"></span> <span class="fb fl mr10">代码规模</span><span class="fontGrey2">可定性评价为:<span class="c_red">规模中等</span></span></div>
|
||||
<div class="analysis-block mt10 mb40 flex f14">
|
||||
<div class="analysis-genral">
|
||||
<p class="fontGrey3">代码行数</p>
|
||||
<p class="fontBlue2">9,337</p>
|
||||
</div>
|
||||
<div class="analysis-genral">
|
||||
<p class="fontGrey3">文件</p>
|
||||
<p class="fontBlue2">10</p>
|
||||
</div>
|
||||
<div class="analysis-genral">
|
||||
<p class="fontGrey3">目录</p>
|
||||
<p class="fontBlue2">6</p>
|
||||
</div>
|
||||
<div class="analysis-genral">
|
||||
<p class="fontGrey3">类</p>
|
||||
<p class="fontBlue2">15</p>
|
||||
</div>
|
||||
<div class="analysis-genral">
|
||||
<p class="fontGrey3">方法</p>
|
||||
<p class="fontBlue2">36</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="analysis-tag-wrap f16"> <span class="analysis-tag fl mr15"></span> <span class="fb fl">贡献统计</span></div>
|
||||
<div class="analysis-block mt10 f12">
|
||||
<ul class="contribute-list">
|
||||
<li class="fl fontGrey2 contribute-list-avatar"> </li>
|
||||
<li class="fl fontGrey2 contribute-list-code">代码行数</li>
|
||||
<li class="fl fontGrey2 contribute-list-problem">引入质量问题数</li>
|
||||
<li class="fl fontGrey2 contribute-list-rate">引入质量问题数/代码行数</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<ul class="contribute-list">
|
||||
<li class="fl fontGrey2 contribute-list-avatar contribute-list-height">
|
||||
<div class="mt8"><img src="images/homepageImage.jpg" width="50" class="image-cir" />
|
||||
<p class="fontGrey2 hidden">小明</p>
|
||||
</div>
|
||||
</li>
|
||||
<li class="fl fontGrey2 contribute-list-code contribute-list-height contribute-list-line-height">18340</li>
|
||||
<li class="fl fontGrey2 contribute-list-problem contribute-list-height contribute-list-line-height">230</li>
|
||||
<li class="fl contribute-list-rate fontBlue2 contribute-list-height contribute-list-line-height">.012540</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<ul class="contribute-list">
|
||||
<li class="fl fontGrey2 contribute-list-avatar contribute-list-height">
|
||||
<div class="mt8"><img src="images/homepageImage.jpg" width="50" class="image-cir" />
|
||||
<p class="fontGrey2 hidden">小王</p>
|
||||
</div>
|
||||
</li>
|
||||
<li class="fl fontGrey2 contribute-list-code contribute-list-height contribute-list-line-height">834</li>
|
||||
<li class="fl fontGrey2 contribute-list-problem contribute-list-height contribute-list-line-height">34</li>
|
||||
<li class="fl contribute-list-rate fontBlue2 contribute-list-height contribute-list-line-height">.04077</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<ul class="contribute-list">
|
||||
<li class="fl fontGrey2 contribute-list-avatar contribute-list-height">
|
||||
<div class="mt8"><img src="images/homepageImage.jpg" width="50" class="image-cir" />
|
||||
<p class="fontGrey2 hidden">小亮</p>
|
||||
</div>
|
||||
</li>
|
||||
<li class="fl fontGrey2 contribute-list-code contribute-list-height contribute-list-line-height">134</li>
|
||||
<li class="fl fontGrey2 contribute-list-problem contribute-list-height contribute-list-line-height">10</li>
|
||||
<li class="fl contribute-list-rate fontBlue2 contribute-list-height contribute-list-line-height">.07462</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
|
@ -5,6 +5,6 @@
|
|||
</p>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= @cc %>
|
||||
<%= render "show" %>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -1,7 +1,25 @@
|
|||
<%= form_tag( url_for(:controller => 'quality_analysis', :action => 'create', :project_id => @project.id, :user_id => User.current.id, :identifier => @repository.identifier), :remote => true , :class => 'resourcesSearchloadBox mt10', :id => 'quality_analyses_form') do %>
|
||||
<textarea id="path_description" name="path" rows="8" placeholder="目录相当于根目录,用半逗号隔开。如:src/main/java,libs"></textarea>
|
||||
<%= select_tag :branch, options_for_select(["#{@gitlab_default_branch}"]+ @branch_names, @rev), :id => 'branch' %>
|
||||
<%= select_tag :language, options_for_select(["Java","C","PHP", "Web"]), :id => 'branch' %>
|
||||
<div class="courseSendSubmit mr15"><a href="javascript:void(0);" class="sendSourceText" onclick="$('#quality_analyses_form').submit();hideModal()">确定</a></div>
|
||||
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText" onclick="hideModal()">取消</a></div>
|
||||
<% end %>
|
||||
<div class="popupWrap w800"> <a href="javascript:void(0);" class="popupClose"></a>
|
||||
<div class="f16 fb fontBlue mb10">代码质量分析</div>
|
||||
<div>
|
||||
<%= form_tag( url_for(:controller => 'quality_analysis', :action => 'create', :project_id => @project.id, :user_id => User.current.id, :identifier => @repository.identifier), :remote => true, :id => 'quality_analyses_form') do %>
|
||||
<div class="ui form">
|
||||
<div class="mb10" style="margin-right:13px;">
|
||||
<textarea id="path_description" name="path" rows="8" placeholder="目录相对于根目录,用半角逗号隔开。如:src/main/java,libs,res/script" style="height: 87px; resize:vertical;" class="analysis-option-box"></textarea>
|
||||
</div>
|
||||
<div class="mb10">
|
||||
<div>
|
||||
<%= select_tag :branch, options_for_select(["#{@gitlab_default_branch}"]+ @branch_names, @rev), :id => 'branch', :class => "analysis-option-box" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb10">
|
||||
<div>
|
||||
<%= select_tag :language, options_for_select(["Java","C","PHP", "Web"]), :id => 'branch', :class => "analysis-option-box" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="courseSendSubmit mr15"><a href="javascript:void(0);" class="sendSourceText" onclick="$('#quality_analyses_form').submit();hideModal()">提交</a></div>
|
||||
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText" onclick="hideModal()">取消</a></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
|
@ -1246,3 +1246,25 @@ a.pages-big{ width:50px;}
|
|||
|
||||
.red-cir-btn{ background:#e74c3c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.green-cir-btn{ background:#28be6c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
|
||||
/*20160622质量分析*/
|
||||
.analysis-tag-wrap {width:100%; color:#000; height:20px; line-height:20px; vertical-align:middle;}
|
||||
.analysis-tag {width:10px; height:20px; background-color:#777;}
|
||||
.analysis-block {padding:15px; border:1px solid #d9d9d9;}
|
||||
.flex {display:flex;}
|
||||
.analysis-genral {flex:1; display:block; text-align:center;}
|
||||
.analysis-block-icon {background:url(../images/code-analysis-icon.png) -2px -8px no-repeat; width:14px; height:14px; display:inline-block; vertical-align:middle;}
|
||||
.analysis-serious-icon {background:url(../images/code-analysis-icon.png) -2px -34px no-repeat; width:14px; height:14px; display:inline-block; vertical-align:middle;}
|
||||
.analysis-main-icon {background:url(../images/code-analysis-icon.png) -2px -59px no-repeat; width:14px; height:14px; display:inline-block; vertical-align:middle;}
|
||||
.analysis-secondary-icon {background:url(../images/code-analysis-icon.png) -2px -85px no-repeat; width:14px; height:14px; display:inline-block; vertical-align:middle;}
|
||||
.analysis-info-icon {background:url(../images/code-analysis-icon.png) -2px -111px no-repeat; width:14px; height:14px; display:inline-block; vertical-align:middle;}
|
||||
.quality-percentage {width:320px; height:14px; display:inline-block;}
|
||||
.quality-percentage-rate {width:50%; height:14px; background-color:#0a6c99; display:inline-block;}
|
||||
.image-cir {border-radius:50%;}
|
||||
.analysis-genral-icon {position:absolute; padding:1px 5px; display:inline-block; top:5px;}
|
||||
.contribute-list-avatar {width:80px; vertical-align:middle; text-align:center;}
|
||||
.contribute-list-code {width:160px; vertical-align:middle; text-align:center;}
|
||||
.contribute-list-problem {width:170px; vertical-align:middle; text-align:center;}
|
||||
.contribute-list-rate {width:228px; vertical-align:middle; text-align:center;}
|
||||
.contribute-list-height {height:80px;}
|
||||
.contribute-list-line-height {line-height:80px;}
|
|
@ -1161,3 +1161,6 @@ a.st_down{ display: block; width:8px; float:left; height:13px; background:url(..
|
|||
.shadowbox_news_list li:hover{ background-color:#eee;}
|
||||
span.shadowbox_news_user{ color:#3b94d6;}
|
||||
a.shadowbox_news_all{ display:block; width:305px; height:40px; line-height:40px; color:#3b94d6; text-align:center;border-top:1px solid #eee;}
|
||||
|
||||
/*20160622代码分析弹窗*/
|
||||
.analysis-option-box {width:100%; border:1px solid #ccc; padding:3px 5px;}
|
||||
|
|
Loading…
Reference in New Issue