oneapm_rpm 1.2.6 → 1.2.7.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NGQ1MGVjZDMwMDM5YjhlMmUwMmI5NjAxZmI0NWJmNTQyMDg2NDY4Zg==
4
+ Nzc0ZGVkYmRmMDRkNDMwMzJmNDJlZjMwMGNiMDQzZDBhODFlYTc0Yg==
5
5
  data.tar.gz: !binary |-
6
- OTQxNjRlNTFiZjY5NDU2NTdiYjU4M2JjMjAyZTQ5Nzc0ZGI5NzFiZg==
6
+ MWU5NDQ0NzQ5NGZiZjI3ODNkNzFhNzAzMDU1ZTgzMGY4OWRlMzM1Nw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Y2NhM2QwZDA5OTVhN2U1Mzk0YjE4YmRhYjg1YzUzYzA3Y2NiNjFjOTdiZTcz
10
- YmJjZDVhZjFlODMzODU5ODIwODBkZjdhMzdkNmRiNGY1OTE2ZmI4MjRkMzNj
11
- ZjA4YjQxMGE3OTEzMjk0NWJmMzI5N2E1Yjg2ODJlMzE5OTEzYTU=
9
+ MDBiYWZlYzU0YzNkN2I1OGZmNGJkMDgzMDEzOTJhNzhmZDAzNTI4NmZlMTFi
10
+ YzE0OTczOWZkZmIyYzdhOWRlZjg5ZDcxZWJiMjBkMWQyZDZjNTliN2UwMWQ3
11
+ Mjc2ZTE4NjJhY2M2MDgxYWE3YmM3OWUxNmIxNjZkNGYyZDgxZmI=
12
12
  data.tar.gz: !binary |-
13
- MGQ0ZDI0MjEyYzhlMjkzMTI5ODE1ODI5YjE4ZjJmZDQwM2Q0YmYwYzg1YmEz
14
- OGY2MjRmZDkzODNjZjYyZjYxMzBiNjZjY2ExZTQ2NTZhMDdjODkxYzBhOGFj
15
- YjQwMDk2YTk1NDFmNWJiNzZiMzRiMTE4NDQyZDExODQ4YTljZmU=
13
+ ZTVjMTAyZjYzNTkwMDJiZTczOTMyYjA4ZTA5ZWM0Y2JmMTVhNmNlODE3YzIy
14
+ NjVjNzliMmIwNTFlOWU2NzUyMGY5MWJmNjVlY2U3OGRjOWYwMTNmY2UwMGIz
15
+ ZTA2NGNlZWE2ZmE2ZjMwOWJlZDA1YzE5MTE0OTE5ZDlhMzgxNGI=
@@ -280,7 +280,6 @@ module OneApm
280
280
  # Gather transaction traces that we'd like to transmit to the server.
281
281
  def harvest!
282
282
  return [] unless enabled?
283
-
284
283
  samples = @samples_lock.synchronize do
285
284
  @last_sample = nil
286
285
  harvest_from_sample_buffers
@@ -58,6 +58,10 @@ module OneApm
58
58
  @@browser_monitoring_installed ||= false
59
59
  end
60
60
 
61
+ def developer_mode_installed
62
+ @@developer_mode_installed ||= false
63
+ end
64
+
61
65
  def install_agent_hooks(config)
62
66
  return if agent_hooks_installed
63
67
  @@agent_hooks_installed = true
@@ -87,8 +91,8 @@ module OneApm
87
91
 
88
92
  def install_developer_mode(rails_config)
89
93
  return if env != "development"
90
- return if @installed
91
- @installed = true
94
+ return if developer_mode_installed
95
+ @@developer_mode_installed = true
92
96
  if rails_config && rails_config.respond_to?(:middleware)
93
97
  begin
94
98
  require 'one_apm/rack/developer_mode'
@@ -23,8 +23,15 @@ module OneApm
23
23
  include OneApm::DeveloperModeHelper
24
24
 
25
25
  def traced_call(env)
26
- return @app.call(env) unless /^\/oneapm/ =~ ::Rack::Request.new(env).path_info
27
- dup._call(env)
26
+ @req = ::Rack::Request.new(env)
27
+ @start_memory_used = current_memory_used
28
+ return dup._call(env) if /^\/oneapm/ =~ @req.path_info
29
+ status, headers, body = @app.call(env)
30
+ if status == 200 && headers['Content-Type'] =~ /text\/html/
31
+ result = inject_profiler(env, status, headers, body)
32
+ return result if result
33
+ end
34
+ return [status,headers,body]
28
35
  end
29
36
 
30
37
  protected
@@ -32,7 +39,6 @@ module OneApm
32
39
  def _call(env)
33
40
  OneApm::Manager.ignore_transaction
34
41
 
35
- @req = ::Rack::Request.new(env)
36
42
  @rendered = false
37
43
  case @req.path_info
38
44
  when /assets/
@@ -60,6 +66,114 @@ module OneApm
60
66
 
61
67
  private
62
68
 
