stoped the zhizhen
This commit is contained in:
parent
de80403e8d
commit
128f6721be
|
@ -61,10 +61,10 @@ class QualityAnalysisController < ApplicationController
|
|||
@results = JSON.parse(projects_date)
|
||||
else
|
||||
@name_flag = false
|
||||
resource_id = params[:resource_id]
|
||||
complexity_date = open(@sonar_address + "/api/resources/index?resource=#{resource_id}&depth=0&metrics=sqale_rating,function_complexity,duplicated_lines_density,comment_lines_density,sqale_index,lines,file_line,files,functions,classes,directories").read
|
||||
@resource_id = params[:resource_id]
|
||||
complexity_date = open(@sonar_address + "/api/resources/index?resource=#{@resource_id}&depth=0&metrics=sqale_rating,function_complexity,duplicated_lines_density,comment_lines_density,sqale_index,lines,file_line,files,functions,classes,directories").read
|
||||
@complexity =JSON.parse(complexity_date).first
|
||||
issue_date = open(@sonar_address + "/api/resources/index?resource=#{resource_id}&depth=0&metrics=blocker_violations,critical_violations,major_violations,minor_violations,info_violations,violations").read
|
||||
issue_date = open(@sonar_address + "/api/resources/index?resource=#{@resource_id}&depth=0&metrics=blocker_violations,critical_violations,major_violations,minor_violations,info_violations,violations").read
|
||||
@sonar_issues = JSON.parse(issue_date).first
|
||||
end
|
||||
end
|
||||
|
|
|
@ -103,21 +103,21 @@
|
|||
},
|
||||
// Add some life
|
||||
function (chart) {
|
||||
if (!chart.renderer.forExport) {
|
||||
setInterval(function () {
|
||||
var point = chart.series[0].points[0],
|
||||
newVal,
|
||||
inc = Math.round((Math.random() - 0.5) * 20);
|
||||
|
||||
newVal = point.y + inc;
|
||||
if (newVal < 0 || newVal > 200) {
|
||||
newVal = point.y - inc;
|
||||
}
|
||||
|
||||
point.update(newVal);
|
||||
|
||||
}, 3000);
|
||||
}
|
||||
// if (!chart.renderer.forExport) {
|
||||
// setInterval(function () {
|
||||
// var point = chart.series[0].points[0],
|
||||
// newVal,
|
||||
// inc = Math.round((Math.random() - 0.5) * 20);
|
||||
//
|
||||
// newVal = point.y + inc;
|
||||
// if (newVal < 0 || newVal > 200) {
|
||||
// newVal = point.y - inc;
|
||||
// }
|
||||
//
|
||||
// point.update(newVal);
|
||||
//
|
||||
// }, 3000);
|
||||
// }
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -218,21 +218,21 @@
|
|||
},
|
||||
// Add some life
|
||||
function (chart) {
|
||||
if (!chart.renderer.forExport) {
|
||||
setInterval(function () {
|
||||
var point = chart.series[0].points[0],
|
||||
newVal,
|
||||
inc = Math.round((Math.random() - 0.5) * 20);
|
||||
|
||||
newVal = point.y + inc;
|
||||
if (newVal < 0 || newVal > 200) {
|
||||
newVal = point.y - inc;
|
||||
}
|
||||
|
||||
point.update(newVal);
|
||||
|
||||
}, 3000);
|
||||
}
|
||||
// if (!chart.renderer.forExport) {
|
||||
// setInterval(function () {
|
||||
// var point = chart.series[0].points[0],
|
||||
//// newVal,
|
||||
//// inc = Math.round((Math.random() - 0.5) * 20);
|
||||
//
|
||||
//// newVal = point.y + inc;
|
||||
//// if (newVal < 0 || newVal > 200) {
|
||||
//// newVal = point.y - inc;
|
||||
//// }
|
||||
//
|
||||
//// point.update(newVal);
|
||||
//
|
||||
// }, 3000);
|
||||
// }
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -338,21 +338,21 @@
|
|||
},
|
||||
// Add some life
|
||||
function (chart) {
|
||||
if (!chart.renderer.forExport) {
|
||||
setInterval(function () {
|
||||
var point = chart.series[0].points[0],
|
||||
newVal,
|
||||
inc = Math.round((Math.random() - 0.5) * 20);
|
||||
|
||||
newVal = point.y + inc;
|
||||
if (newVal < 0 || newVal > 200) {
|
||||
newVal = point.y - inc;
|
||||
}
|
||||
|
||||
point.update(newVal);
|
||||
|
||||
}, 3000);
|
||||
}
|
||||
// if (!chart.renderer.forExport) {
|
||||
// setInterval(function () {
|
||||
// var point = chart.series[0].points[0],
|
||||
// newVal,
|
||||
// inc = Math.round((Math.random() - 0.5) * 20);
|
||||
//
|
||||
// newVal = point.y + inc;
|
||||
// if (newVal < 0 || newVal > 200) {
|
||||
// newVal = point.y - inc;
|
||||
// }
|
||||
//
|
||||
// point.update(newVal);
|
||||
//
|
||||
// }, 3000);
|
||||
// }
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -463,21 +463,21 @@
|
|||
},
|
||||
// Add some life
|
||||
function (chart) {
|
||||
if (!chart.renderer.forExport) {
|
||||
setInterval(function () {
|
||||
var point = chart.series[0].points[0],
|
||||
newVal,
|
||||
inc = Math.round((Math.random() - 0.5) * 20);
|
||||
|
||||
newVal = point.y + inc;
|
||||
if (newVal < 0 || newVal > 200) {
|
||||
newVal = point.y - inc;
|
||||
}
|
||||
|
||||
point.update(newVal);
|
||||
|
||||
}, 3000);
|
||||
}
|
||||
// if (!chart.renderer.forExport) {
|
||||
// setInterval(function () {
|
||||
// var point = chart.series[0].points[0],
|
||||
// newVal,
|
||||
// inc = Math.round((Math.random() - 0.5) * 20);
|
||||
//
|
||||
// newVal = point.y + inc;
|
||||
// if (newVal < 0 || newVal > 200) {
|
||||
// newVal = point.y - inc;
|
||||
// }
|
||||
//
|
||||
// point.update(newVal);
|
||||
//
|
||||
// }, 3000);
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -1,7 +1,7 @@
|
|||
<%= javascript_include_tag 'highcharts','highcharts-more' %>
|
||||
<%= render :partial => "hightchars" %>
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2" style="width:180px;">SonarQube质量分析</h2>
|
||||
<h2 class="project_h2" style="width:180px;">质量分析</h2>
|
||||
</div>
|
||||
<!--<a href="javascript:void(0);" class="blue_btn_cir fl mt5 c_white" style="background-color:#64bdd9;">branch:master</a>-->
|
||||
<div class="cl"></div>
|
||||
|
@ -35,8 +35,9 @@
|
|||
</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;"><%= score_sqale_rating(@complexity["msr"][9]["val"]) %></span>/5分</span><span class="fontGrey2">可定性评价为:<span class="c_red">质量<%= sqale_rating_status(@complexity["msr"][9]["val"])[0] %></span></span></div>
|
||||
<div class="analysis-block mt10 mb40 f14">
|
||||
<div><span class="fontGrey3 mr30">技术债务</span><span class="fontBlue2 w70 pInline"><%= @complexity["msr"][8]["frmt_val"] %></span><span class="fontGrey2">查看详情</span></div>
|
||||
<div><span class="fontGrey3 mr30">质量问题</span><span class="fontBlue2 w70 pInline"><%= @sonar_issues["msr"][0]["frmt_val"] %></span><span class="fontGrey2">问题分类如下:</span></div>
|
||||
<div><span class="fontGrey3 mr30">技术债务</span><span class="fontBlue2 w70 pInline"><%= @complexity["msr"][8]["frmt_val"] %></span><span class="fontGrey2"><a target="_blank" href="<%= @sonar_address %>/drilldown/measures/<%= @resource_id %>?metric=sqale_index">查看详情</a></span></div>
|
||||
<div><span class="fontGrey3 mr30">质量问题</span>
|
||||
<span class="fontBlue2 w70 pInline"><a class="fontBlue2 w70 pInline" target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false"><%= @sonar_issues["msr"][0]["frmt_val"] %></a></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"><%= @sonar_issues["msr"][1]["frmt_val"] %></span><span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= statistics_result_percentage(@sonar_issues["msr"][1]["frmt_val"].to_i, 200) %>%;"></span></span></div>
|
||||
<div class="mb10"><span class="analysis-serious-icon mr5"></span><span class="fontGrey3 mr45">严重</span><span class="fontBlue2 w70 pInline"><%= @sonar_issues["msr"][2]["frmt_val"] %></span><span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= statistics_result_percentage(@sonar_issues["msr"][2]["frmt_val"].to_i, 200) %>%;"></span></span></div>
|
||||
|
@ -68,46 +69,46 @@
|
|||
<p class="fontBlue2"><%= @complexity["msr"][4]["frmt_val"] %></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 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>-->
|
||||
|
|
Loading…
Reference in New Issue