bigdir/app/views/open_source_projects/_show_topics.html.erb

475 lines
22 KiB
Plaintext
Raw Normal View History

2014-04-03 14:41:04 +08:00
<!-- added by fq -->
<!--modified by yiang -->
2014-04-03 14:41:04 +08:00
<!--display the board-->
<%= javascript_include_tag "ichart.1.2.min" %>
<%= stylesheet_link_tag "sec-analysis.css" %>
<%= stylesheet_link_tag "buglist-ichart.css" %>
<%= stylesheet_link_tag "buglist.css" %>
<div class="mask">
<div class="header2"></div>
<div class="colleft">
<div class="col1" style="margin-right:0px">
<h1></h1>
<div id='canvasDiv' style="margin-left:35px"></div>
</div>
<div class="col2" style="margin-left:0px">
2014-05-27 09:01:36 +08:00
<div style="margin-left:0px" > <span> <h1 style="fontsize:19px;color:orange;font-weight:900">项目安全态势 </h1></span><span style="margin-top: -30px; margin-right:70px;float: right; display: block;"><%= link_to "更多 >>", :controller => "open_source_projects",:action => "showbug", :id => @open_source_project.id %></span></div>
<% if @open_source_project.id ==42 then %>
<div>
<span>
<img src="/images/version_marker.png" alt="Tags">
</span>
<span class="tag_fouse">聚焦:</span>
<div id="tag">栈溢出</div>
<div id="tag">远程权限</div>
<div id="tag">框架安全</div>
</div>
<% elsif @open_source_project.id ==70 then %>
<div>
<span>
<img src="/images/version_marker.png" alt="Tags">
</span>
<span class="tag_fouse">聚焦:</span>
<div id="tag">Kernel安全</div>
<div id="tag">函数漏洞</div>
<div id="tag">ping_init_sock()</div>
</div>
<% elsif @open_source_project.id ==17 then %>
<div>
<span>
<img src="/images/version_marker.png" alt="Tags">
</span>
<span class="tag_fouse">聚焦:</span>
2014-05-30 08:29:50 +08:00
<div id="tag">Heartbleed</div>
<div id="tag">致命漏洞</div>
</div>
<% elsif @open_source_project.id ==55 then %>
<div>
<span>
<img src="/images/version_marker.png" alt="Tags">
</span>
<span class="tag_fouse">聚焦:</span>
<div id="tag">DDos攻击</div>
<div id="tag">信息泄露</div>
</div>
2014-05-30 08:29:50 +08:00
<%end%>
<div class="fixed"></div>
<div class="li_list" style="margin-top:10px;margin-left:10px">
<ul style="list-style-type: square;">
2014-05-22 17:04:45 +08:00
<% @bugs.each do |bug| %>
<li><span class="li_time">>[<%= show_description(bug, open_source_project) %>]</span><%= link_to bug.subject, bug.url, :target => '_blank' %></li>
2014-05-22 17:04:45 +08:00
<% end %>
</ul>
</div>
</div>
</div>
</div>
<div style="clear:both; margin:0 0 10 0"></div>
<script type="text/javascript">
$(function(){
var flow=[];
for(var i=0;i<24+5;i++){
flow.push(Math.floor(Math.random()*(30+((i%12)*5)))+10);
// t.push(Math.floor(Math.random()*(30+((i%12)*5)))+10);
}
var data = [
{
name :'',
value:flow,
color:'#0d8ecf',
line_width:2
}
];
//创建x轴标签文本
var date = new Date()
var labels = [];
/* labels.push(date.getFullYear()-2);
labels.push(date.getFullYear()-1);
labels.push(date.getFullYear());*/
labels=["2012","","","","","","","","","","","","2013","","","","","","","","","","","","2014","","","",""];
var line = new iChart.LineBasic2D({
render : 'canvasDiv',
data: data,
align:'center',
// title : '安全态势分析 ',
title : {
text:'安全态势分析',
color:'#698389',
fontsize : 14,
textAlign:'left',
padding:'0 40',
font:'微软雅黑',
border:{
enable:true,
width:[0,0,2,0],
color:'#698389'
},
height:30
},
subtitle : '',
footnote : '',
width : 300, // 面板大小
height : 200,
shadow:true,
//shadow_color : '#20262f',
shadow_blur : 1,
shadow_offsetx : 0,
shadow_offsety : 2,
//background_color:null //'#383e46'设置透明背景
tip:{
enable:true,
shadow:true,
move_duration:400,
border:{
enable:true,
radius : 5,
width:2,
color:'#3f8695'
},
listeners:{
//tip:提示框对象、name:数据名称、value:数据值、text:当前文本、i:数据点的索引
parseText:function(tip,name,value,text,i){
return name+"漏洞数:"+value;
}
}
},
tipMocker:function(tips,i){
var index;
if (Math.floor(i/12)==0) {
index=0;
}else if (Math.floor(i/12)==1) {
index=12;
}else{
index=24;
};
return "<div style='font-weight:400'>"+
labels[index]+" "+//日期
((i%12)==0?"1 月":((i%12+1))+"月")+ //时间
"</div>"+tips.join("<br/>");
},
crosshair:{
enable:true, //十字交叉线
line_color:'#62bce9'
},
sub_option : {
label:false, //是否显示数值
// hollow_inside:false,
smooth : true,//平滑曲线
point_size:2, // 焦点大小
// point_hollow : true,
border : {
width : 2,
radius : '5 5 0 0',//上圆角设置
color : '#ffffff'
}
},
coordinate:{
width:225, // 图表大小
//valid_width:330,
height:55,
axis:{
// color:'#9f9f9f',
color:'#dcdcdc',
width:[0,0,2,2]
},
grids:{
vertical:{
way:'share_alike',
value:1
// 改垂直线
}
},
scale:[{
position:'left',
start_scale:0,
scale_space:50,
end_scale:70,
scale_color:'#9f9f9f'
},{
position:'bottom',
labels:labels
}]
}
});
line.draw();
});
</script>
<!--我是分割线1===================================================================================================-->
<div class="mask" style="margin-top:30px">
<div class="header2"></div>
<div class="colleft">
<div class="col1" style="margin-right:0px">
<h1></h1>
<div id='canvasDiv2' style="margin-left:35px"></div>
</div>
<div class="col2" style="margin-left:0px">
2014-05-21 10:24:34 +08:00
<div style="margin-left:0px" > <span> <h1 style="fontsize:19px;color:#15bccf;font-weight:900">技术创新趋势 </h1></span><span style="margin-top: -30px; margin-right:70px;float: right; display: block;"><%= link_to "更多 >>", :controller => "open_source_projects",:action => "showmemo", :id => @open_source_project.id %>
</span></div>
<div class="fixed"></div>
<div class="li_list" style="margin-top:10px;margin-left:10px">
<ul style="list-style-type: square;">
<!-- <li><span class="li_time">>[DDoS漏洞]</span><a href="/vuldb/ssvid-62261" title="Cobbler 2.4.x - 2.6.x 本地文件包含">Cobbler 2.4.x - 2.6.x 本地文件包含</a></li> -->
<li><span class="li_time">>[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62260" title="Ruby OpenSSL CA私钥伪造漏洞">Ruby OpenSSL CA私钥伪造漏洞</a></li>
<li><span class="li_time">>[远程溢出漏洞]</span><a href="/vuldb/ssvid-62259" title="Adobe Flash Player 整数堆栈下溢远程命令执行">Adobe Flash Player 远程命令执行</a></li>
<!-- <li><span class="li_time">14-05-07</span><a href="/vuldb/ssvid-62258" title="PHPDISK phpdisk_del_process.php SQL注入漏洞">PHPDISK phpdisk_del_process.php SQL注入漏洞</a></li> -->
<!-- <li><span class="li_time">[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62257" title="BEESCMS 3.4 order_save.php SQL注入漏洞">BEESCMS 3.4 order_save.php SQL注入漏洞</a></li> -->
<li ><span class="li_time">>[SQL注入漏洞]</span><a href="/vuldb/ssvid-62256" title="Apache/NGINX 下 PHP-FPM 或者 PHP-CGI 拒绝服务漏洞">Apache/NGINX 下 PHP-FPM </a></li>
<li><span class="li_time">>[SQL注入漏洞]</span><a href="/vuldb/ssvid-62250" title="AlienVault OSSIM SQL注入以及远程代码执行">AlienVault OSSIM SQL注入</a></li>
<li><span class="li_time">>[DDoS漏洞]</span><a href="/vuldb/ssvid-62248" title="Eucalyptus Web Services拒绝服务漏洞">Eucalyptus Web Services</a></li>
<li ><span class="li_time">>[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62245" title="Watchguard Fireware XTM OpenSSL TLS心跳信息泄漏漏洞"> Fireware XTM OpenSSL TLS</a></li>
<li ><span class="li_time">>[OpenSSL漏洞]</span><a href="/vuldb/ssvid-62244" title="SAP Sybase SQL Anywhere OpenSSL TLS泄漏漏洞">Sybase SQL Anywhere OpenSSL TLS</a></li>
</ul>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function(){
var flow=[];
for(var i=0;i<24+5;i++){
flow.push(Math.floor(Math.random()*(30+((i%12)*5)))+10);
// t.push(Math.floor(Math.random()*(30+((i%12)*5)))+10);
}
var data = [
{
name : '',
value:flow,
color:'#0d8ecf',
line_width:2
}
];
//创建x轴标签文本
var date = new Date()
var labels = [];
labels=["2012","","","","","","","","","","","","2013","","","","","","","","","","","","2014","","","",""];
var line = new iChart.LineBasic2D({
render : 'canvasDiv2',
data: data,
align:'center',
// title : ' ',
title : {
text:'技术主题演化',
color:'#698389',
fontsize : 14,
textAlign:'left',
padding:'0 40',
font:'微软雅黑',
border:{
enable:true,
width:[0,0,2,0],
color:'#698389'
},
height:30
},
subtitle : '',
footnote : '',
width : 300, // 面板大小
height : 200,
shadow:true,
//shadow_color : '#20262f',
shadow_blur : 1,
shadow_offsetx : 0,
shadow_offsety : 2,
//background_color:null //'#383e46'设置透明背景
tip:{
enable:true,
shadow:true,
move_duration:400,
border:{
enable:true,
radius : 5,
width:2,
color:'#3f8695'
},
listeners:{
//tip:提示框对象、name:数据名称、value:数据值、text:当前文本、i:数据点的索引
parseText:function(tip,name,value,text,i){
return name+"帖子数:"+value+"万";
}
}
},
tipMocker:function(tips,i){
var index;
if (Math.floor(i/12)==0) {
index=0;
}else if (Math.floor(i/12)==1) {
index=12;
}else{
index=24;
};
return "<div style='font-weight:400'>"+
labels[index]+" "+//日期
((i%12)==0?"1 月":((i%12+1))+"月")+ //时间
"</div>"+tips.join("<br/>");
},
crosshair:{
enable:true, //十字交叉线
line_color:'#62bce9'
},
sub_option : {
label:false, //是否显示数值
// hollow_inside:false,
smooth : true,//平滑曲线
point_size:2 // 焦点大小
// point_hollow : true,
},
coordinate:{
width:225, // 图表大小
//valid_width:330,
height:55,
axis:{
// color:'#9f9f9f',
color:'#dcdcdc',
width:[0,0,2,2]
},
grids:{
vertical:{
way:'share_alike',
value:1
// 改垂直线
}
},
scale:[{
position:'left',
start_scale:0,
scale_space:50,
end_scale:70,
scale_color:'#9f9f9f'
// label : {color:'#ffffff',fontsize:11},
},{
position:'bottom',
labels:labels
}]
}
});
//开始画图
line.draw();
});
//]]>
</script>
<!--我是分割线2===================================================================================================-->
<div class="borad-topic-count" style="margin-top:10px">
2014-05-22 17:04:45 +08:00
<!-- 共有 <%#= link_to memos.count %> 个贴子 -->
2014-05-21 10:24:34 +08:00
<span><h1 style="color:#7591cc;font-weight:900">全球热帖</h1></span>
<span style="margin-top: -30px; margin-right:70px;float: right; display: block;"><%= link_to "更多>>", :controller => "open_source_projects",:action => "showmemo", :id => @open_source_project.id %></span>
2014-04-03 14:41:04 +08:00
</div>
<div style="padding-top: 10px">
<% if memos.any? %>
<% memos.each do |topic| %>
<table class="content-text-list">
<tr>
2014-04-08 09:02:12 +08:00
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) if topic.author%>
<%= image_tag('../images/avatars/User/0', :class => "avatar") unless topic.author%> </td>
2014-04-03 14:41:04 +08:00
<td>
<table width="630px" border="0">
<tr>
<td valign="top" width="500px" class="<%= topic.sticky ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject), topic.url, :target => '_blank' %></td>
2014-04-03 14:41:04 +08:00
<td align="right" rowspan="3">
<table class="borad-count">
<tr>
<td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), topic.url, :target => '_blank' %></td>
2014-04-03 14:41:04 +08:00
</tr>
<tr>
<td align="center">回帖</td>
2014-04-03 14:41:04 +08:00
</tr>
</table></td>
<td align="right" rowspan="3">
<table class="borad-count">
<tr>
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), topic.url, :target => '_blank' %></td>
</tr>
<tr>
<td align="center">关注</td>
</tr>
</table></td>
2014-04-08 20:42:11 +08:00
<td align="right" rowspan="3">
<table class="borad-count">
<tr>
<td align="center" class="borad-count-digit"><%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), topic.url, :target => '_blank' %></td>
2014-04-08 20:42:11 +08:00
</tr>
<tr>
<td align="center">浏览</td>
</tr>
</table></td>
2014-04-03 14:41:04 +08:00
</tr>
<tr>
2014-05-27 16:25:43 +08:00
<td><span class="font_description"> </span></td>
2014-04-03 14:41:04 +08:00
</tr>
<tr>
2014-05-27 16:25:43 +08:00
<td align="left"><span class="font_lighter"><%=user_url_and_time topic.username, topic.userhomeurl, topic.created_at %>
2014-04-03 14:41:04 +08:00
<br />
</span></td>
</tr>
2014-04-03 14:41:04 +08:00
<tr>
2014-05-27 16:25:43 +08:00
<td align="left">帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to 'OSChina', topic.url %>
</span></td>
2014-04-03 14:41:04 +08:00
</tr>
</table></td>
</tr>
2014-04-03 14:41:04 +08:00
</table>
<% end %>
<div class="pagination">
2014-04-28 11:04:10 +08:00
<%= pagination_links_full @topic_pages, @topic_count %>
2014-04-03 14:41:04 +08:00
</div>
<% else %>
<p class="nodata">
<%= l(:label_no_data) %>
</p>
<% end %>
</div>