69
+ def inject_profiler(env, status, headers, body)
70
+ # mini profiler is meddling with stuff, we can not cache cause we will get incorrect data
71
+ # Rack::ETag has already inserted some nonesense in the chain
72
+ content_type = headers['Content-Type']
73
+ if content_type =~ /text\/html/
74
+ body = get_and_inject_profile(body)
75
+ response = ::Rack::Response.new([], status, headers)
76
+ if String === body
77
+ response.write body
78
+ else
79
+ body.each { |fragment| response.write fragment }
80
+ end
81
+ body.close if body.respond_to? :close
82
+ response.finish
83
+ else
84
+ nil
85
+ end
86
+ end
87
+
88
+ def get_and_inject_profile body
89
+ inject_page!(body, stylesheets, :postion => :head)
90
+ inject_page!(body, javascripts(body))
91
+ inject_page!(body, slide_templates)
92
+ body
93
+ end
94
+
95
+ def javascripts body
96
+ script = ""
97
+ script_files = ["javascript/jquery.min.js", "javascript/layer.js", "javascript/functions.js" ]
98
+ script_files.shift if body.body[0] =~ /jquery(.min)?/ rescue false
99
+ script_files.each do |sf|
100
+ script << "<script src=\"/oneapm/assets/#{sf}\"></script>\r\n"
101
+ end
102
+ script
103
+ end
104
+
105
+ def stylesheets
106
+ stylesheets = []
107
+ stylesheets << "<link rel=\"stylesheet\" media=\"all\" href=\"/oneapm/assets/stylesheets/menus.css\" />"
108
+ stylesheets << "<link rel=\"stylesheet\" media=\"all\" href=\"/oneapm/assets/stylesheets/layer.css\" />"
109
+ stylesheets.join("\r\n")
110
+ end
111
+
112
+ def slide_templates
113
+ template = read_script_file "#{VIEW_PATH}/oneapm/slide.tmpl"
114
+ samples = ""
115
+
116
+ current_transaction = OneApm::TransactionState.tl_get.current_transaction
117
+ duration = current_duration
118
+ memory_used = current_memory_used - @start_memory_used
119
+ samples = "<a href=\"#\" data-guid=\"#{current_transaction.guid}\" data-uri=\"#{@req.path_info}\" data-duration=\"#{(duration * 1000).round(2)}\" data-memory=\"#{memory_used.round(2)}\"><li>#{(duration * 1000).round(2)} ms</li></a>"
120
+ template.gsub(/\{samples\}/, samples)
121
+ end
122
+
123
+ def get_transaction_samples
124
+ return get_samples if last_sample_id <= 0
125
+ index = get_samples.find_index{|sample|sample.sample_id == last_sample_id}
126
+ index.nil? ? get_samples : get_samples[0...index]
127
+ end
128
+
129
+ def last_sample_id
130
+ Thread.current[:last_sample_id].to_i
131
+ end
132
+
133
+ def last_sample_id= sample_id
134
+ Thread.current[:last_sample_id] = sample_id.to_i
135
+ end
136
+
137
+ def inject_page! body, script, options = {:postion => :body}
138
+ if String === body
139
+ inject!(body, script, options)
140
+ else
141
+ body.each { |fragment| inject!(fragment, script, options) }
142
+ end
143
+ end
144
+
145
+ def read_script_file file_path
146
+ IO.read(::File.expand_path(file_path, ::File.dirname(__FILE__)))
147
+ end
148
+
149
+
150
+ def inject!(fragment, script, options = {})
151
+ if options[:postion] == :head && fragment.match(/<\/head>/i)
152
+ regex = /<\/head>/i
153
+ close_tag = '</head>'
154
+ elsif options[:postion] == :body && fragment.match(/<\/body>/i)
155
+ regex = /<\/body>/i
156
+ close_tag = '</body>'
157
+ else
158
+ return fragment
159
+ end
160
+
161
+ matches = fragment.scan(regex).length
162
+ index = 1
163
+ fragment.gsub!(regex) do
164
+ if index < matches
165
+ index += 1
166
+ close_tag
167
+ else
168
+ if script.respond_to?(:encoding) && script.respond_to?(:force_encoding)
169
+ (script + close_tag).force_encoding(fragment.encoding)
170
+ else
171
+ script + close_tag
172
+ end
173
+ end
174
+ end
175
+ end
176
+
63
177
  def index
64
178
  get_samples
65
179
  render(:index)
@@ -199,14 +313,7 @@ module OneApm
199
313
 
200
314
  def get_sample
201
315
  get_samples
202
- id = params['id']
203
- sample_id = id.to_i
204
- @samples.each do |s|
205
- if s.sample_id == sample_id
206
- @sample = s
207
- return
208
- end
209
- end
316
+ @sample = @samples.select{|sample| sample.sample_id == params['id'].to_i || sample.guid == params['guid']}.first
210
317
  end
211
318
 
212
319
  def get_segment
@@ -216,6 +323,16 @@ module OneApm
216
323
  segment_id = params['segment'].to_i
217
324
  @segment = @sample.find_segment(segment_id)
218
325
  end
326
+
327
+ def current_duration
328
+ Time.now.to_f - OneApm::TransactionState.tl_get.transaction_sample_builder.sample_start
329
+ end
330
+
331
+ def current_memory_used
332
+ @memory_sampler ||= OneApm::Collector::Samplers::MemorySampler.new
333
+ @memory_sampler.sampler.get_sample
334
+ end
335
+
219
336
  end
220
337
  end
221
338
  end
