rorvswild 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +64 -12
- data/lib/rorvswild/agent.rb +1 -1
- data/lib/rorvswild/local/javascript/barber.js +67 -0
- data/lib/rorvswild/local/javascript/local.js +108 -0
- data/lib/rorvswild/local/javascript/mustache.js +630 -0
- data/lib/rorvswild/local/javascript/prism.js +933 -0
- data/lib/rorvswild/local/local.html +132 -0
- data/lib/rorvswild/local/middleware.rb +73 -0
- data/lib/rorvswild/local/queue.rb +18 -0
- data/lib/rorvswild/local/stylesheet/local.css +319 -0
- data/lib/rorvswild/local/stylesheet/prism.css +147 -0
- data/lib/rorvswild/local.rb +11 -0
- data/lib/rorvswild/rails_loader.rb +7 -4
- data/lib/rorvswild/version.rb +1 -1
- metadata +13 -43
- data/.gitignore +0 -22
- data/Gemfile +0 -18
- data/Rakefile +0 -2
- data/rorvswild.gemspec +0 -20
- data/test/helper.rb +0 -20
- data/test/measure_nested_sections_test.rb +0 -37
- data/test/plugin/action_controller_test.rb +0 -64
- data/test/plugin/action_mailer_test.rb +0 -27
- data/test/plugin/action_view_test.rb +0 -40
- data/test/plugin/active_job_test.rb +0 -32
- data/test/plugin/active_record_test.rb +0 -39
- data/test/plugin/delayed_job_test.rb +0 -44
- data/test/plugin/elasticsearch_test.rb +0 -17
- data/test/plugin/mongo_test.rb +0 -24
- data/test/plugin/net_http_test.rb +0 -30
- data/test/plugin/redis_test.rb +0 -37
- data/test/plugin/resque_test.rb +0 -32
- data/test/plugin/sidekiq_test.rb +0 -36
- data/test/queue_test.rb +0 -56
- data/test/rorvswild_test.rb +0 -153
- data/test/run.rb +0 -3
- data/test/section_test.rb +0 -77
@@ -0,0 +1,132 @@
|
|
1
|
+
<div data-barber="RorVsWild.Local" data-json="%{data}">
|
2
|
+
</div>
|
3
|
+
|
4
|
+
<script type="x-tmpl-mustache" data-partial="RorVsWild.Local">
|
5
|
+
{{#embedded}}
|
6
|
+
<div class="rorvswild-local-toggler" data-events="click->toggle">{{lastRuntime}}<small>ms</small></div>
|
7
|
+
{{/embedded}}
|
8
|
+
<div id="rorvswild-local-requests" class="rorvswild-local-panel" style="{{containerStyle}}">
|
9
|
+
|
10
|
+
<div class="rorvswild-local-panel__header">
|
11
|
+
|
12
|
+
<a href="https://www.rorvswild.com" class="rorvswild-local-panel__logo">
|
13
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 34.83 30.83">
|
14
|
+
<polygon points="17.41 9.41 13.41 9.41 9.41 13.41 17.41 21.41 25.41 13.41 21.41 9.41 17.41 9.41"/>
|
15
|
+
<polyline points="1.41 21.41 9.41 29.41 17.41 21.41 25.41 29.41 33.41 21.41"/>
|
16
|
+
<polyline points="9.41 5.41 5.41 1.41 1.41 5.41"/>
|
17
|
+
<polyline points="33.41 5.41 29.41 1.41 25.41 5.41"/>
|
18
|
+
</svg>
|
19
|
+
</a>
|
20
|
+
|
21
|
+
{{#currentRequest}}
|
22
|
+
<span class="rorvswild-local-panel__header__title">breakdown</span>
|
23
|
+
{{/currentRequest}}
|
24
|
+
{{^currentRequest}}
|
25
|
+
<span class="rorvswild-local-panel__header__title">history</span>
|
26
|
+
{{/currentRequest}}
|
27
|
+
<span class="rorvswild-local-panel__header__icons">
|
28
|
+
<a href="https://github.com/BaseSecrete/rorvswild" class="rorvswild-local-panel__github" title="Source code">
|
29
|
+
<svg width="16px" height="16px" viewBox="0 0 16 16">
|
30
|
+
<path d="M8,0 C3.58,0 0,3.58 0,8 C0,11.54 2.29,14.53 5.47,15.59 C5.87,15.66 6.02,15.42 6.02,15.21 C6.02,15.02 6.01,14.39 6.01,13.72 C4,14.09 3.48,13.23 3.32,12.78 C3.23,12.55 2.84,11.84 2.5,11.65 C2.22,11.5 1.82,11.13 2.49,11.12 C3.12,11.11 3.57,11.7 3.72,11.94 C4.44,13.15 5.59,12.81 6.05,12.6 C6.12,12.08 6.33,11.73 6.56,11.53 C4.78,11.33 2.92,10.64 2.92,7.58 C2.92,6.71 3.23,5.99 3.74,5.43 C3.66,5.23 3.38,4.41 3.82,3.31 C3.82,3.31 4.49,3.1 6.02,4.13 C6.66,3.95 7.34,3.86 8.02,3.86 C8.7,3.86 9.38,3.95 10.02,4.13 C11.55,3.09 12.22,3.31 12.22,3.31 C12.66,4.41 12.38,5.23 12.3,5.43 C12.81,5.99 13.12,6.7 13.12,7.58 C13.12,10.65 11.25,11.33 9.47,11.53 C9.76,11.78 10.01,12.26 10.01,13.01 C10.01,14.08 10,14.94 10,15.21 C10,15.42 10.15,15.67 10.55,15.59 C13.71,14.53 16,11.53 16,8 C16,3.58 12.42,0 8,0 L8,0 Z"></path>
|
31
|
+
</svg>
|
32
|
+
</a>
|
33
|
+
{{#embedded}}
|
34
|
+
<div data-events="click->collapse" class="rorvswild-local-panel__close" title="Close">
|
35
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
36
|
+
<line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line>
|
37
|
+
</svg>
|
38
|
+
</div>
|
39
|
+
{{/embedded}}
|
40
|
+
</span>
|
41
|
+
</div>
|
42
|
+
<div class="rorvswild-local-panel__content">
|
43
|
+
{{#currentRequest}}
|
44
|
+
<div data-events="click->goToHistory" class="rorvswild-local-panel__back-button" title="Go to history">
|
45
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
46
|
+
<line x1="20" y1="12" x2="4" y2="12"></line>
|
47
|
+
<polyline points="10 18 4 12 10 6"></polyline>
|
48
|
+
</svg>
|
49
|
+
</div>
|
50
|
+
{{> RorVsWild.Local.RequestDetails}}
|
51
|
+
{{/currentRequest}}
|
52
|
+
|
53
|
+
{{^currentRequest}}
|
54
|
+
{{#requests}}
|
55
|
+
{{> RorVsWild.Local.RequestSummary}}
|
56
|
+
{{/requests}}
|
57
|
+
{{/currentRequest}}
|
58
|
+
</div>
|
59
|
+
<div class="rorvswild-local-panel__footer">
|
60
|
+
This data is not sent to rorvswild.com. To Monitor your production environment,
|
61
|
+
<a href="https://www.rorvswild.com" class="rorvswild-local-panel__footer__link">create an account</a>.
|
62
|
+
</div>
|
63
|
+
</div>
|
64
|
+
</script>
|
65
|
+
|
66
|
+
<script type="x-tmpl-mustache" data-partial="RorVsWild.Local.RequestSummary">
|
67
|
+
<div data-events="click->goToRequestDetails" data-request-id="{{id}}" class="rorvswild-local-panel__request">
|
68
|
+
<span class="rorvswild-local-panel__request__name">
|
69
|
+
{{name}}
|
70
|
+
<span class="rorvswild-local-panel__request__path">
|
71
|
+
{{path}}
|
72
|
+
</span>
|
73
|
+
</span>
|
74
|
+
<span class="rorvswild-local-panel__request__runtime">{{runtime}}<small>ms</small></span>
|
75
|
+
<span class="rorvswild-local-panel__request__started-at">{{startedAt}}</span>
|
76
|
+
</div>
|
77
|
+
</script>
|
78
|
+
|
79
|
+
<script type="x-tmpl-mustache" data-partial="RorVsWild.Local.RequestDetails">
|
80
|
+
<div class="rorvswild-local-panel__request-details">
|
81
|
+
<div class="rorvswild-local-panel__request-details__request">
|
82
|
+
<span class="rorvswild-local-panel__request__name">
|
83
|
+
<h2 class="rorvswild-local-panel__request__name__title">{{name}}</h2>
|
84
|
+
<span class="rorvswild-local-panel__request__path">
|
85
|
+
{{path}}
|
86
|
+
</span>
|
87
|
+
</span>
|
88
|
+
<span class="rorvswild-local-panel__request__runtime">{{runtime}}<small>ms</small></span>
|
89
|
+
<span class="rorvswild-local-panel__request__started-at">{{startedAt}}</span>
|
90
|
+
</div>
|
91
|
+
<div class="rorvswild-local-panel__request-details__sections">
|
92
|
+
{{#sections}}
|
93
|
+
{{> RorVsWild.Local.Section}}
|
94
|
+
{{/sections}}
|
95
|
+
</div>
|
96
|
+
</div>
|
97
|
+
</script>
|
98
|
+
|
99
|
+
<script type="x-tmpl-mustache" data-partial="RorVsWild.Local.Section">
|
100
|
+
<div class="rorvswild-local-panel__request-details__section">
|
101
|
+
<div class="rorvswild-local-panel__request-details__section__main">
|
102
|
+
<span class="rorvswild-local-panel__request-details__section__file">
|
103
|
+
{{file}}:{{line}}
|
104
|
+
<div class="rorvswild-local-panel__request-details__section__code">
|
105
|
+
<span class="rorvswild-local-panel__request-details__section__kind">{{kind}}</span>
|
106
|
+
<span class="rorvswild-local-panel__request-details__section__command">
|
107
|
+
<pre><code class="{{language}}">{{command}}</code></pre>
|
108
|
+
</span>
|
109
|
+
</div>
|
110
|
+
</span>
|
111
|
+
<span class="rorvswild-local-panel__request-details__section__average" title="average runtime">{{averageRuntime}}<small>ms</small></span>
|
112
|
+
<span class="rorvswild-local-panel__request-details__section__calls" title="calls">x{{calls}}</span>
|
113
|
+
<span class="rorvswild-local-panel__request-details__section__impact" title="impact">{{impact}}<small>%</small></span>
|
114
|
+
</div>
|
115
|
+
|
116
|
+
</div>
|
117
|
+
</script>
|
118
|
+
|
119
|
+
<script>
|
120
|
+
(function() {
|
121
|
+
var RorVsWild = {};
|
122
|
+
var startRorVsWild = function() {
|
123
|
+
%{javascript_source}
|
124
|
+
Barber.launch(document.rootElement, this)
|
125
|
+
}.bind(RorVsWild)
|
126
|
+
|
127
|
+
if (document.readyState != "loading")
|
128
|
+
startRorVsWild()
|
129
|
+
else
|
130
|
+
document.addEventListener("DOMContentLoaded", startRorVsWild)
|
131
|
+
})()
|
132
|
+
</script>
|
@@ -0,0 +1,73 @@
|
|
1
|
+
module RorVsWild
|
2
|
+
module Local
|
3
|
+
class Middleware
|
4
|
+
include ERB::Util
|
5
|
+
|
6
|
+
attr_reader :app, :config
|
7
|
+
|
8
|
+
def initialize(app, config)
|
9
|
+
@app, @config = app, config
|
10
|
+
end
|
11
|
+
|
12
|
+
def call(env)
|
13
|
+
env["REQUEST_URI"] == "/rorvswild" ? standalone_profiler(env) : embed_profiler(env)
|
14
|
+
end
|
15
|
+
|
16
|
+
def standalone_profiler(env)
|
17
|
+
html = "<!DOCTYPE html>\n<html><head></head><body></body></html>"
|
18
|
+
[200, {"Content-Type:" => "text/html; charset=utf-8"}, StringIO.new(inject_into(html))]
|
19
|
+
end
|
20
|
+
|
21
|
+
def embed_profiler(env)
|
22
|
+
status, headers, body = app.call(env)
|
23
|
+
if status >= 200 && status < 300 && headers["Content-Type"] && headers["Content-Type"].include?("text/html")
|
24
|
+
if headers["Content-Encoding"]
|
25
|
+
log_incompatible_middleware_warning
|
26
|
+
else
|
27
|
+
body.each { |string| inject_into(string) }
|
28
|
+
end
|
29
|
+
end
|
30
|
+
[status, headers, body]
|
31
|
+
end
|
32
|
+
|
33
|
+
def inject_into(html)
|
34
|
+
if index = html.index("</body>")
|
35
|
+
html.insert(index, html_markup(RorVsWild.agent.queue.requests))
|
36
|
+
end
|
37
|
+
if index = html.index("</head>")
|
38
|
+
html.insert(index, "<style type='text/css'> #{concatenate_stylesheet}</style>")
|
39
|
+
end
|
40
|
+
html
|
41
|
+
end
|
42
|
+
|
43
|
+
LOCAL_FOLDER = File.expand_path(File.dirname(__FILE__))
|
44
|
+
JS_FOLDER = File.join(LOCAL_FOLDER, "javascript")
|
45
|
+
CSS_FOLDER = File.join(LOCAL_FOLDER, "stylesheet")
|
46
|
+
JS_FILES = ["mustache.js", "barber.js", "prism.js", "local.js"]
|
47
|
+
CSS_FILES = ["prism.css", "local.css"]
|
48
|
+
|
49
|
+
def html_markup(data)
|
50
|
+
html = File.read(File.join(LOCAL_FOLDER, "local.html"))
|
51
|
+
html % {data: html_escape(data.to_json), javascript_source: concatenate_javascript}
|
52
|
+
end
|
53
|
+
|
54
|
+
def concatenate_javascript
|
55
|
+
concatenate_assets(JS_FOLDER, JS_FILES)
|
56
|
+
end
|
57
|
+
|
58
|
+
def concatenate_stylesheet
|
59
|
+
concatenate_assets(CSS_FOLDER, CSS_FILES)
|
60
|
+
end
|
61
|
+
|
62
|
+
def concatenate_assets(directory, files)
|
63
|
+
files.map { |file| File.read(File.join(directory, file)) }.join("\n")
|
64
|
+
end
|
65
|
+
|
66
|
+
def log_incompatible_middleware_warning
|
67
|
+
RorVsWild.logger.warn("RorVsWild::Local cannot be embeded into your HTML page because of compression." +
|
68
|
+
" Try to disable Rack::Deflater in development only." +
|
69
|
+
" In the meantime just visit the /rorvswild page to see the profiler.")
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module RorVsWild
|
2
|
+
module Local
|
3
|
+
class Queue
|
4
|
+
attr_reader :requests
|
5
|
+
def initialize
|
6
|
+
@requests = []
|
7
|
+
end
|
8
|
+
|
9
|
+
def push_job(data)
|
10
|
+
end
|
11
|
+
|
12
|
+
def push_request(data)
|
13
|
+
requests.unshift(data)
|
14
|
+
requests.pop if requests.size > 100
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,319 @@
|
|
1
|
+
/********************************************/
|
2
|
+
/************* TOGGLER **********************/
|
3
|
+
/********************************************/
|
4
|
+
|
5
|
+
.rorvswild-local-toggler {
|
6
|
+
background: #202630 !important;
|
7
|
+
color: #61b8ff !important;
|
8
|
+
box-shadow: 0 1px 4px 0px #2a2f3b !important;
|
9
|
+
border-radius: 4px !important;
|
10
|
+
font-family: monospace !important;
|
11
|
+
font-size: 15px !important;
|
12
|
+
line-height: 24px !important;
|
13
|
+
position: fixed !important;
|
14
|
+
bottom: 12px !important;
|
15
|
+
left: 12px !important;
|
16
|
+
padding:0 12px !important;
|
17
|
+
cursor: pointer !important;
|
18
|
+
z-index: 100001 !important;
|
19
|
+
}
|
20
|
+
.rorvswild-local-toggler small {
|
21
|
+
color: #afbecc !important;
|
22
|
+
font-size: 12px !important;
|
23
|
+
margin-left: 4px !important;
|
24
|
+
display: inline-block !important;
|
25
|
+
}
|
26
|
+
|
27
|
+
/********************************************/
|
28
|
+
/*************** PANEL **********************/
|
29
|
+
/********************************************/
|
30
|
+
|
31
|
+
.rorvswild-local-panel {
|
32
|
+
background: #202630 !important;
|
33
|
+
box-shadow: 0 0 0 48px rgba(0,0,0,.9) !important;
|
34
|
+
color: #ebf5ff !important;
|
35
|
+
font-family: monospace; !important;
|
36
|
+
font-size: 15px !important;
|
37
|
+
line-height: 24px !important;
|
38
|
+
position: fixed !important;
|
39
|
+
top: 12px !important;
|
40
|
+
left: 12px !important;
|
41
|
+
right: 12px !important;
|
42
|
+
bottom: 48px !important;
|
43
|
+
z-index: 100000 !important;
|
44
|
+
overflow: hidden !important;
|
45
|
+
display: -webkit-box !important;
|
46
|
+
display: -ms-flexbox !important;
|
47
|
+
display: flex !important;
|
48
|
+
-webkit-box-orient: vertical !important;
|
49
|
+
-webkit-box-direction: normal !important;
|
50
|
+
-ms-flex-direction: column !important;
|
51
|
+
flex-direction: column !important;
|
52
|
+
}
|
53
|
+
|
54
|
+
.rorvswild-local-panel * {
|
55
|
+
font-family: inherit !important;
|
56
|
+
font-size: inherit !important;
|
57
|
+
box-sizing: border-box !important;
|
58
|
+
color: inherit !important;
|
59
|
+
}
|
60
|
+
|
61
|
+
.rorvswild-local-panel ::-moz-selection {
|
62
|
+
background: #ebf5ff !important;
|
63
|
+
color: #202630 !important;
|
64
|
+
}
|
65
|
+
|
66
|
+
.rorvswild-local-panel ::selection {
|
67
|
+
background: #ebf5ff !important;
|
68
|
+
color: #202630 !important;
|
69
|
+
}
|
70
|
+
|
71
|
+
.rorvswild-local-panel small {
|
72
|
+
color: #afbecc !important;
|
73
|
+
font-size: 12px !important;
|
74
|
+
margin-left: 4px !important;
|
75
|
+
}
|
76
|
+
|
77
|
+
/* Panel Header */
|
78
|
+
.rorvswild-local-panel__header {
|
79
|
+
background: #2a2f3b !important;
|
80
|
+
padding: 12px !important;
|
81
|
+
box-shadow: 0 1px 2px 0 rgba(0,0,0,.2) !important;
|
82
|
+
z-index: 100002 !important;
|
83
|
+
display: -webkit-box;
|
84
|
+
display: -ms-flexbox;
|
85
|
+
display: flex;
|
86
|
+
}
|
87
|
+
.rorvswild-local-panel__header__title {
|
88
|
+
color: #afbecc !important;
|
89
|
+
text-transform: uppercase !important;
|
90
|
+
font-size: 12px !important;
|
91
|
+
letter-spacing: 2px !important;
|
92
|
+
text-align: center !important;
|
93
|
+
-webkit-box-flex: 1;
|
94
|
+
-ms-flex: 1;
|
95
|
+
flex: 1;
|
96
|
+
}
|
97
|
+
.rorvswild-local-panel svg {
|
98
|
+
height: 24px !important;
|
99
|
+
width: 24px !important;
|
100
|
+
stroke-width: 2 !important;
|
101
|
+
fill: none !important;
|
102
|
+
stroke-linecap: square !important;
|
103
|
+
stroke: #afbecc !important;
|
104
|
+
stroke-miterlimit: 10 !important;
|
105
|
+
vertical-align: middle !important;
|
106
|
+
}
|
107
|
+
.rorvswild-local-panel svg:hover {
|
108
|
+
stroke: #ebf5ff !important;
|
109
|
+
}
|
110
|
+
.rorvswild-local-panel__logo {
|
111
|
+
width: 60px !important;
|
112
|
+
}
|
113
|
+
.rorvswild-local-panel__header__icons {
|
114
|
+
width: 60px !important;
|
115
|
+
display: -webkit-box !important;
|
116
|
+
display: -ms-flexbox !important;
|
117
|
+
display: flex !important;
|
118
|
+
-webkit-box-pack: end !important;
|
119
|
+
-ms-flex-pack: end !important;
|
120
|
+
justify-content: flex-end !important;
|
121
|
+
}
|
122
|
+
.rorvswild-local-panel__close {
|
123
|
+
cursor: pointer !important;
|
124
|
+
margin-left: 12px !important;
|
125
|
+
}
|
126
|
+
.rorvswild-local-panel__github svg {
|
127
|
+
stroke: none !important;
|
128
|
+
fill: #afbecc !important;
|
129
|
+
}
|
130
|
+
.rorvswild-local-panel__github svg:hover {
|
131
|
+
stroke: none !important;
|
132
|
+
fill: #ebf5ff !important;
|
133
|
+
}
|
134
|
+
|
135
|
+
/* Panel Content */
|
136
|
+
|
137
|
+
.rorvswild-local-panel__content {
|
138
|
+
-webkit-box-flex: 1 !important;
|
139
|
+
-ms-flex: 1 !important;
|
140
|
+
flex: 1 !important;
|
141
|
+
height: calc(100% - 48px) !important;
|
142
|
+
overflow-x: auto !important;
|
143
|
+
}
|
144
|
+
.rorvswild-local-panel__content::-webkit-scrollbar { width: 3px !important; }
|
145
|
+
.rorvswild-local-panel__content::-webkit-scrollbar-corner { background: transparent !important; }
|
146
|
+
.rorvswild-local-panel__content::-webkit-scrollbar-track {
|
147
|
+
-webkit-box-shadow: inset 0 0 0 rgba(0,0,0,0.3) !important;
|
148
|
+
background: transparent !important;
|
149
|
+
}
|
150
|
+
.rorvswild-local-panel__content::-webkit-scrollbar-thumb {
|
151
|
+
background-color: #afbecc !important;
|
152
|
+
outline: 1px solid #afbecc !important;
|
153
|
+
}
|
154
|
+
|
155
|
+
/* Panel request summary */
|
156
|
+
|
157
|
+
.rorvswild-local-panel__request {
|
158
|
+
display: -webkit-box !important;
|
159
|
+
display: -ms-flexbox !important;
|
160
|
+
display: flex !important;
|
161
|
+
padding: 12px 12px 11px !important;
|
162
|
+
border-bottom: 1px solid #2a2f3b !important;
|
163
|
+
cursor: pointer !important;
|
164
|
+
-ms-flex-wrap: wrap !important;
|
165
|
+
flex-wrap: wrap !important;
|
166
|
+
}
|
167
|
+
.rorvswild-local-panel__request:hover { background: #2a2f3b !important; }
|
168
|
+
.rorvswild-local-panel__request__name {
|
169
|
+
word-break: break-all !important;
|
170
|
+
overflow-wrap: break-word !important;
|
171
|
+
width: 100% !important;
|
172
|
+
}
|
173
|
+
.rorvswild-local-panel__request__path {
|
174
|
+
color: #afbecc !important;
|
175
|
+
display: block !important;
|
176
|
+
}
|
177
|
+
.rorvswild-local-panel__request__started-at {
|
178
|
+
color: #afbecc !important;
|
179
|
+
margin-left: 12px !important;
|
180
|
+
}
|
181
|
+
.rorvswild-local-panel__request__runtime { color: #61b8ff !important; }
|
182
|
+
|
183
|
+
/* Panel request details */
|
184
|
+
|
185
|
+
.rorvswild-local-panel__back-button {
|
186
|
+
margin: 24px 12px 18px !important;
|
187
|
+
cursor: pointer !important;
|
188
|
+
display: block !important;
|
189
|
+
}
|
190
|
+
.rorvswild-local-panel__request-details__request {
|
191
|
+
display: -webkit-box !important;
|
192
|
+
display: -ms-flexbox !important;
|
193
|
+
display: flex !important;
|
194
|
+
margin-bottom: 48px !important;
|
195
|
+
padding: 12px 12px 0 !important;
|
196
|
+
-ms-flex-wrap: wrap !important;
|
197
|
+
flex-wrap: wrap !important;
|
198
|
+
}
|
199
|
+
h2.rorvswild-local-panel__request__name__title {
|
200
|
+
margin:-18px 0 0 !important;
|
201
|
+
padding:0 !important;
|
202
|
+
font-size: 31px !important;
|
203
|
+
line-height: 48px !important;
|
204
|
+
font-weight: 700 !important;
|
205
|
+
font-family: monospace !important;
|
206
|
+
text-align: left !important;
|
207
|
+
}
|
208
|
+
|
209
|
+
/* details sections */
|
210
|
+
|
211
|
+
.rorvswild-local-panel__request-details__section {
|
212
|
+
padding: 12px 12px 11px !important;
|
213
|
+
border-bottom: 1px solid #2a2f3b !important;
|
214
|
+
display: block !important;
|
215
|
+
}
|
216
|
+
.rorvswild-local-panel__request-details__section:hover {
|
217
|
+
background: #2a2f3b !important;
|
218
|
+
-webkit-transition: all .3s !important;
|
219
|
+
transition: all .3s !important;
|
220
|
+
}
|
221
|
+
|
222
|
+
.rorvswild-local-panel__request-details__section__main {
|
223
|
+
display: -webkit-box !important;
|
224
|
+
display: -ms-flexbox !important;
|
225
|
+
display: flex !important;
|
226
|
+
width: 100% !important;
|
227
|
+
-ms-flex-wrap: wrap !important;
|
228
|
+
flex-wrap: wrap !important;
|
229
|
+
}
|
230
|
+
.rorvswild-local-panel__request-details__section__file {
|
231
|
+
width: 100% !important;
|
232
|
+
word-break: break-all !important;
|
233
|
+
overflow-wrap: break-word !important;
|
234
|
+
}
|
235
|
+
.rorvswild-local-panel__request-details__section__average {
|
236
|
+
color: #61b8ff !important;
|
237
|
+
width: 48px !important;
|
238
|
+
margin:0 12px 0 0 !important;
|
239
|
+
}
|
240
|
+
.rorvswild-local-panel__request-details__section__calls {
|
241
|
+
color: #afbecc !important;
|
242
|
+
width: 48px !important;
|
243
|
+
margin:0 12px 0 0 !important;
|
244
|
+
}
|
245
|
+
.rorvswild-local-panel__request-details__section__impact {
|
246
|
+
width: 48px !important;
|
247
|
+
margin:0 12px 0 0 !important;
|
248
|
+
}
|
249
|
+
.rorvswild-local-panel__request-details__section__code {
|
250
|
+
display: -webkit-box !important;
|
251
|
+
display: -ms-flexbox !important;
|
252
|
+
display: flex !important;
|
253
|
+
}
|
254
|
+
.rorvswild-local-panel__request-details__section__kind {
|
255
|
+
background: #181c26 !important;
|
256
|
+
font-size: 10px !important;
|
257
|
+
text-transform: uppercase !important;
|
258
|
+
text-align: center !important;
|
259
|
+
letter-spacing: 2px !important;
|
260
|
+
width: 72px !important;
|
261
|
+
height: 24px !important;
|
262
|
+
display: inline-block !important;
|
263
|
+
}
|
264
|
+
.rorvswild-local-panel__request-details__section__command {
|
265
|
+
color: #afbecc !important;
|
266
|
+
margin-left: 12px !important;
|
267
|
+
-webkit-box-flex: 1 !important;
|
268
|
+
-ms-flex: 1 !important;
|
269
|
+
flex: 1 !important;
|
270
|
+
opacity: .6 !important;
|
271
|
+
}
|
272
|
+
|
273
|
+
.rorvswild-local-panel__request-details__section:hover .rorvswild-local-panel__request-details__section__command {
|
274
|
+
opacity: 1 !important;
|
275
|
+
}
|
276
|
+
|
277
|
+
/* Panel Footer */
|
278
|
+
|
279
|
+
.rorvswild-local-panel__footer {
|
280
|
+
width: 100% !important;
|
281
|
+
background: #2a2f3b !important;
|
282
|
+
color: #afbecc !important;
|
283
|
+
padding: 12px !important;
|
284
|
+
text-align: center !important;
|
285
|
+
}
|
286
|
+
a.rorvswild-local-panel__footer__link {
|
287
|
+
color: #ebf5ff !important;
|
288
|
+
text-decoration: underline !important;
|
289
|
+
line-height: inherit !important;
|
290
|
+
}
|
291
|
+
|
292
|
+
/* MEDIA QUERIES */
|
293
|
+
|
294
|
+
@media screen and (min-width: 720px) {
|
295
|
+
.rorvswild-local-panel__request__name {
|
296
|
+
-webkit-box-flex: 1 !important;
|
297
|
+
-ms-flex: 1 !important;
|
298
|
+
flex: 1 !important;
|
299
|
+
}
|
300
|
+
.rorvswild-local-panel__request__runtime { margin-left: 12px !important; }
|
301
|
+
|
302
|
+
.rorvswild-local-panel__request-details__section__file {
|
303
|
+
-webkit-box-flex: 1 !important;
|
304
|
+
-ms-flex: 1 !important;
|
305
|
+
flex: 1 !important;
|
306
|
+
}
|
307
|
+
.rorvswild-local-panel__request-details__section__average {
|
308
|
+
text-align: right !important;
|
309
|
+
margin:0 0 0 12px !important;
|
310
|
+
}
|
311
|
+
.rorvswild-local-panel__request-details__section__calls {
|
312
|
+
text-align: right !important;
|
313
|
+
margin:0 0 0 12px !important;
|
314
|
+
}
|
315
|
+
.rorvswild-local-panel__request-details__section__impact {
|
316
|
+
text-align: right !important;
|
317
|
+
margin:0 0 0 12px !important;
|
318
|
+
}
|
319
|
+
}
|
@@ -0,0 +1,147 @@
|
|
1
|
+
/* PrismJS 1.9.0
|
2
|
+
http://prismjs.com/download.html?themes=prism-twilight&languages=markup+css+clike+javascript+ruby+json+sql+yaml */
|
3
|
+
/**
|
4
|
+
* prism.js Twilight theme
|
5
|
+
* Based (more or less) on the Twilight theme originally of Textmate fame.
|
6
|
+
* @author Remy Bach
|
7
|
+
*/
|
8
|
+
.rorvswild-local-panel code[class*="language-"],
|
9
|
+
.rorvswild-local-panel pre[class*="language-"] {
|
10
|
+
color: #afbecc !important;
|
11
|
+
background: none !important;
|
12
|
+
font-family: monospace !important;
|
13
|
+
text-align: left !important;
|
14
|
+
text-shadow: 0 0 0 !important;
|
15
|
+
white-space: inherit !important;
|
16
|
+
word-spacing: normal !important;
|
17
|
+
|
18
|
+
word-break: break-all !important;
|
19
|
+
overflow-wrap: break-word !important;
|
20
|
+
|
21
|
+
font-size: 15px !important;
|
22
|
+
line-height: 24px !important;
|
23
|
+
|
24
|
+
-moz-tab-size: 4 !important;
|
25
|
+
-o-tab-size: 4 !important;
|
26
|
+
tab-size: 4 !important;
|
27
|
+
|
28
|
+
-webkit-hyphens: none !important;
|
29
|
+
-moz-hyphens: none !important;
|
30
|
+
-ms-hyphens: none !important;
|
31
|
+
hyphens: none !important;
|
32
|
+
|
33
|
+
-webkit-filter: saturate(75%) !important; /* Safari 6.0 - 9.0 */
|
34
|
+
filter: saturate(75%) !important;
|
35
|
+
}
|
36
|
+
|
37
|
+
.rorvswild-local-panel pre[class*="language-"],
|
38
|
+
.rorvswild-local-panel :not(pre) > code[class*="language-"] {
|
39
|
+
background: transparent !important;
|
40
|
+
}
|
41
|
+
|
42
|
+
/* Code blocks */
|
43
|
+
.rorvswild-local-panel pre[class*="language-"] {
|
44
|
+
border-radius: 0 !important;
|
45
|
+
border: 0 !important;
|
46
|
+
box-shadow: 0 0 0 !important;
|
47
|
+
margin: 0 !important;
|
48
|
+
overflow: hidden !important;
|
49
|
+
padding: 0 !important;
|
50
|
+
}
|
51
|
+
|
52
|
+
/* Text Selection colour */
|
53
|
+
.rorvswild-local-panel pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
54
|
+
.rorvswild-local-panel code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
55
|
+
text-shadow: none !important;
|
56
|
+
}
|
57
|
+
|
58
|
+
.rorvswild-local-panel pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
59
|
+
.rorvswild-local-panel code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
60
|
+
text-shadow: none !important;
|
61
|
+
}
|
62
|
+
|
63
|
+
/* Inline code */
|
64
|
+
.rorvswild-local-panel :not(pre) > code[class*="language-"] {
|
65
|
+
border-radius: 0 !important;
|
66
|
+
border: 0 !important;
|
67
|
+
box-shadow: 0 0 0 !important;
|
68
|
+
padding: 0 !important;
|
69
|
+
white-space: normal !important;
|
70
|
+
}
|
71
|
+
|
72
|
+
.rorvswild-local-panel .token.comment,
|
73
|
+
.rorvswild-local-panel .token.prolog,
|
74
|
+
.rorvswild-local-panel .token.doctype,
|
75
|
+
.rorvswild-local-panel .token.cdata {
|
76
|
+
color: #465b70 !important;
|
77
|
+
}
|
78
|
+
|
79
|
+
.rorvswild-local-panel .token.punctuation {
|
80
|
+
opacity: .7 !important;
|
81
|
+
}
|
82
|
+
|
83
|
+
.rorvswild-local-panel .namespace {
|
84
|
+
opacity: .7 !important;
|
85
|
+
}
|
86
|
+
|
87
|
+
.rorvswild-local-panel .token.tag,
|
88
|
+
.rorvswild-local-panel .token.boolean,
|
89
|
+
.rorvswild-local-panel .token.number,
|
90
|
+
.rorvswild-local-panel .token.deleted {
|
91
|
+
color: #fc8660 !important;
|
92
|
+
}
|
93
|
+
|
94
|
+
.rorvswild-local-panel .token.property,
|
95
|
+
.rorvswild-local-panel .token.selector,
|
96
|
+
.rorvswild-local-panel .token.symbol,
|
97
|
+
.rorvswild-local-panel .token.builtin,
|
98
|
+
.rorvswild-local-panel .token.string {
|
99
|
+
color: #54ddb9 !important;
|
100
|
+
}
|
101
|
+
|
102
|
+
.rorvswild-local-panel .token.attr-name,
|
103
|
+
.rorvswild-local-panel .token.char,
|
104
|
+
.rorvswild-local-panel .token.operator,
|
105
|
+
.rorvswild-local-panel .token.entity,
|
106
|
+
.rorvswild-local-panel .token.url,
|
107
|
+
.rorvswild-local-panel .token.variable,
|
108
|
+
.rorvswild-local-panel .token.inserted,
|
109
|
+
.rorvswild-local-panel .token.atrule,
|
110
|
+
.rorvswild-local-panel .token.attr-value,
|
111
|
+
.rorvswild-local-panel .token.keyword {
|
112
|
+
color: #c555df !important;
|
113
|
+
}
|
114
|
+
|
115
|
+
.rorvswild-local-panel .token.constant,
|
116
|
+
.rorvswild-local-panel .token.regex,
|
117
|
+
.rorvswild-local-panel .token.important {
|
118
|
+
color: #fcd160 !important;
|
119
|
+
}
|
120
|
+
|
121
|
+
.rorvswild-local-panel .token.function {
|
122
|
+
color: #549fdd !important;
|
123
|
+
}
|
124
|
+
|
125
|
+
.rorvswild-local-panel .token.important,
|
126
|
+
.rorvswild-local-panel .token.bold {
|
127
|
+
font-weight: bold !important;
|
128
|
+
}
|
129
|
+
.rorvswild-local-panel .token.italic {
|
130
|
+
font-style: italic !important;
|
131
|
+
}
|
132
|
+
|
133
|
+
.rorvswild-local-panel .token.entity {
|
134
|
+
cursor: help !important;
|
135
|
+
}
|
136
|
+
|
137
|
+
.rorvswild-local-panel pre[data-line] {
|
138
|
+
padding: 0 !important;
|
139
|
+
position: relative !important;
|
140
|
+
}
|
141
|
+
|
142
|
+
/* Markup */
|
143
|
+
.rorvswild-local-panel .language-markup .token.tag,
|
144
|
+
.rorvswild-local-panel .language-markup .token.attr-name,
|
145
|
+
.rorvswild-local-panel .language-markup .token.punctuation {
|
146
|
+
color: #9bacbd !important;
|
147
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require "rorvswild/local/middleware"
|
2
|
+
require "rorvswild/local/queue"
|
3
|
+
|
4
|
+
module RorVsWild
|
5
|
+
module Local
|
6
|
+
def self.start
|
7
|
+
Rails.application.config.middleware.unshift(RorVsWild::Local::Middleware, nil)
|
8
|
+
RorVsWild.start(queue: RorVsWild::Local::Queue.new)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|