Merge branch 'guange_dev' into szzh
This commit is contained in:
commit
1e8ef39369
4
Gemfile
4
Gemfile
|
@ -6,6 +6,10 @@ unless RUBY_PLATFORM =~ /w32/
|
|||
gem 'iconv'
|
||||
end
|
||||
|
||||
source 'http://rubygems.oneapm.com' do
|
||||
gem 'oneapm_rpm'
|
||||
end
|
||||
|
||||
gem "mysql2", "= 0.3.18"
|
||||
gem 'redis-rails'
|
||||
gem 'rubyzip'
|
||||
|
|
|
@ -336,6 +336,7 @@ class AccountController < ApplicationController
|
|||
:expires => 1.month.from_now,
|
||||
:path => (Redmine::Configuration['autologin_cookie_path'] || '/'),
|
||||
:secure => (Redmine::Configuration['autologin_cookie_secure'] ? true : false),
|
||||
:domain => '.trustie.net',
|
||||
:httponly => true
|
||||
}
|
||||
cookies[autologin_cookie_name] = cookie_options
|
||||
|
|
|
@ -130,7 +130,7 @@ class IssuesController < ApplicationController
|
|||
@project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base'#by young
|
||||
@available_watchers = (@issue.project.users.sort + @issue.watcher_users).uniq
|
||||
|
||||
respond_to do |format|
|
||||
respond_to do |format|``
|
||||
format.html {
|
||||
retrieve_previous_and_next_issue_ids
|
||||
render :template => 'issues/show', :layout => @project_base_tag#by young
|
||||
|
|
|
@ -51,8 +51,8 @@
|
|||
<% if @issue.safe_attribute? 'description' %>
|
||||
<label class="label"> 描述 : </label>
|
||||
<%= f.label_for_field :description, :required => @issue.required_attribute?('description'), :no_label => true, :class => "label" %>
|
||||
<%= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %>
|
||||
<%= content_tag 'span', :id => "issue_description_and_toolbar" do %>
|
||||
<%#= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %>
|
||||
<%#= content_tag 'span', :id => "issue_description_and_toolbar" do %>
|
||||
<%= f.kindeditor :description,:editor_id => "issue_desc_editor",
|
||||
# :rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min),
|
||||
# :accesskey => accesskey(:edit),
|
||||
|
@ -60,7 +60,7 @@
|
|||
:width=>'87%',
|
||||
:resizeType => 0,
|
||||
:no_label => true %>
|
||||
<% end %>
|
||||
<%# end %>
|
||||
<%#= wikitoolbar_for 'issue_description' %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
|
|
@ -124,18 +124,12 @@
|
|||
<%= render :partial => 'changesets', :locals => {:changesets => @changesets} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<!--留言-- end>
|
||||
<!--<div style="clear: both;"></div>-->
|
||||
<!--<%#= render :partial => 'action_menu' %>-->
|
||||
|
||||
|
||||
<div class="cl"></div>
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
||||
<%= f.link_to 'PDF' %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'issues/sidebar' %>
|
||||
<br>
|
||||
|
|
|
@ -18,54 +18,7 @@
|
|||
<!-- page specific tags -->
|
||||
<%= yield :header_tags -%>
|
||||
|
||||
<!--项目的三种类型-->
|
||||
<script type="text/javascript">
|
||||
function click_ok(url)
|
||||
{
|
||||
$('#light').css('display','none');
|
||||
$('#fade').css('display','none');
|
||||
//ajax处理请求
|
||||
var project_type;
|
||||
if($("#development_group").attr("checked") == "checked"){
|
||||
project_type = 1;
|
||||
}
|
||||
else if($("#research_group").attr("checked") == "checked"){
|
||||
project_type = 2;
|
||||
|
||||
}
|
||||
else if($("#friend_organization").attr("checked") == "checked"){
|
||||
project_type = 3;
|
||||
}
|
||||
$.get(
|
||||
url,
|
||||
{ project_type: project_type},
|
||||
function (data) {
|
||||
if(data == 1)
|
||||
{
|
||||
$("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_development_team), 1))%>");
|
||||
$("#project_memu_list").html('<%= escape_javascript(render(:partial => 'projects/development_group')) %>');
|
||||
$("#close_light").attr("onClick","close_window('development_group');");
|
||||
}
|
||||
else if(data == 2)
|
||||
{
|
||||
$("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_research_group), 2))%>");
|
||||
$("#project_memu_list").html('<%= escape_javascript(render(:partial => 'projects/research_team')) %>');
|
||||
$("#close_light").attr("onClick","close_window('research_group');");
|
||||
}
|
||||
else if(data == 3)
|
||||
{
|
||||
$("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_friend_organization), 3))%>");
|
||||
$("#project_memu_list").html('<%= escape_javascript(render(:partial => 'projects/friend_group')) %>');
|
||||
$("#close_light").attr("onClick","close_window('friend_organization');");
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("服务器异常,请与管理员联系");
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<!--add by huang-->
|
||||
<body>
|
||||
|
@ -83,13 +36,7 @@
|
|||
</h2>
|
||||
<p class="hidden">
|
||||
<%= l(:label_user_location) %> :
|
||||
<%= link_to l(:field_homepage), home_path %>
|
||||
>
|
||||
<a href="http://<%= Setting.host_name %>">
|
||||
<%=l(:label_project_hosting_platform) %>
|
||||
</a>
|
||||
>
|
||||
<%= link_to @project.name, project_path(@project.id) %>
|
||||
<%= link_to l(:field_homepage), home_path %> > <a href="http://<%= Setting.host_name %>"><%=l(:label_project_hosting_platform) %> </a>><%= link_to @project.name, project_path(@project.id) %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="search fl">
|
||||
|
@ -144,10 +91,11 @@
|
|||
<%= l(:label_member) %>(<%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'info_foot_num c_blue' %>)
|
||||
<span>| </span>
|
||||
<%= l(:label_user_watcher) %>(<%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :class => 'info_foot_num c_blue' %>)
|
||||
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
|
||||
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
||||
<span>| </span>
|
||||
<%= l(:project_module_attachments) %>(
|
||||
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
|
||||
<% attaments_num %>
|
||||
<%= link_to "#{attaments_num}", project_files_path(@project), :class => 'info_foot_num c_blue' %></span>)
|
||||
<% end %>
|
||||
</div>
|
||||
|
@ -166,14 +114,14 @@
|
|||
</ul>
|
||||
<% end %><!--end-->
|
||||
<!--menu 左侧工具栏 -->
|
||||
<!--project_new_type: 1为开发组;2为科研组;3为朋友圈子-->
|
||||
<%#--project_new_type: 1为开发组;2为科研组;3为朋友圈子--%>
|
||||
<div id="project_memu_list">
|
||||
<% if @project.project_new_type == 1 || @project.project_new_type.nil? %>
|
||||
<%= render :partial => 'projects/development_group', :locals => {:project => @project}%>
|
||||
<%= render :partial => 'projects/development_group', :locals => {:project => @project, :attaments_num => attaments_num} %>
|
||||
<% elsif @project.project_new_type == 2 %>
|
||||
<%= render :partial => 'projects/research_team', :locals => {:project => @project}%>
|
||||
<%= render :partial => 'projects/research_team', :locals => {:project => @project, :attaments_num => attaments_num} %>
|
||||
<% else %>
|
||||
<%= render :partial => 'projects/friend_group', :locals => {:project => @project}%>
|
||||
<%= render :partial => 'projects/friend_group', :locals => {:project => @project, :attaments_num => attaments_num} %>
|
||||
<% end %>
|
||||
</div>
|
||||
<!-- end -->
|
||||
|
@ -232,8 +180,55 @@
|
|||
<li><input type="radio" name="project_type" <%= @project.project_new_type == 3 ? 'checked' : ''%> id="friend_organization"/><label class="f14"> 圈子模式:<span class="f12 ml5 c_grey">为朋友圈提供简洁的交流和分享工具。</span></label></li>
|
||||
</ul>
|
||||
<a href="javascript:void(0)" class="orange_btn" onclick="click_ok('<%= change_project_type_project_path @project%>');" >确定</a>
|
||||
|
||||
</div>
|
||||
<!--项目的三种类型-->
|
||||
<script type="text/javascript">
|
||||
function click_ok(url)
|
||||
{
|
||||
$('#light').css('display','none');
|
||||
$('#fade').css('display','none');
|
||||
//ajax处理请求
|
||||
var project_type;
|
||||
if($("#development_group").attr("checked") == "checked"){
|
||||
project_type = 1;
|
||||
}
|
||||
else if($("#research_group").attr("checked") == "checked"){
|
||||
project_type = 2;
|
||||
|
||||
}
|
||||
else if($("#friend_organization").attr("checked") == "checked"){
|
||||
project_type = 3;
|
||||
}
|
||||
$.get(
|
||||
url,
|
||||
{ project_type: project_type},
|
||||
function (data) {
|
||||
if(data == 1)
|
||||
{
|
||||
$("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_development_team), 1))%>");
|
||||
$("#project_memu_list").html('<%= escape_javascript(render(:partial => 'projects/development_group', :locals => {:project => @project, :attaments_num => attaments_num})) %>');
|
||||
$("#close_light").attr("onClick","close_window('development_group');");
|
||||
}
|
||||
else if(data == 2)
|
||||
{
|
||||
$("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_research_group), 2))%>");
|
||||
$("#project_memu_list").html('<%= escape_javascript(render(:partial => 'projects/research_team', :locals => {:project => @project, :attaments_num => attaments_num})) %>');
|
||||
$("#close_light").attr("onClick","close_window('research_group');");
|
||||
}
|
||||
else if(data == 3)
|
||||
{
|
||||
$("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_friend_organization), 3))%>");
|
||||
$("#project_memu_list").html('<%= escape_javascript(render(:partial => 'projects/friend_group', :locals => {:project => @project, :attaments_num => attaments_num})) %>');
|
||||
$("#close_light").attr("onClick","close_window('friend_organization');");
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("服务器异常,请与管理员联系");
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<div id="fade" class="black_overlay">123</div>
|
||||
<%= render :partial => 'layouts/new_feedback' %>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
|
||||
|
@ -8,9 +7,10 @@
|
|||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_issue_tracking), project_issues_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.issues.visible.all.count == 0 %>
|
||||
<a class="subnav_num">(<%= @project.issues.visible.all.count %>)</a>
|
||||
<% if (issue_count = @project.issues.count) > 0 %>
|
||||
<a class="subnav_num">(<%= issue_count %>)</a>
|
||||
<% end %>
|
||||
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_release_issue), new_project_issue_path(@project) , :class => "subnav_green" %>
|
||||
<% end %>
|
||||
|
@ -49,4 +49,4 @@
|
|||
<div class="subNav subNav_jiantou" id="expand_tools_expand" nhtype="toggle4cookie" data-id="expand_tool_more" data-target="#navContent" data-val="retract"><%= l(:label_project_more) %></div>
|
||||
<ul class="navContent" id="navContent">
|
||||
<%= render 'projects/tools_expand' %>
|
||||
</ul>
|
||||
</ul>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
|
||||
|
@ -8,8 +7,8 @@
|
|||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_issue_tracking), project_issues_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.issues.count == 0 %>
|
||||
<a class="subnav_num">(<%= @project.issues.visible.all.count %>)</a>
|
||||
<% if (issue_count = @project.issues.count) > 0 %>
|
||||
<a class="subnav_num">(<%= issue_count %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_release_issue), new_project_issue_path(@project) , :class => "subnav_green" %>
|
||||
|
@ -37,4 +36,4 @@
|
|||
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
||||
<% end%>
|
||||
|
|
|
@ -0,0 +1,135 @@
|
|||
#
|
||||
# OneApm RubyAgent Configuration
|
||||
#
|
||||
|
||||
# Here are the settings that are common to all environments
|
||||
common: &default_settings
|
||||
# ============================== LICENSE KEY ===============================
|
||||
|
||||
#
|
||||
# Get your license key from oneapm.com
|
||||
#
|
||||
license_key: 'BAQMBw8FUwR2542UFFpDXFgVVk66e2dZWB4EBlQHSf846wgBGwICFQoD0498BAEfBgNIAlQ='
|
||||
|
||||
# Agent Enabled (Ruby/Rails Only)
|
||||
# Valid values are true, false and auto.
|
||||
#
|
||||
# agent_enabled: auto
|
||||
|
||||
# This app_name will be the application name in oneapm.com in your account.
|
||||
#
|
||||
# Caution: If you change this name, a new application will appear in the OneApm
|
||||
# user interface with the new name, and data will stop reporting to the
|
||||
# app with the old name.
|
||||
#
|
||||
app_name: trusite
|
||||
|
||||
# When "true", the agent collects performance data about your
|
||||
# application and reports this data to the OneApm service at
|
||||
# oneapm.com. This global switch is normally overridden for each
|
||||
# environment below. (formerly called 'enabled')
|
||||
monitor_mode: true
|
||||
|
||||
# Specify its log level here.
|
||||
log_level: info
|
||||
|
||||
# log_file_path: 'log'
|
||||
# log_file_name: 'oneapm_agent.log'
|
||||
|
||||
# The oneapm agent communicates with the service via https by default.
|
||||
# ssl: true
|
||||
|
||||
# ======================== Browser Monitoring =============================
|
||||
browser_monitoring:
|
||||
# By default the agent automatically injects the monitoring JavaScript
|
||||
# into web pages. Set this attribute to false to turn off this behavior.
|
||||
auto_instrument: true
|
||||
|
||||
# Proxy settings for connecting to the OneApm server.
|
||||
#
|
||||
# proxy_host: hostname
|
||||
# proxy_port: 8080
|
||||
# proxy_user:
|
||||
# proxy_pass:
|
||||
|
||||
# Tells transaction tracer and error collector (when enabled)
|
||||
# whether or not to capture HTTP params. When true, frameworks can
|
||||
# exclude HTTP parameters from being captured.
|
||||
# Rails: the RoR filter_parameter_logging excludes parameters
|
||||
capture_params: false
|
||||
|
||||
# Transaction tracer captures deep information about slow
|
||||
# transactions and sends this to the OneApm service once a
|
||||
# minute. Included in the transaction is the exact call sequence of
|
||||
# the transactions including any SQL statements issued.
|
||||
transaction_tracer:
|
||||
|
||||
# Transaction tracer is enabled by default.
|
||||
enabled: true
|
||||
|
||||
# Threshold in seconds for when to collect a transaction
|
||||
# trace. When the response time of a controller action exceeds
|
||||
# this threshold, a transaction trace will be recorded and sent to
|
||||
# OneApm. Valid values are any float value, or (default) "apdex_f",
|
||||
# which will use the threshold for an dissatisfying Apdex
|
||||
# controller action - four times the Apdex T value.
|
||||
transaction_threshold: apdex_f
|
||||
|
||||
# When transaction tracer is on, SQL statements can optionally be
|
||||
# recorded. The recorder has three modes, "off" which sends no
|
||||
# SQL, "raw" which sends the SQL statement in its original form,
|
||||
# and "obfuscated", which strips out numeric and string literals.
|
||||
record_sql: obfuscated
|
||||
|
||||
# Threshold in seconds for when to collect stack trace for a SQL
|
||||
# call. In other words, when SQL statements exceed this threshold,
|
||||
# then capture and send to OneApm the current stack trace. This is
|
||||
# helpful for pinpointing where long SQL calls originate from.
|
||||
stack_trace_threshold: 0.500
|
||||
|
||||
# Determines whether the agent will capture query plans for slow
|
||||
# SQL queries. Only supported in mysql and postgres. Should be
|
||||
# set to false when using other adapters.
|
||||
# explain_enabled: true
|
||||
|
||||
# Threshold for query execution time below which query plans will
|
||||
# not be captured. Relevant only when `explain_enabled` is true.
|
||||
# explain_threshold: 0.5
|
||||
|
||||
# Error collector captures information about uncaught exceptions and
|
||||
# sends them to OneApm for viewing
|
||||
error_collector:
|
||||
|
||||
# Error collector is enabled by default.
|
||||
enabled: true
|
||||
|
||||
# Ignore the following errors, add your own.
|
||||
ignore_errors: "ActionController::RoutingError,Sinatra::NotFound"
|
||||
|
||||
# ===================== Application Environments ========================
|
||||
# Environment-specific settings are in this section.
|
||||
# For Rails applications, RAILS_ENV is used to determine the environment.
|
||||
|
||||
# NOTE if your application has other named environments, you should
|
||||
# provide oneapm configuration settings for these environments here.
|
||||
|
||||
development:
|
||||
<<: *default_settings
|
||||
# Turn on communication to OneApm service in development mode
|
||||
monitor_mode: true
|
||||
app_name: My Application (Development)
|
||||
|
||||
test:
|
||||
<<: *default_settings
|
||||
monitor_mode: false
|
||||
|
||||
# Turn on the agent in production for 24x7 monitoring.
|
||||
production:
|
||||
<<: *default_settings
|
||||
monitor_mode: true
|
||||
|
||||
# Staging environment which behaves identically to production.
|
||||
staging:
|
||||
<<: *default_settings
|
||||
monitor_mode: true
|
||||
app_name: My Application (Staging)
|
Loading…
Reference in New Issue