@@ -0,0 +1,44 @@
1
+ $(document).ready( function(){
2
+
3
+ $(".list_menu a").on( "mouseover", function(){
4
+ var li = $(this);
5
+ var uri = li.data('uri');
6
+ var duration = li.data('duration');
7
+ var memory = li.data('memory');
8
+ var message = "Path: " + uri + "<br/> Duration: " + duration + " ms<br/> Memory Used: " + memory + " MB";
9
+
10
+ var green = "#78BA32"
11
+ var orange = "#F0AD4E"
12
+ var red = "#E9573F"
13
+ var color = green;
14
+ if(duration > '300' && duration <= '500'){
15
+ color = orange;
16
+ }else if(duration > '500'){
17
+ color = red;
18
+ }
19
+ layer.tips(message, li, {tips: [2, color], shift: 1, time: 6000});
20
+
21
+ $("#slide_left").css({opacity: 0.9})
22
+ });
23
+
24
+ $(".list_menu a").on("mouseout", function(){
25
+ $("#slide_left").css({opacity: 0.6})
26
+ });
27
+
28
+ $("#slide_left a").on( "click", function(){
29
+ var a = $(this);
30
+ var sample_id = a.data('sample_id');
31
+ var guid = a.data('guid');
32
+ var iframe = layer.open({
33
+ type: 2,
34
+ title: '性能数据详情',
35
+ shadeClose: true,
36
+ shade: 0.6,
37
+ area: ['90%', '90%'],
38
+ maxmin: true,
39
+ content: '/oneapm/show_sample_summary?id=' + sample_id +'&guid=' + guid //iframe的url
40
+ });
41
+ return false;
42
+ });
43
+
44
+ });
@@ -0,0 +1,2 @@
1
+ /*! layer-v2.0 弹层组件 License LGPL http://layer.layui.com/ By 贤心 */
2
+ ;!function(a,b){"use strict";var c,d,e={getPath:function(){var a=document.scripts,b=a[a.length-1],c=b.src;if(!b.getAttribute("merge"))return c.substring(0,c.lastIndexOf("/")+1)}(),enter:function(a){13===a.keyCode&&a.preventDefault()},config:{},end:{},btn:["&#x786E;&#x5B9A;","&#x53D6;&#x6D88;"],type:["dialog","page","iframe","loading","tips"]},f={v:"2.0",ie6:!!a.ActiveXObject&&!a.XMLHttpRequest,index:0,path:e.getPath,config:function(a,b){var d=0;return a=a||{},f.cache=e.config=c.extend(e.config,a),f.path=e.config.path||f.path,"string"==typeof a.extend&&(a.extend=[a.extend]),f.use("../stylesheets/layer.css",a.extend&&a.extend.length>0?function g(){var c=a.extend;f.use(c[c[d]?d:d-1],d<c.length?function(){return++d,g}():b)}():b),this},use:function(a,b,d){var e=c("head")[0],a=a.replace(/\s/g,""),g=/\.css$/.test(a),h=document.createElement(g?"link":"script"),i="layui_layer_"+a.replace(/\.|\//g,"");return f.path?(g&&(h.rel="stylesheet"),h[g?"href":"src"]=/^http:\/\//.test(a)?a:f.path+a,h.id=i,c("#"+i)[0]||e.appendChild(h),function j(){(g?1989===parseInt(c("#"+i).css("width")):f[d||i])?function(){b&&b();try{g||e.removeChild(h)}catch(a){}}():setTimeout(j,100)}(),this):void 0},ready:function(a,b){var d="function"==typeof a;return d&&(b=a),f.config(c.extend(e.config,function(){return d?{}:{path:a}}()),b),this},alert:function(a,b,d){var e="function"==typeof b;return e&&(d=b),f.open(c.extend({content:a,yes:d},e?{}:b))},confirm:function(a,b,d,g){var h="function"==typeof b;return h&&(g=d,d=b),f.open(c.extend({content:a,btn:e.btn,yes:d,cancel:g},h?{}:b))},msg:function(a,d,g){var i="function"==typeof d,j=e.config.skin,k=(j?j+" "+j+"-msg":"")||"layui-layer-msg",l=h.anim.length-1;return i&&(g=d),f.open(c.extend({content:a,time:3e3,shade:!1,skin:k,title:!1,closeBtn:!1,btn:!1,end:g},i&&!e.config.skin?{skin:k+" layui-layer-hui",shift:l}:function(){return d=d||{},(-1===d.icon||d.icon===b&&!e.config.skin)&&(d.skin=k+" "+(d.skin||"layui-layer-hui")),d}()))},load:function(a,b){return f.open(c.extend({type:3,icon:a||0,shade:.01},b))},tips:function(a,b,d){return f.open(c.extend({type:4,content:[a,b],closeBtn:!1,time:3e3,maxWidth:210},d))}},g=function(a){var b=this;b.index=++f.index,b.config=c.extend({},b.config,e.config,a),b.creat()};g.pt=g.prototype;var h=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];h.anim=["layui-anim","layui-anim-01","layui-anim-02","layui-anim-03","layui-anim-04","layui-anim-05","layui-anim-06"],g.pt.config={type:0,shade:.3,fix:!0,move:h[1],title:"&#x4FE1;&#x606F;",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,shift:0,icon:-1,scrollbar:!0,tips:2},g.pt.vessel=function(a,b){var c=this,d=c.index,f=c.config,g=f.zIndex+d,i="object"==typeof f.title,j=f.maxmin&&(1===f.type||2===f.type),k=f.title?'<div class="layui-layer-title" style="'+(i?f.title[1]:"")+'">'+(i?f.title[0]:f.title)+"</div>":"";return f.zIndex=g,b([f.shade?'<div class="layui-layer-shade" id="layui-layer-shade'+d+'" times="'+d+'" style="'+("z-index:"+(g-1)+"; background-color:"+(f.shade[1]||"#000")+"; opacity:"+(f.shade[0]||f.shade)+"; filter:alpha(opacity="+(100*f.shade[0]||100*f.shade)+");")+'"></div>':"",'<div class="'+h[0]+" "+(h.anim[f.shift]||"")+(" layui-layer-"+e.type[f.type])+(0!=f.type&&2!=f.type||f.shade?"":" layui-layer-border")+" "+(f.skin||"")+'" id="'+h[0]+d+'" type="'+e.type[f.type]+'" times="'+d+'" showtime="'+f.time+'" conType="'+(a?"object":"string")+'" style="z-index: '+g+"; width:"+f.area[0]+";height:"+f.area[1]+(f.fix?"":";position:absolute;")+'">'+(a&&2!=f.type?"":k)+'<div class="layui-layer-content'+(0==f.type&&-1!==f.icon?" layui-layer-padding":"")+(3==f.type?" layui-layer-loading"+f.icon:"")+'">'+(0==f.type&&-1!==f.icon?'<i class="layui-layer-ico layui-layer-ico'+f.icon+'"></i>':"")+(1==f.type&&a?"":f.content||"")+'</div><span class="layui-layer-setwin">'+function(){var a=j?'<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>':"";return f.closeBtn&&(a+='<a class="layui-layer-ico '+h[7]+" "+h[7]+(f.title?f.closeBtn:4==f.type?"1":"2")+'" href="javascript:;"></a>'),a}()+"</span>"+(f.btn?function(){var a="";"string"==typeof f.btn&&(f.btn=[f.btn]);for(var b=0,c=f.btn.length;c>b;b++)a+='<a class="'+h[6]+b+'">'+f.btn[b]+"</a>";return'<div class="'+h[6]+'">'+a+"</div>"}():"")+"</div>"],k),c},g.pt.creat=function(){var a=this,b=a.config,g=a.index,i=b.content,j="object"==typeof i;switch("string"==typeof b.area&&(b.area="auto"===b.area?["",""]:[b.area,""]),b.type){case 0:b.btn="btn"in b?b.btn:e.btn[0],f.closeAll("dialog");break;case 2:var i=b.content=j?b.content:[b.content||"http://layer.layui.com","auto"];b.content='<iframe scrolling="'+(b.content[1]||"auto")+'" allowtransparency="true" id="'+h[4]+g+'" name="'+h[4]+g+'" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="'+b.content[0]+'"></iframe>';break;case 3:b.title=!1,b.closeBtn=!1,-1===b.icon&&0===b.icon,f.closeAll("loading");break;case 4:j||(b.content=[b.content,"body"]),b.follow=b.content[1],b.content=b.content[0]+'<i class="layui-layer-TipsG"></i>',b.title=!1,b.shade=!1,b.fix=!1,b.tips="object"==typeof b.tips?b.tips:[b.tips,!0],b.tipsMore||f.closeAll("tips")}a.vessel(j,function(d,e){c("body").append(d[0]),j?function(){2==b.type||4==b.type?function(){c("body").append(d[1])}():function(){i.parents("."+h[0])[0]||(i.show().addClass("layui-layer-wrap").wrap(d[1]),c("#"+h[0]+g).find("."+h[5]).before(e))}()}():c("body").append(d[1]),a.layero=c("#"+h[0]+g),b.scrollbar||h.html.css("overflow","hidden").attr("layer-full",g)}).auto(g),2==b.type&&f.ie6&&a.layero.find("iframe").attr("src",i[0]),c(document).off("keydown",e.enter).on("keydown",e.enter),4==b.type?a.tips():a.offset(),b.fix&&d.on("resize",function(){a.offset(),(/^\d+%$/.test(b.area[0])||/^\d+%$/.test(b.area[1]))&&a.auto(g),4==b.type&&a.tips()}),b.time<=0||setTimeout(function(){f.close(a.index)},b.time),a.move().callback()},g.pt.auto=function(a){function b(a){a=g.find(a),a.height(i[1]-j-k-2*(0|parseFloat(a.css("padding"))))}var e=this,f=e.config,g=c("#"+h[0]+a);""===f.area[0]&&f.maxWidth>0&&(/MSIE 7/.test(navigator.userAgent)&&f.btn&&g.width(g.innerWidth()),g.outerWidth()>f.maxWidth&&g.width(f.maxWidth));var i=[g.innerWidth(),g.innerHeight()],j=g.find(h[1]).outerHeight()||0,k=g.find("."+h[6]).outerHeight()||0;switch(f.type){case 2:b("iframe");break;default:""===f.area[1]?f.fix&&i[1]>=d.height()&&(i[1]=d.height(),b("."+h[5])):b("."+h[5])}return e},g.pt.offset=function(){var a=this,b=a.config,c=a.layero,e=[c.outerWidth(),c.outerHeight()],f="object"==typeof b.offset;a.offsetTop=(d.height()-e[1])/2,a.offsetLeft=(d.width()-e[0])/2,f?(a.offsetTop=b.offset[0],a.offsetLeft=b.offset[1]||a.offsetLeft):"auto"!==b.offset&&(a.offsetTop=b.offset,"rb"===b.offset&&(a.offsetTop=d.height()-e[1],a.offsetLeft=d.width()-e[0])),b.fix||(a.offsetTop=/%$/.test(a.offsetTop)?d.height()*parseFloat(a.offsetTop)/100:parseFloat(a.offsetTop),a.offsetLeft=/%$/.test(a.offsetLeft)?d.width()*parseFloat(a.offsetLeft)/100:parseFloat(a.offsetLeft),a.offsetTop+=d.scrollTop(),a.offsetLeft+=d.scrollLeft()),c.css({top:a.offsetTop,left:a.offsetLeft})},g.pt.tips=function(){var a=this,b=a.config,e=a.layero,f=[e.outerWidth(),e.outerHeight()],g=c(b.follow);g[0]||(g=c("body"));var i={width:g.outerWidth(),height:g.outerHeight(),top:g.offset().top,left:g.offset().left},j=e.find(".layui-layer-TipsG"),k=b.tips[0];b.tips[1]||j.remove(),i.autoLeft=function(){i.left+f[0]-d.width()>0?(i.tipLeft=i.left+i.width-f[0],j.css({right:12,left:"auto"})):i.tipLeft=i.left},i.where=[function(){i.autoLeft(),i.tipTop=i.top-f[1]-10,j.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",b.tips[1])},function(){i.tipLeft=i.left+i.width+10,i.tipTop=i.top,j.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",b.tips[1])},function(){i.autoLeft(),i.tipTop=i.top+i.height+10,j.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",b.tips[1])},function(){i.tipLeft=i.left-f[0]-10,i.tipTop=i.top,j.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",b.tips[1])}],i.where[k-1](),1===k?i.top-(d.scrollTop()+f[1]+16)<0&&i.where[2]():2===k?d.width()-(i.left+i.width+f[0]+16)>0||i.where[3]():3===k?i.top-d.scrollTop()+i.height+f[1]+16-d.height()>0&&i.where[0]():4===k&&f[0]+16-i.left>0&&i.where[1](),e.find("."+h[5]).css({"background-color":b.tips[1],"padding-right":b.closeBtn?"30px":""}),e.css({left:i.tipLeft,top:i.tipTop})},g.pt.move=function(){var a=this,b=a.config,e={setY:0,moveLayer:function(){var a=e.layero,b=parseInt(a.css("margin-left")),c=parseInt(e.move.css("left"));0===b||(c-=b),"fixed"!==a.css("position")&&(c-=a.parent().offset().left,e.setY=0),a.css({left:c,top:parseInt(e.move.css("top"))-e.setY})}},f=a.layero.find(b.move);return b.move&&f.attr("move","ok"),f.css({cursor:b.move?"move":"auto"}),c(b.move).on("mousedown",function(a){if(a.preventDefault(),"ok"===c(this).attr("move")){e.ismove=!0,e.layero=c(this).parents("."+h[0]);var f=e.layero.offset().left,g=e.layero.offset().top,i=e.layero.outerWidth()-6,j=e.layero.outerHeight()-6;c("#layui-layer-moves")[0]||c("body").append('<div id="layui-layer-moves" class="layui-layer-moves" style="left:'+f+"px; top:"+g+"px; width:"+i+"px; height:"+j+'px; z-index:2147483584"></div>'),e.move=c("#layui-layer-moves"),b.moveType&&e.move.css({visibility:"hidden"}),e.moveX=a.pageX-e.move.position().left,e.moveY=a.pageY-e.move.position().top,"fixed"!==e.layero.css("position")||(e.setY=d.scrollTop())}}),c(document).mousemove(function(a){if(e.ismove){var c=a.pageX-e.moveX,f=a.pageY-e.moveY;if(a.preventDefault(),!b.moveOut){e.setY=d.scrollTop();var g=d.width()-e.move.outerWidth(),h=e.setY;0>c&&(c=0),c>g&&(c=g),h>f&&(f=h),f>d.height()-e.move.outerHeight()+e.setY&&(f=d.height()-e.move.outerHeight()+e.setY)}e.move.css({left:c,top:f}),b.moveType&&e.moveLayer(),c=f=g=h=null}}).mouseup(function(){try{e.ismove&&(e.moveLayer(),e.move.remove(),b.moveEnd&&b.moveEnd()),e.ismove=!1}catch(a){e.ismove=!1}}),a},g.pt.callback=function(){function a(){var a=g.cancel&&g.cancel(b.index);a===!1||f.close(b.index)}var b=this,d=b.layero,g=b.config;b.openLayer(),g.success&&(2==g.type?d.find("iframe")[0].onload=function(){this.className="",g.success(d,b.index)}:g.success(d,b.index)),f.ie6&&b.IE6(d),d.find("."+h[6]).children("a").on("click",function(){var e=c(this).index();g["btn"+(e+1)]&&g["btn"+(e+1)](b.index,d),0===e?g.yes?g.yes(b.index,d):f.close(b.index):1===e?a():g["btn"+(e+1)]||f.close(b.index)}),d.find("."+h[7]).on("click",a),g.shadeClose&&c("#layui-layer-shade"+b.index).on("click",function(){f.close(b.index)}),d.find(".layui-layer-min").on("click",function(){f.min(b.index,g),g.min&&g.min(d)}),d.find(".layui-layer-max").on("click",function(){c(this).hasClass("layui-layer-maxmin")?(f.restore(b.index),g.restore&&g.restore(d)):(f.full(b.index,g),g.full&&g.full(d))}),g.end&&(e.end[b.index]=g.end)},e.reselect=function(){c.each(c("select"),function(a,b){var d=c(this);d.parents("."+h[0])[0]||1==d.attr("layer")&&c("."+h[0]).length<1&&d.removeAttr("layer").show(),d=null})},g.pt.IE6=function(a){function b(){a.css({top:f+(e.config.fix?d.scrollTop():0)})}var e=this,f=a.offset().top;b(),d.scroll(b),c("select").each(function(a,b){var d=c(this);d.parents("."+h[0])[0]||"none"===d.css("display")||d.attr({layer:"1"}).hide(),d=null})},g.pt.openLayer=function(){var a=this;f.zIndex=a.config.zIndex,f.setTop=function(a){var b=function(){f.zIndex++,a.css("z-index",f.zIndex+1)};return f.zIndex=parseInt(a[0].style.zIndex),a.on("mousedown",b),f.zIndex}},e.record=function(a){var b=[a.outerWidth(),a.outerHeight(),a.position().top,a.position().left+parseFloat(a.css("margin-left"))];a.find(".layui-layer-max").addClass("layui-layer-maxmin"),a.attr({area:b})},e.rescollbar=function(a){h.html.attr("layer-full")==a&&(h.html[0].style.removeProperty?h.html[0].style.removeProperty("overflow"):h.html[0].style.removeAttribute("overflow"),h.html.removeAttr("layer-full"))},f.getChildFrame=function(a,b){return b=b||c("."+h[4]).attr("times"),c("#"+h[0]+b).find("iframe").contents().find(a)},f.getFrameIndex=function(a){return c("#"+a).parents("."+h[4]).attr("times")},f.iframeAuto=function(a){if(a){var b=f.getChildFrame("html",a).outerHeight(),d=c("#"+h[0]+a),e=d.find(h[1]).outerHeight()||0,g=d.find("."+h[6]).outerHeight()||0;d.css({height:b+e+g}),d.find("iframe").css({height:b})}},f.iframeSrc=function(a,b){c("#"+h[0]+a).find("iframe").attr("src",b)},f.style=function(a,b){var d=c("#"+h[0]+a),f=d.attr("type"),g=d.find(h[1]).outerHeight()||0,i=d.find("."+h[6]).outerHeight()||0;(f===e.type[1]||f===e.type[2])&&(d.css(b),f===e.type[2]&&d.find("iframe").css({height:parseFloat(b.height)-g-i}))},f.min=function(a,b){var d=c("#"+h[0]+a),g=d.find(h[1]).outerHeight()||0;e.record(d),f.style(a,{width:180,height:g,overflow:"hidden"}),d.find(".layui-layer-min").hide(),"page"===d.attr("type")&&d.find(h[4]).hide(),e.rescollbar(a)},f.restore=function(a){var b=c("#"+h[0]+a),d=b.attr("area").split(",");b.attr("type");f.style(a,{width:parseFloat(d[0]),height:parseFloat(d[1]),top:parseFloat(d[2]),left:parseFloat(d[3]),overflow:"visible"}),b.find(".layui-layer-max").removeClass("layui-layer-maxmin"),b.find(".layui-layer-min").show(),"page"===b.attr("type")&&b.find(h[4]).show(),e.rescollbar(a)},f.full=function(a){var b,g=c("#"+h[0]+a);e.record(g),h.html.attr("layer-full")||h.html.css("overflow","hidden").attr("layer-full",a),clearTimeout(b),b=setTimeout(function(){var b="fixed"===g.css("position");f.style(a,{top:b?0:d.scrollTop(),left:b?0:d.scrollLeft(),width:d.width(),height:d.height()}),g.find(".layui-layer-min").hide()},100)},f.title=function(a,b){var d=c("#"+h[0]+(b||f.index)).find(h[1]);d.html(a)},f.close=function(a){var b=c("#"+h[0]+a),d=b.attr("type");if(b[0]){if(d===e.type[1]&&"object"===b.attr("conType")){b.children(":not(."+h[5]+")").remove();for(var g=0;2>g;g++)b.find(".layui-layer-wrap").unwrap().hide()}else{if(d===e.type[2])try{var i=c("#"+h[4]+a)[0];i.contentWindow.document.write(""),i.contentWindow.close(),b.find("."+h[5])[0].removeChild(i)}catch(j){}b[0].innerHTML="",b.remove()}c("#layui-layer-moves, #layui-layer-shade"+a).remove(),f.ie6&&e.reselect(),e.rescollbar(a),c(document).off("keydown",e.enter),"function"==typeof e.end[a]&&e.end[a](),delete e.end[a]}},f.closeAll=function(a){c.each(c("."+h[0]),function(){var b=c(this),d=a?b.attr("type")===a:1;d&&f.close(b.attr("times")),d=null})},e.run=function(){c=jQuery,d=c(a),h.html=c("html"),f.open=function(a){var b=new g(a);return b.index}},"function"==typeof define?define(function(){return e.run(),f}):function(){a.layer=f,e.run(),f.use("../stylesheets/layer.css")}()}(window);
@@ -0,0 +1,7 @@
1
+ /*!
2
+
3
+ @Name: layer's style
4
+ @Author: 贤心
5
+ @Blog: sentsin.com
6
+
7
+ */*html{background-image:url(about:blank);background-attachment:fixed}html #layui_layer_skinlayercss{display:none;position:absolute;width:1989px}.layui-layer,.layui-layer-shade{position:fixed;_position:absolute;pointer-events:auto}.layui-layer-shade{top:0;left:0;width:100%;height:100%;_height:expression(document.body.offsetHeight+"px")}.layui-layer{top:150px;left:50%;margin:0;padding:0;background-color:#fff;-webkit-background-clip:content;box-shadow:1px 1px 50px rgba(0,0,0,.3);border-radius:2px;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.3s;animation-duration:.3s}.layui-layer-close{position:absolute}.layui-layer-content{position:relative}.layui-layer-border{border:1px solid #B2B2B2;border:1px solid rgba(0,0,0,.3);box-shadow:1px 1px 5px rgba(0,0,0,.2)}.layui-layer-moves{position:absolute;border:3px solid #666;border:3px solid rgba(0,0,0,.5);cursor:move;background-color:#fff;background-color:rgba(255,255,255,.3);filter:alpha(opacity=50)}.layui-layer-load{background:url(../images/loading-0.gif) center center no-repeat #fff}.layui-layer-ico{background:url(../images/icon.png) no-repeat}.layui-layer-btn a,.layui-layer-dialog .layui-layer-ico,.layui-layer-setwin a{display:inline-block;*display:inline;*zoom:1;vertical-align:top}@-webkit-keyframes bounceIn{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes bounceIn{0%{opacity:0;-webkit-transform:scale(.5);-ms-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layui-anim{-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceOut{100%{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.03);transform:scale(1.03)}0%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes bounceOut{100%{opacity:0;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.03);-ms-transform:scale(1.03);transform:scale(1.03)}0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layui-anim-close{-webkit-animation-name:bounceOut;animation-name:bounceOut;-webkit-animation-duration:.2s;animation-duration:.2s}@-webkit-keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layui-anim-01{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.layui-anim-02{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);-ms-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);-ms-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layui-anim-03{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}@keyframes rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);-ms-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}.layui-anim-04{-webkit-animation-name:rollIn;animation-name:rollIn}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.layui-anim-05{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layui-anim-06{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.layui-layer-title{padding:0 80px 0 20px;height:42px;line-height:42px;border-bottom:1px solid #eee;font-size:14px;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:#F8F8F8;border-radius:2px 2px 0 0}.layui-layer-setwin{position:absolute;right:15px;*right:0;top:15px;font-size:0;line-height:initial}.layui-layer-setwin a{position:relative;width:16px;height:16px;margin-left:10px;font-size:12px;_overflow:hidden}.layui-layer-setwin .layui-layer-min cite{position:absolute;width:14px;height:2px;left:0;top:50%;margin-top:-1px;background-color:#2E2D3C;cursor:pointer;_overflow:hidden}.layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA}.layui-layer-setwin .layui-layer-max{background-position:-32px -40px}.layui-layer-setwin .layui-layer-max:hover{background-position:-16px -40px}.layui-layer-setwin .layui-layer-maxmin{background-position:-65px -40px}.layui-layer-setwin .layui-layer-maxmin:hover{background-position:-49px -40px}.layui-layer-setwin .layui-layer-close1{background-position:0 -40px;cursor:pointer}.layui-layer-setwin .layui-layer-close1:hover{opacity:.7}.layui-layer-setwin .layui-layer-close2{position:absolute;right:-28px;top:-28px;width:30px;height:30px;margin-left:0;background-position:-150px -31px;*right:-18px;_display:none}.layui-layer-setwin .layui-layer-close2:hover{background-position:-181px -31px}.layui-layer-btn{text-align:right;padding:0 10px 12px;pointer-events:auto}.layui-layer-btn a{height:28px;line-height:28px;margin:0 6px;padding:0 15px;border:1px solid #dedede;background-color:#f1f1f1;color:#333;border-radius:2px;font-weight:400;cursor:pointer;text-decoration:none}.layui-layer-btn a:hover{opacity:.9;text-decoration:none}.layui-layer-btn a:active{opacity:.7}.layui-layer-btn .layui-layer-btn0{border-color:#4898d5;background-color:#2e8ded;color:#fff}.layui-layer-dialog{min-width:260px}.layui-layer-dialog .layui-layer-content{position:relative;padding:20px;line-height:24px;word-break:break-all;font-size:14px;overflow:auto}.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute;top:16px;left:15px;_left:-40px;width:30px;height:30px}.layui-layer-ico1{background-position:-30px 0}.layui-layer-ico2{background-position:-60px 0}.layui-layer-ico3{background-position:-90px 0}.layui-layer-ico4{background-position:-120px 0}.layui-layer-ico5{background-position:-150px 0}.layui-layer-ico6{background-position:-180px 0}.layui-layer-rim{border:6px solid #8D8D8D;border:6px solid rgba(0,0,0,.3);border-radius:5px;box-shadow:none}.layui-layer-msg{min-width:180px;border:1px solid #D3D4D3;box-shadow:none}.layui-layer-hui{min-width:100px;background-color:#000;filter:alpha(opacity=60);background-color:rgba(0,0,0,.6);color:#fff;border:none}.layui-layer-hui .layui-layer-content{padding:12px 25px;text-align:center}.layui-layer-dialog .layui-layer-padding{padding:20px 20px 20px 55px;text-align:left}.layui-layer-page .layui-layer-content{position:relative;overflow:auto}.layui-layer-iframe .layui-layer-btn,.layui-layer-page .layui-layer-btn{padding-top:10px}.layui-layer-nobg{background:0 0}.layui-layer-iframe .layui-layer-content{overflow:hidden}.layui-layer-iframe iframe{display:block;width:100%}.layui-layer-loading{border-radius:100%;background:0 0;box-shadow:none;border:none}.layui-layer-loading .layui-layer-content{width:60px;height:24px;background:url(../images/loading-0.gif) no-repeat}.layui-layer-loading .layui-layer-loading1{width:37px;height:37px;background:url(default/loading-1.gif) no-repeat}.layui-layer-ico16,.layui-layer-loading .layui-layer-loading2{width:32px;height:32px;background:url(default/loading-2.gif) no-repeat}.layui-layer-tips{background:0 0;box-shadow:none;border:none}.layui-layer-tips .layui-layer-content{position:relative;line-height:22px;min-width:12px;padding:5px 10px;font-size:12px;_float:left;border-radius:3px;box-shadow:1px 1px 3px rgba(0,0,0,.3);background-color:#F90;color:#fff}.layui-layer-tips .layui-layer-close{right:-2px;top:-1px}.layui-layer-tips i.layui-layer-TipsG{position:absolute;width:0;height:0;border-width:8px;border-color:transparent;border-style:dashed;*overflow:hidden}.layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT{left:5px;border-right-style:solid;border-right-color:#F90}.layui-layer-tips i.layui-layer-TipsT{bottom:-8px}.layui-layer-tips i.layui-layer-TipsB{top:-8px}.layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR{top:1px;border-bottom-style:solid;border-bottom-color:#F90}.layui-layer-tips i.layui-layer-TipsR{left:-8px}.layui-layer-tips i.layui-layer-TipsL{right:-8px}.layui-layer-lan[type=dialog]{min-width:280px}.layui-layer-lan .layui-layer-title{background:#4476A7;color:#fff;border:none}.layui-layer-lan .layui-layer-lan .layui-layer-btn{padding:10px;text-align:right;border-top:1px solid #E9E7E7}.layui-layer-lan .layui-layer-btn a{background:#BBB5B5;border:none}.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5}.layui-layer-molv .layui-layer-title{background:#009f95;color:#fff;border:none}.layui-layer-molv .layui-layer-btn a{background:#009f95}.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1}
@@ -0,0 +1,187 @@
1
+ /* SLIDE LEFT MENU */
2
+
3
+ .slide_left_close{
4
+ position:fixed;
5
+ left:-100px;
6
+ }
7
+
8
+ #slide_left {
9
+ width: 100%;
10
+ height: 30px;
11
+ position: fixed;
12
+ top: 0;
13
+ left: 0;
14
+ margin-top: 0px;
15
+ margin-left: 0px;
16
+ z-index: 9999;
17
+ filter:alpha(Opacity=50);
18
+ -moz-opacity:0.5;
19
+ opacity: 0.5;
20
+ }
21
+
22
+ .slide_left_open{
23
+ left:0px;
24
+ }
25
+
26
+ #slide_left > ul{
27
+ float:left;
28
+ background-color:#3498db;
29
+ }
30
+
31
+ #slide_left > ul > h2{
32
+ border-bottom:solid 1px #2980b9;
33
+ }
34
+
35
+ #slide_left ul li{
36
+ background-color:#6badda;
37
+ }
38
+
39
+ #slide_left ul li:hover{
40
+ background-color:#4fa3dc;
41
+ }
42
+
43
+ /* RESET */
44
+
45
+ #slide_left a{
46
+ text-decoration:none;
47
+ color:inherit;
48
+ display:block;
49
+ }
50
+
51
+ #slide_left h1,h2,h3,h4,h5,p,div{
52
+ margin:0;
53
+ padding:0;
54
+ }
55
+ #slide_left{
56
+ z-index: 9999900;
57
+ }
58
+ /* CONTENT */
59
+
60
+ .envato{
61
+ margin:0 10px;
62
+ outline:none;
63
+ border:none;
64
+ background-color:#666;
65
+ color:#fff;
66
+ font-family:'Raleway',sans-serif;
67
+ height:30px;
68
+ width:135px;
69
+ cursor:pointer;
70
+ }
71
+
72
+ .graphicriver:hover{
73
+ background-color:#308EB1;
74
+ }
75
+
76
+ .codecanyon:hover{
77
+ background-color:#E78733;
78
+ }
79
+
80
+ .rate{
81
+ font-size:15px;
82
+ }
83
+
84
+ /****************************************************/
85
+ /* OVERALL MENUS STYLES */
86
+ /*****************************************************************************/
87
+
88
+ /* BODY */
89
+
90
+ .body_close{
91
+ overflow-x:hidden;
92
+ position:relative;
93
+ left:0;
94
+ }
95
+
96
+ .body_open_left{
97
+ left:220px;
98
+ }
99
+
100
+ .body_open_right{
101
+ left:-220px;
102
+ }
103
+
104
+ /* OVERALL MENUS */
105
+
106
+ .srl_menu{
107
+ margin-top:150px;
108
+ height:100%;
109
+ }
110
+
111
+ .prl_menu{
112
+ margin-top:105px;
113
+ height:100%;
114
+ }
115
+
116
+ .list_menu{
117
+ list-style:none;
118
+ padding:0;
119
+ margin:0;
120
+ width:100px;
121
+ }
122
+
123
+ .list_menu h2{
124
+ color:#f5f5f5;
125
+ padding:12px 0 0 12px;
126
+ height:30px;
127
+ font-size:19px;
128
+ }
129
+
130
+ .list_menu li{
131
+ display: block;
132
+ color:#f5f5f5;
133
+ width:100px;
134
+ padding:14px 0 14px 20px;
135
+ }
136
+
137
+ /* BUTTONS */
138
+
139
+ .z-index-over{/*Just for presentation purposes, to appear over the Push Left Menu (activated with javascript, please see .js file) - you can use it if you have the two, but it's not required*/
140
+ z-index:99999;
141
+ }
142
+
143
+ .button{
144
+ border:none;
145
+ outline:none;
146
+ width:45px;
147
+ height:45px;
148
+ padding:0;
149
+ cursor:pointer;
150
+ }
151
+
152
+ .button img{
153
+ margin-right:2px;
154
+ margin-top:4px;
155
+ }
156
+
157
+ .sbutton{
158
+ background-color:#3498db;
159
+ border-bottom:solid 1px #2980b9;
160
+ }
161
+
162
+ .pbutton{
163
+ background-color:#3498db;
164
+ border-bottom:solid 1px #2980b9;
165
+ }
166
+
167
+ /* TRANSITIONS */
168
+
169
+ .slide_left_open,.slide_left_close,.slide_right_open,.slide_right_close,.slide_top_open,.slide_top_close,.slide_bottom_open,.slide_bottom_close,.push_left_open,.push_left_close,.body_close,.body_open_left,.body_open_right,.push_right_open,.push_right_close,.button_top_close,.button_top_open,.button_bottom_close,.button_bottom_open{
170
+ -webkit-transition: all 0.3s ease;
171
+ -moz-transition: all 0.3s ease;
172
+ transition: all 0.3s ease;
173
+ }
174
+
175
+ /* MEDIA QUERIES ONLY FOR THE EXAMPLE PAGE - MENU MEDIA QUERIES CAN BE FOUND AT THE END OF MENUS.CSS */
176
+
177
+ @media only screen and (max-width : 480px) {
178
+
179
+ body{
180
+ min-width:320px;
181
+ }
182
+
183
+ .graphicriver{
184
+ margin-bottom:15px;
185
+ }
186
+
187
+ }
@@ -36,9 +36,9 @@
36
36
  <div class="row">
37
37
  <div class="col-lg-offset-3 col-lg-6">
38
38
  <div class="btn-group btn-group-justified" style="padding-bottom: 20px;">
39
- <a href="show_sample_summary?id=<%= params['id'] %>" class="btn btn-primary show_sample_summary">概 览</a>
40
- <a href="show_sample_detail?id=<%= params['id'] %>" class="btn btn-primary show_sample_detail">详 细</a>
41
- <a href="show_sample_sql?id=<%= params['id'] %>" class="btn btn-primary show_sample_sql">数据库</a>
39
+ <a href="show_sample_summary?id=<%= @sample.sample_id %>" class="btn btn-primary show_sample_summary">概 览</a>
40
+ <a href="show_sample_detail?id=<%= @sample.sample_id %>" class="btn btn-primary show_sample_detail">详 细</a>
41
+ <a href="show_sample_sql?id=<%= @sample.sample_id %>" class="btn btn-primary show_sample_sql">数据库</a>
42
42
  </div>
43
43
  </div>
44
44
  </div>
@@ -0,0 +1,7 @@
1
+ <!-- SLIDE MENU LEFT -->
2
+ <div id="slide_left" class="slide_left_close srl_menu slide_left_open">
3
+ <ul class="list_menu">
4
+ {samples}
5
+ </ul>
6
+ </div>
7
+ <!-- END SLIDE MENU LEFT -->
@@ -39,7 +39,7 @@ module OneApm
39
39
  def params=; end
40
40
  end
41
41
 
42
- attr_reader :current_segment, :sample
42
+ attr_reader :current_segment, :sample, :sample_start
43
43
 
44
44
  include OneApm::CollectionHelper
45
45
 
@@ -5,9 +5,10 @@ module OneApm
5
5
 
6
6
  MAJOR = 1
7
7
  MINOR = 2
8
- TINY = 6
8
+ TINY = 7
9
+ TAG = 'rc1'
9
10
 
10
- STRING = [MAJOR, MINOR, TINY].compact.join('.')
11
+ STRING = [MAJOR, MINOR, TINY, TAG].compact.join('.')
11
12
 
12
13
  end
13
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oneapm_rpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.6
4
+ version: 1.2.7.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - oneapm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-29 00:00:00.000000000 Z
11
+ date: 2015-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -392,19 +392,28 @@ files:
392
392
  - lib/one_apm/rack/developer_mode/views/oneapm/_summary_table.html.erb
393
393
  - lib/one_apm/rack/developer_mode/views/oneapm/assets/images/arrow-close.png
394
394
  - lib/one_apm/rack/developer_mode/views/oneapm/assets/images/arrow-open.png
395
+ - lib/one_apm/rack/developer_mode/views/oneapm/assets/images/close_left.png
396
+ - lib/one_apm/rack/developer_mode/views/oneapm/assets/images/icon.png
397
+ - lib/one_apm/rack/developer_mode/views/oneapm/assets/images/loading-0.gif
398
+ - lib/one_apm/rack/developer_mode/views/oneapm/assets/images/menu_icon.png
395
399
  - lib/one_apm/rack/developer_mode/views/oneapm/assets/images/oneapm_logo.png
396
400
  - lib/one_apm/rack/developer_mode/views/oneapm/assets/javascript/c3.min.js
397
401
  - lib/one_apm/rack/developer_mode/views/oneapm/assets/javascript/d3.min.js
402
+ - lib/one_apm/rack/developer_mode/views/oneapm/assets/javascript/functions.js
398
403
  - lib/one_apm/rack/developer_mode/views/oneapm/assets/javascript/jquery.min.js
404
+ - lib/one_apm/rack/developer_mode/views/oneapm/assets/javascript/layer.js
399
405
  - lib/one_apm/rack/developer_mode/views/oneapm/assets/javascript/transaction_sample.js
400
406
  - lib/one_apm/rack/developer_mode/views/oneapm/assets/stylesheets/bootstrap.min.css
401
407
  - lib/one_apm/rack/developer_mode/views/oneapm/assets/stylesheets/c3.css
408
+ - lib/one_apm/rack/developer_mode/views/oneapm/assets/stylesheets/layer.css
409
+ - lib/one_apm/rack/developer_mode/views/oneapm/assets/stylesheets/menus.css
402
410
  - lib/one_apm/rack/developer_mode/views/oneapm/assets/stylesheets/style.css
403
411
  - lib/one_apm/rack/developer_mode/views/oneapm/explain_sql.html.erb
404
412
  - lib/one_apm/rack/developer_mode/views/oneapm/index.html.erb
405
413
  - lib/one_apm/rack/developer_mode/views/oneapm/layout.html.erb
406
414
  - lib/one_apm/rack/developer_mode/views/oneapm/sample_not_found.html.erb
407
415
  - lib/one_apm/rack/developer_mode/views/oneapm/show_sample.html.erb
416
+ - lib/one_apm/rack/developer_mode/views/oneapm/slide.tmpl
408
417
  - lib/one_apm/rack/developer_mode/views/oneapm/threads.html.erb
409
418
  - lib/one_apm/rack/middleware_base.rb
410
419
  - lib/one_apm/rack/middleware_hooks.rb