rack-webprofiler 0.1.0.pre.alpha1 → 0.1.0.pre.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +13 -5
  2. data/README.md +2 -0
  3. data/lib/rack/templates/assets/css/profiler.css +1 -0
  4. data/lib/rack/templates/assets/css/rwpt.css +1 -0
  5. data/lib/rack/templates/assets/sass/_fonts.scss +60 -0
  6. data/lib/rack/templates/assets/sass/_normalize.scss +4 -0
  7. data/lib/rack/templates/assets/sass/_variables.scss +11 -0
  8. data/lib/rack/templates/assets/sass/profiler.scss +186 -0
  9. data/lib/rack/templates/assets/sass/rwpt.scss +266 -0
  10. data/lib/rack/templates/panel/_sidebar.erb +36 -0
  11. data/lib/rack/templates/panel/index.erb +26 -28
  12. data/lib/rack/templates/panel/layout.erb +23 -7
  13. data/lib/rack/templates/panel/show.erb +6 -17
  14. data/lib/rack/templates/profiler.erb +12 -58
  15. data/lib/rack/web_profiler/auto_configure/rails.rb +1 -1
  16. data/lib/rack/web_profiler/collector/rack/request_collector.rb +221 -5
  17. data/lib/rack/web_profiler/collector/ruby_collector.rb +39 -3
  18. data/lib/rack/web_profiler/collector/sinatra/request_collector.rb +186 -8
  19. data/lib/rack/web_profiler/collector/sinatra/sinatra_collector.rb +2 -2
  20. data/lib/rack/web_profiler/collector/time_collector.rb +5 -3
  21. data/lib/rack/web_profiler/collector.rb +5 -4
  22. data/lib/rack/web_profiler/collectors.rb +10 -2
  23. data/lib/rack/web_profiler/controller.rb +25 -4
  24. data/lib/rack/web_profiler/router.rb +40 -5
  25. data/lib/rack/web_profiler/version.rb +1 -1
  26. data/rack-webprofiler.gemspec +7 -2
  27. metadata +30 -38
  28. data/.editorconfig +0 -27
  29. data/.gitignore +0 -11
  30. data/.rspec +0 -2
  31. data/.rubocop.yml +0 -34
  32. data/.travis.yml +0 -23
  33. data/Gemfile +0 -15
  34. data/Rakefile +0 -17
  35. data/bin/ci-prepare +0 -16
  36. data/bin/console +0 -10
  37. data/bin/setup +0 -8
  38. data/examples/README.md +0 -56
  39. data/examples/rack/config.ru +0 -52
  40. data/examples/sinatra/app.rb +0 -37
  41. data/examples/sinatra/config.ru +0 -3
  42. data/lib/rack/templates/assets/rwpt.css +0 -9
  43. /data/lib/rack/templates/assets/{rwpt.js → js/rwpt.js} +0 -0
  44. /data/{.rubocop_todo.yml → lib/rack/templates/assets/js/rwpt.min.js} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 4e53fe35fbf1ec6a915d0374a19f1906099038b1
4
- data.tar.gz: 5d4e24c3922f21f2ab2729c76ab2773d23c5139d
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NDkzNDYxNzVmNWE3MTRhMjIyMzc5NWNhZjVkNWY1OWQ1NmVhZjcyYg==
5
+ data.tar.gz: !binary |-
6
+ MWVlNjMwZjNmYjU0OTQwYTlhMDlmOGFlZjgxZDQ5NWNhOWVmZjZiYg==
5
7
  SHA512:
6
- metadata.gz: 6fe6001ef5e408dd90112981ef35a71767df331c4050493cbe9cd0e047e3f263f398e75d1f4461215eee7a701602e7ee534ef886bdf88bdb1cb896516f696d32
7
- data.tar.gz: 20a4c13c4861a4a025b3b09b3a8889d18b7cf98665e3caa530575658cdc2d8e279416ebb185d14194c4ae1fdee55a7de1fd605cc7335aa0e6993f58485623f63
8
+ metadata.gz: !binary |-
9
+ YWI3NTY5YjBhMGQ0MzhjYmE4OTNhMDAxYmE0YzNmNjBlZThhYTU1ZDU5M2Q0
10
+ NWE1ZWQ1YmI3MTM0MTJhNzIxNGE5OTQ4NzIwZDU2MjZjODdiMTcwZjJlZWM5
11
+ MGZjZGViOGNiZjY2YWNmZTZjZTQ1OTU3OTZmZmVkMjQyNmI1MGI=
12
+ data.tar.gz: !binary |-
13
+ MWU5Y2JmZWQwNmUyZDNkZjM0ZGMyNmUyNjBmODc2OWE5YmIyYjBhOTM3ZDk2
14
+ YWNmNWYwMDAxZGM3ZjZjMmIzNjRiNmMyNGY5MzE5NDg4NmM4ZTYxMmY0ZWRm
15
+ OWIxNzM0ZjcwNTNmNDhhMjVlYzdiZjFmYjc1YjM2NjQxOTRmMzU=
data/README.md CHANGED
@@ -76,6 +76,8 @@ See [the examples](./examples).
76
76
 
77
77
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
78
78
 
79
+ You can use `bin/start-dev` to run the example and test the library.
80
+
79
81
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
80
82
 
81
83
  ## Contributing
@@ -0,0 +1 @@
1
+ @font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local("Open Sans Light"),local("OpenSans-Light"),url("https://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTRampu5_7CjHW5spxoeN3Vs.woff2") format("woff2")}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local("Open Sans"),local("OpenSans"),url("https://fonts.gstatic.com/s/opensans/v13/cJZKeOuBrn4kERxqtaUH3ZBw1xU1rKptJj_0jans920.woff2") format("woff2")}@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:local("Open Sans Semibold"),local("OpenSans-Semibold"),url("https://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNShampu5_7CjHW5spxoeN3Vs.woff2") format("woff2")}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local("Open Sans Bold"),local("OpenSans-Bold"),url("https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzBampu5_7CjHW5spxoeN3Vs.woff2") format("woff2")}@font-face{font-family:'Open Sans';font-style:normal;font-weight:800;src:local("Open Sans Extrabold"),local("OpenSans-Extrabold"),url("https://fonts.gstatic.com/s/opensans/v13/EInbV5DfGHOiMmvb1Xr-hhampu5_7CjHW5spxoeN3Vs.woff2") format("woff2")}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300;src:local("Open Sans Light Italic"),local("OpenSansLight-Italic"),url("https://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxtTIkQYohD4BpHvJ3NvbHoA.woff2") format("woff2")}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local("Open Sans Italic"),local("OpenSans-Italic"),url("https://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBogp9Q8gbYrhqGlRav_IXfk.woff2") format("woff2")}@font-face{font-family:'Open Sans';font-style:italic;font-weight:600;src:local("Open Sans Semibold Italic"),local("OpenSans-SemiboldItalic"),url("https://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxsiAiQ_a33snTsJhwZvMEaI.woff2") format("woff2")}@font-face{font-family:'Open Sans';font-style:italic;font-weight:700;src:local("Open Sans Bold Italic"),local("OpenSans-BoldItalic"),url("https://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxv79_ZuUxCigM2DespTnFaw.woff2") format("woff2")}@font-face{font-family:'Open Sans';font-style:italic;font-weight:800;src:local("Open Sans Extrabold Italic"),local("OpenSans-ExtraboldItalic"),url("https://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxmPkvcX8kXDzy1NrkNCBkJ4.woff2") format("woff2")}#rack-webprofiler-bar{position:fixed;left:0;bottom:0;font-family:"Open Sans","Helvetica Neue",Arial,sans-serif;height:46px;/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */}#rack-webprofiler-bar img,#rack-webprofiler-bar legend{border:0}#rack-webprofiler-bar legend,#rack-webprofiler-bar td,#rack-webprofiler-bar th{padding:0}#rack-webprofiler-bar html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}#rack-webprofiler-bar body{margin:0}#rack-webprofiler-bar article,#rack-webprofiler-bar aside,#rack-webprofiler-bar details,#rack-webprofiler-bar figcaption,#rack-webprofiler-bar figure,#rack-webprofiler-bar footer,#rack-webprofiler-bar header,#rack-webprofiler-bar hgroup,#rack-webprofiler-bar main,#rack-webprofiler-bar menu,#rack-webprofiler-bar nav,#rack-webprofiler-bar section,#rack-webprofiler-bar summary{display:block}#rack-webprofiler-bar audio,#rack-webprofiler-bar canvas,#rack-webprofiler-bar progress,#rack-webprofiler-bar video{display:inline-block;vertical-align:baseline}#rack-webprofiler-bar audio:not([controls]){display:none;height:0}#rack-webprofiler-bar [hidden],#rack-webprofiler-bar template{display:none}#rack-webprofiler-bar a{background-color:transparent}#rack-webprofiler-bar a:active,#rack-webprofiler-bar a:hover{outline:0}#rack-webprofiler-bar abbr[title]{border-bottom:1px dotted}#rack-webprofiler-bar b,#rack-webprofiler-bar optgroup,#rack-webprofiler-bar strong{font-weight:700}#rack-webprofiler-bar dfn{font-style:italic}#rack-webprofiler-bar h1{font-size:2em;margin:.67em 0}#rack-webprofiler-bar mark{background:#ff0;color:#000}#rack-webprofiler-bar small{font-size:80%}#rack-webprofiler-bar sub,#rack-webprofiler-bar sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}#rack-webprofiler-bar sup{top:-.5em}#rack-webprofiler-bar sub{bottom:-.25em}#rack-webprofiler-bar svg:not(:root){overflow:hidden}#rack-webprofiler-bar figure{margin:1em 40px}#rack-webprofiler-bar hr{box-sizing:content-box;height:0}#rack-webprofiler-bar pre,#rack-webprofiler-bar textarea{overflow:auto}#rack-webprofiler-bar code,#rack-webprofiler-bar kbd,#rack-webprofiler-bar pre,#rack-webprofiler-bar samp{font-family:monospace,monospace;font-size:1em}#rack-webprofiler-bar button,#rack-webprofiler-bar input,#rack-webprofiler-bar optgroup,#rack-webprofiler-bar select,#rack-webprofiler-bar textarea{color:inherit;font:inherit;margin:0}#rack-webprofiler-bar button{overflow:visible}#rack-webprofiler-bar button,#rack-webprofiler-bar select{text-transform:none}#rack-webprofiler-bar button,#rack-webprofiler-bar html input[type=button],#rack-webprofiler-bar input[type=reset],#rack-webprofiler-bar input[type=submit]{-webkit-appearance:button;cursor:pointer}#rack-webprofiler-bar button[disabled],#rack-webprofiler-bar html input[disabled]{cursor:default}#rack-webprofiler-bar button::-moz-focus-inner,#rack-webprofiler-bar input::-moz-focus-inner{border:0;padding:0}#rack-webprofiler-bar input{line-height:normal}#rack-webprofiler-bar input[type=checkbox],#rack-webprofiler-bar input[type=radio]{box-sizing:border-box;padding:0}#rack-webprofiler-bar input[type=number]::-webkit-inner-spin-button,#rack-webprofiler-bar input[type=number]::-webkit-outer-spin-button{height:auto}#rack-webprofiler-bar input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}#rack-webprofiler-bar input[type=search]::-webkit-search-cancel-button,#rack-webprofiler-bar input[type=search]::-webkit-search-decoration{-webkit-appearance:none}#rack-webprofiler-bar fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}#rack-webprofiler-bar table{border-collapse:collapse;border-spacing:0}#rack-webprofiler-bar *{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-osx-font-smooth:grayscale;margin:0;padding:0}#rack-webprofiler-bar a{text-decoration:none}#rack-webprofiler-bar.rack-webprofiler--long{width:100%;background-color:#1c1f33}#rack-webprofiler-bar .rack-webprofiler__wrapper{display:table}#rack-webprofiler-bar .rack-webprofiler__item{box-sizing:border-box;display:table-cell;height:40px;padding:10px;position:relative;background-color:#1c1f33;border-top:1px #282f4c solid;border-right:1px #282f4c solid}#rack-webprofiler-bar .rack-webprofiler__item a{width:100%;height:100%;display:inline-block}#rack-webprofiler-bar .rack-webprofiler__item--has-drop{cursor:pointer}#rack-webprofiler-bar .rack-webprofiler__item:hover{background-color:#282f4c}#rack-webprofiler-bar .rack-webprofiler__item:hover .rack-webprofiler__item__drop{display:block}#rack-webprofiler-bar .rack-webprofiler__item i.icn{display:inline-block;vertical-align:middle;padding-left:2px;padding-right:5px}#rack-webprofiler-bar .rack-webprofiler__item--close{width:45px;text-align:center;-webkit-user-select:none;user-select:none;cursor:pointer}#rack-webprofiler-bar .rack-webprofiler__item--close i.icn{padding:0px}#rack-webprofiler-bar .rack-webprofiler__item__label,#rack-webprofiler-bar .rack-webprofiler__item__value{font-weight:600;font-size:0.875em;color:#c4c2cc}#rack-webprofiler-bar .rack-webprofiler__item__value{color:#f3fcf0;vertical-align:middle}#rack-webprofiler-bar .rack-webprofiler__item__status-color{display:block;width:100%;height:4px;position:absolute;left:0;bottom:0}#rack-webprofiler-bar .rack-webprofiler__item__status-color.success{background-color:#7ed321}#rack-webprofiler-bar .rack-webprofiler__item__status-color.warning{background-color:#f8e71c}#rack-webprofiler-bar .rack-webprofiler__item__status-color.error{background-color:#d92b2e}#rack-webprofiler-bar .rack-webprofiler__item__drop{display:none;width:100%;height:1px;position:absolute;top:-1px;left:-1px}#rack-webprofiler-bar .rack-webprofiler__item__drop .rack-webprofiler__item__value{font-weight:400}#rack-webprofiler-bar .rack-webprofiler__item__drop .rack-webprofiler__item__drop__wrapper{box-sizing:border-box;min-width:100%;padding:10px;border:1px #282f4c solid;border-bottom:0;background-color:#202540;white-space:nowrap;position:absolute;left:0;bottom:0}#rack-webprofiler-bar .rack-webprofiler__item__drop--list .rack-webprofiler__item__drop__wrapper .rack-webprofiler__item__label{color:#c4c2cc}#rack-webprofiler-bar .rack-webprofiler__item__drop--list .rack-webprofiler__item__drop__wrapper .rack-webprofiler__item__value{padding-left:10px;color:#f3fcf0}#rack-webprofiler-bar .rack-webprofiler__item__drop--list .rack-webprofiler__item__drop__wrapper th,#rack-webprofiler-bar .rack-webprofiler__item__drop--list .rack-webprofiler__item__drop__wrapper td{text-align:left;white-space:nowrap}
@@ -0,0 +1 @@
1
+ /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */img,legend{border:0}legend,td,th{padding:0}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre,textarea{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}table{border-collapse:collapse;border-spacing:0}body{font-family:"Open Sans", "Helvetica Neue", Arial, sans-serif}#rack-webprofiler{position:absolute;width:100%;height:100%}#rack-webprofiler,#rack-webprofiler *{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-osx-font-smooth:grayscale}#rack-webprofiler a{text-decoration:none}#rack-webprofiler .block{margin-bottom:35px}#rack-webprofiler .block h1{margin-bottom:25px;text-align:left;text-transform:none;font-family:"Open Sans";font-weight:700;font-size:1.125em;color:#1c1f33}#rack-webprofiler .block table{width:calc(100% - 2px);border-collapse:collapse;outline:1px #979797 solid}#rack-webprofiler .block table th,#rack-webprofiler .block table td{padding:6px 9px;border:1px #d8d8d8 solid;font-size:0.75em}#rack-webprofiler .block table th:first-child,#rack-webprofiler .block table td:first-child{border-left-width:0}#rack-webprofiler .block table th:last-child,#rack-webprofiler .block table td:last-child{border-right-width:0}#rack-webprofiler .block table thead tr:first-child th,#rack-webprofiler .block table thead tr:first-child td{border-top-width:0}#rack-webprofiler .block table tbody tr:last-child th,#rack-webprofiler .block table tbody tr:last-child td{border-bottom-width:0}#rack-webprofiler .block table th{background-color:#ececec;text-align:left;font-weight:400;color:#1c1f33}#rack-webprofiler .block table thead th{text-transform:capitalize}#rack-webprofiler .block table td.code{font-family:"Courier New"}#rack-webprofiler .block p{text-align:left;text-transform:none;font-size:0.875em;line-height:1.4em;color:#666370}#rack-webprofiler .block.block--text .text__no-value{font-style:italic}#rack-webprofiler .block.block--summary table{width:100%;border-collapse:collapse}#rack-webprofiler .block.block--summary table th{text-align:left;line-height:1.4em;font-weight:400;font-size:0.875em;color:#666370}#rack-webprofiler .block.block--summary .value,#rack-webprofiler .block.block--summary .unit{font-size:1.25em}#rack-webprofiler .block.block--summary .value{color:#45425a}#rack-webprofiler .block.block--summary .unit{color:#9b9b9b}#rack-webprofiler .header__section{display:table;width:100%;height:40px;color:#fff;font-size:1em;font-weight:300;background-color:#ff2851}#rack-webprofiler .header__section:nth-child(even){background-color:#e62548}#rack-webprofiler .header__section.header__section--blank:before{content:""}#rack-webprofiler .header__section span{box-sizing:border-box;display:table-cell;vertical-align:middle;padding-left:20px}#rack-webprofiler .header__section span a{color:#f3fcf0;text-decoration:none}#rack-webprofiler #main{overflow-y:auto;width:calc(100% - 162px);height:100%;float:left}#rack-webprofiler #sidebar{width:162px;height:100%;float:left;background-color:#1c1f33}#rack-webprofiler #sidebar .sidebar__header{height:80px;border-bottom:1px #26304b solid;text-align:center}#rack-webprofiler #sidebar .sidebar__header:before{content:"";display:inline-block;height:100%;vertical-align:middle;margin-left:-0.25em}#rack-webprofiler #sidebar .sidebar__header .sidebar__header__wrapper{display:inline-block;vertical-align:middle}#rack-webprofiler #sidebar .sidebar__header span{display:block;font-size:1em;color:#f3fcf0}#rack-webprofiler #sidebar .sidebar__header .sidebar__header__title{margin-top:15px}#rack-webprofiler #sidebar .sidebar__header .sidebar__header__title a{color:#f3fcf0;text-decoration:none}#rack-webprofiler #sidebar .sidebar__item{display:table;width:100%;height:40px;border-bottom:1px #26304b solid;-webkit-user-select:none;user-select:none}#rack-webprofiler #sidebar .sidebar__item:hover{background-color:#282f4c}#rack-webprofiler #sidebar .sidebar__item.sidebar__item--blank{display:block}#rack-webprofiler #sidebar .sidebar__item .sidebar__item-inner{display:table-cell;vertical-align:middle}#rack-webprofiler #sidebar .sidebar__item .sidebar__item-inner a{width:100%;height:100%;display:inline-block}#rack-webprofiler #sidebar .sidebar__item .icn{display:inline-block;vertical-align:middle;padding:0px 8px}#rack-webprofiler #sidebar .sidebar__item .icn img{fill:red}#rack-webprofiler #sidebar .sidebar__item i,#rack-webprofiler #sidebar .sidebar__item span{vertical-align:middle;font-weight:600;color:#f3fcf0}#rack-webprofiler #wrapper{box-sizing:border-box;width:100%;min-height:calc(100% - 80px);padding:20px;margin-bottom:50px}#rack-webprofiler .wrapper__container{box-sizing:border-box;width:100%;min-height:100%;padding:15px;border:1px #e6e6e6 solid;background-color:#fff}#rack-webprofiler .wrapper__container a{color:#444}#rack-webprofiler .wrapper__container a:hover{color:#666}
@@ -0,0 +1,60 @@
1
+ @font-face {
2
+ font-family: 'Open Sans';
3
+ font-style: normal;
4
+ font-weight: 300;
5
+ src: local('Open Sans Light'), local('OpenSans-Light'), url("https://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTRampu5_7CjHW5spxoeN3Vs.woff2") format('woff2');
6
+ }
7
+ @font-face {
8
+ font-family: 'Open Sans';
9
+ font-style: normal;
10
+ font-weight: 400;
11
+ src: local('Open Sans'), local('OpenSans'), url("https://fonts.gstatic.com/s/opensans/v13/cJZKeOuBrn4kERxqtaUH3ZBw1xU1rKptJj_0jans920.woff2") format('woff2');
12
+ }
13
+ @font-face {
14
+ font-family: 'Open Sans';
15
+ font-style: normal;
16
+ font-weight: 600;
17
+ src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url("https://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNShampu5_7CjHW5spxoeN3Vs.woff2") format('woff2');
18
+ }
19
+ @font-face {
20
+ font-family: 'Open Sans';
21
+ font-style: normal;
22
+ font-weight: 700;
23
+ src: local('Open Sans Bold'), local('OpenSans-Bold'), url("https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzBampu5_7CjHW5spxoeN3Vs.woff2") format('woff2');
24
+ }
25
+ @font-face {
26
+ font-family: 'Open Sans';
27
+ font-style: normal;
28
+ font-weight: 800;
29
+ src: local('Open Sans Extrabold'), local('OpenSans-Extrabold'), url("https://fonts.gstatic.com/s/opensans/v13/EInbV5DfGHOiMmvb1Xr-hhampu5_7CjHW5spxoeN3Vs.woff2") format('woff2');
30
+ }
31
+ @font-face {
32
+ font-family: 'Open Sans';
33
+ font-style: italic;
34
+ font-weight: 300;
35
+ src: local('Open Sans Light Italic'), local('OpenSansLight-Italic'), url("https://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxtTIkQYohD4BpHvJ3NvbHoA.woff2") format('woff2');
36
+ }
37
+ @font-face {
38
+ font-family: 'Open Sans';
39
+ font-style: italic;
40
+ font-weight: 400;
41
+ src: local('Open Sans Italic'), local('OpenSans-Italic'), url("https://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBogp9Q8gbYrhqGlRav_IXfk.woff2") format('woff2');
42
+ }
43
+ @font-face {
44
+ font-family: 'Open Sans';
45
+ font-style: italic;
46
+ font-weight: 600;
47
+ src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url("https://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxsiAiQ_a33snTsJhwZvMEaI.woff2") format('woff2');
48
+ }
49
+ @font-face {
50
+ font-family: 'Open Sans';
51
+ font-style: italic;
52
+ font-weight: 700;
53
+ src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), url("https://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxv79_ZuUxCigM2DespTnFaw.woff2") format('woff2');
54
+ }
55
+ @font-face {
56
+ font-family: 'Open Sans';
57
+ font-style: italic;
58
+ font-weight: 800;
59
+ src: local('Open Sans Extrabold Italic'), local('OpenSans-ExtraboldItalic'), url("https://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxmPkvcX8kXDzy1NrkNCBkJ4.woff2") format('woff2');
60
+ }
@@ -0,0 +1,4 @@
1
+
2
+ @mixin normalize() {
3
+ /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */img,legend{border:0}legend,td,th{padding:0}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre,textarea{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}table{border-collapse:collapse;border-spacing:0}
4
+ }
@@ -0,0 +1,11 @@
1
+ $dark_blue: #1c1f33;
2
+ $dark_blue_light: #282f4c;
3
+
4
+ $fonts: "Open Sans", "Helvetica Neue", Arial, sans-serif;
5
+
6
+ $profiler_bar_background: $dark_blue;
7
+ $profiler_bar_border: $dark_blue_light;
8
+ $profiler_bar__item_hover: $dark_blue_light;
9
+
10
+ $profiler_panel__sidebar_background: $dark_blue;
11
+ $profiler_panel__sidebar_item_hover: $dark_blue_light;
@@ -0,0 +1,186 @@
1
+ @import "variables";
2
+ @import "fonts";
3
+ @import "normalize";
4
+
5
+ #rack-webprofiler-bar {
6
+ position: fixed;
7
+ left: 0;
8
+ bottom: 0;
9
+ font-family: $fonts;
10
+ height: 46px;
11
+
12
+ @include normalize;
13
+
14
+ * {
15
+ -webkit-font-smoothing: antialiased;
16
+ -moz-osx-font-smoothing: grayscale;
17
+ -moz-osx-font-smooth: grayscale;
18
+ margin: 0;
19
+ padding: 0;
20
+ }
21
+
22
+ a {
23
+ text-decoration: none;
24
+ }
25
+
26
+ &.rack-webprofiler--long {
27
+ width: 100%;
28
+ background-color: $profiler_bar_background;
29
+ }
30
+ .rack-webprofiler__wrapper {
31
+ display: table;
32
+ }
33
+ .rack-webprofiler__item {
34
+ box-sizing: border-box;
35
+ display: table-cell;
36
+ height: 40px;
37
+ padding: 10px;
38
+ position: relative;
39
+ background-color: $profiler_bar_background;
40
+ border-top: 1px $profiler_bar_border solid;
41
+ border-right: 1px $profiler_bar_border solid;
42
+
43
+ a {
44
+ width: 100%;
45
+ height: 100%;
46
+ display: inline-block;
47
+ }
48
+ }
49
+ .rack-webprofiler__item--has-drop {
50
+ cursor: pointer;
51
+ }
52
+ .rack-webprofiler__item:hover {
53
+ background-color: $profiler_bar__item_hover;
54
+ }
55
+ .rack-webprofiler__item:hover .rack-webprofiler__item__drop {
56
+ display: block;
57
+ }
58
+ .rack-webprofiler__item i.icn {
59
+ display: inline-block;
60
+ vertical-align: middle;
61
+ padding-left: 2px;
62
+ padding-right: 5px;
63
+ }
64
+ .rack-webprofiler__item--close {
65
+ width: 45px;
66
+ text-align: center;
67
+ -webkit-user-select: none;
68
+ user-select: none;
69
+ cursor: pointer;
70
+ }
71
+ .rack-webprofiler__item--close i.icn {
72
+ padding: 0px;
73
+ }
74
+ .rack-webprofiler__item__label,
75
+ .rack-webprofiler__item__value {
76
+ font-weight: 600;
77
+ font-size: 0.875em;
78
+ color: #c4c2cc;
79
+ }
80
+ .rack-webprofiler__item__value {
81
+ color: #f3fcf0;
82
+ vertical-align: middle;
83
+ }
84
+ .rack-webprofiler__item__status-color {
85
+ display: block;
86
+ width: 100%;
87
+ height: 4px;
88
+ position: absolute;
89
+ left: 0;
90
+ bottom: 0;
91
+ }
92
+ .rack-webprofiler__item__status-color.success {
93
+ background-color: #7ed321;
94
+ }
95
+ .rack-webprofiler__item__status-color.warning {
96
+ background-color: #f8e71c;
97
+ }
98
+ .rack-webprofiler__item__status-color.error {
99
+ background-color: #d92b2e;
100
+ }
101
+ .rack-webprofiler__item__drop {
102
+ display: none;
103
+ width: 100%;
104
+ height: 1px;
105
+ position: absolute;
106
+ top: -1px;
107
+ left: -1px;
108
+ }
109
+ .rack-webprofiler__item__drop .rack-webprofiler__item__value {
110
+ font-weight: 400;
111
+ }
112
+ .rack-webprofiler__item__drop .rack-webprofiler__item__drop__wrapper {
113
+ box-sizing: border-box;
114
+ min-width: 100%;
115
+ padding: 10px;
116
+ border: 1px #282f4c solid;
117
+ border-bottom: 0;
118
+ background-color: #202540;
119
+ white-space: nowrap;
120
+ position: absolute;
121
+ left: 0;
122
+ bottom: 0;
123
+ }
124
+ .rack-webprofiler__item__drop--list .rack-webprofiler__item__drop__wrapper .rack-webprofiler__item__label {
125
+ color: #c4c2cc;
126
+ }
127
+ .rack-webprofiler__item__drop--list .rack-webprofiler__item__drop__wrapper .rack-webprofiler__item__value {
128
+ padding-left: 10px;
129
+ color: #f3fcf0;
130
+ }
131
+ .rack-webprofiler__item__drop--list .rack-webprofiler__item__drop__wrapper th,
132
+ .rack-webprofiler__item__drop--list .rack-webprofiler__item__drop__wrapper td {
133
+ text-align: left;
134
+ white-space: nowrap;
135
+ }
136
+ }
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+ /*#rack-webprofiler {
145
+ position: fixed;
146
+ bottom: 0;
147
+ left: 0;
148
+ width: 100%;
149
+ height: 40px;
150
+
151
+ background-color: #1c1f33;
152
+ color: #f3fcf0;
153
+ font-family: "Helvetica Neue", Arial, sans-serif;
154
+ font-size: 14px;
155
+ }
156
+
157
+ #rack-webprofiler .rack-webprofiler_collectors {
158
+ height: 40px;
159
+ }
160
+
161
+ #rack-webprofiler .rack-webprofiler_collectors > .rack-webprofiler_collector {
162
+ float: left;
163
+ padding: 0 10px;
164
+ border: 1px solid #282f4c;
165
+ height: 38px;
166
+ line-height: 40px;
167
+ }
168
+
169
+ #rack-webprofiler .rack-webprofiler_collectors .rack-webprofiler_collector img {
170
+ width: 20px;
171
+ height: 20px;
172
+ position: relative;
173
+ top: 4px;
174
+ }
175
+ #rack-webprofiler .rack-webprofiler_collectors .rack-webprofiler_collector.error,
176
+ #rack-webprofiler .rack-webprofiler_collectors .rack-webprofiler_collector.success {
177
+ height: 35px;
178
+ border-bottom-style: solid;
179
+ border-bottom-width: 4px;
180
+ }
181
+ #rack-webprofiler .rack-webprofiler_collectors .rack-webprofiler_collector.error {
182
+ border-bottom-color: #ff2851;
183
+ }
184
+ #rack-webprofiler .rack-webprofiler_collectors .rack-webprofiler_collector.success {
185
+ border-bottom-color: #44db5e;
186
+ }*/
@@ -0,0 +1,266 @@
1
+ @import "variables";
2
+ @import "normalize";
3
+
4
+ // #rack-webprofiler-bar {
5
+ // top: 0;
6
+ // }
7
+ @include normalize;
8
+
9
+ body {
10
+ // margin-top: 45px;
11
+ font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
12
+ }
13
+
14
+ #rack-webprofiler {
15
+ // may be useless
16
+ position: absolute;
17
+ width: 100%;
18
+ height: 100%;
19
+ //
20
+
21
+ &, * {
22
+ -webkit-font-smoothing: antialiased;
23
+ -moz-osx-font-smoothing: grayscale;
24
+ -moz-osx-font-smooth: grayscale;
25
+ }
26
+
27
+ a {
28
+ text-decoration: none;
29
+ }
30
+
31
+ .block {
32
+ margin-bottom: 35px;
33
+ }
34
+ .block h1 {
35
+ margin-bottom: 25px;
36
+ text-align: left;
37
+ text-transform: none;
38
+ font-family: "Open Sans";
39
+ font-weight: 700;
40
+ font-size: 1.125em;
41
+ color: #1c1f33;
42
+ }
43
+
44
+ .block table {
45
+ width: calc(100% - 2px);
46
+ border-collapse: collapse;
47
+ outline: 1px #979797 solid;
48
+ }
49
+ .block table th,
50
+ .block table td {
51
+ padding: 6px 9px;
52
+ border: 1px #d8d8d8 solid;
53
+ font-size: 0.75em;
54
+ }
55
+ .block table th:first-child,
56
+ .block table td:first-child {
57
+ border-left-width: 0;
58
+ }
59
+ .block table th:last-child,
60
+ .block table td:last-child {
61
+ border-right-width: 0;
62
+ }
63
+ .block table thead tr:first-child th,
64
+ .block table thead tr:first-child td {
65
+ border-top-width: 0;
66
+ }
67
+ .block table tbody tr:last-child th,
68
+ .block table tbody tr:last-child td {
69
+ border-bottom-width: 0;
70
+ }
71
+ .block table th {
72
+ // width: 20%;
73
+ background-color: #ececec;
74
+ text-align: left;
75
+ font-weight: 400;
76
+ color: #1c1f33;
77
+ }
78
+ .block table td {
79
+ // width: 80%;
80
+ }
81
+ .block table thead th {
82
+ text-transform: capitalize;
83
+ }
84
+ .block table td.code {
85
+ font-family: "Courier New";
86
+ }
87
+
88
+ .block p {
89
+ text-align: left;
90
+ text-transform: none;
91
+ font-size: 0.875em;
92
+ line-height: 1.4em;
93
+ color: #666370;
94
+ }
95
+ .block.block--text .text__no-value {
96
+ font-style: italic;
97
+ }
98
+
99
+ .block.block--summary table {
100
+ width: 100%;
101
+ border-collapse: collapse;
102
+ }
103
+ .block.block--summary table th {
104
+ text-align: left;
105
+ line-height: 1.4em;
106
+ font-weight: 400;
107
+ font-size: 0.875em;
108
+ color: #666370;
109
+ }
110
+ .block.block--summary .value,
111
+ .block.block--summary .unit {
112
+ font-size: 1.25em;
113
+ }
114
+ .block.block--summary .value {
115
+ color: #45425a;
116
+ }
117
+ .block.block--summary .unit {
118
+ color: #9b9b9b;
119
+ }
120
+
121
+ .header__section {
122
+ display: table;
123
+ width: 100%;
124
+ height: 40px;
125
+ color: #fff;
126
+ font-size: 1em;
127
+ font-weight: 300;
128
+ background-color: #ff2851;
129
+
130
+ &:nth-child(even) {
131
+ background-color: #e62548;
132
+ }
133
+ &.header__section--blank:before {
134
+ content: "";
135
+ }
136
+ span {
137
+ box-sizing: border-box;
138
+ display: table-cell;
139
+ vertical-align: middle;
140
+ padding-left: 20px;
141
+
142
+ a {
143
+ color: #f3fcf0;
144
+ text-decoration: none;
145
+ }
146
+ }
147
+ }
148
+
149
+ #main {
150
+ overflow-y: auto;
151
+ width: calc(100% - 162px);
152
+ height: 100%;
153
+ float: left;
154
+ }
155
+
156
+ // Sidebar
157
+ #sidebar {
158
+ width: 162px;
159
+ height: 100%;
160
+ float: left;
161
+ background-color: $profiler_panel__sidebar_background;
162
+
163
+ .sidebar__header {
164
+ height: 80px;
165
+ border-bottom: 1px #26304b solid;
166
+ text-align: center;
167
+
168
+ &:before {
169
+ content: "";
170
+ display: inline-block;
171
+ height: 100%;
172
+ vertical-align: middle;
173
+ margin-left: -0.25em;
174
+ }
175
+ .sidebar__header__wrapper {
176
+ display: inline-block;
177
+ vertical-align: middle;
178
+ }
179
+ span {
180
+ display: block;
181
+ font-size: 1em;
182
+ color: #f3fcf0;
183
+ }
184
+ .sidebar__header__title {
185
+ margin-top: 15px;
186
+
187
+ a {
188
+ color: #f3fcf0;
189
+ text-decoration: none;
190
+ }
191
+ }
192
+ }
193
+
194
+ .sidebar__item {
195
+ display: table;
196
+ width: 100%;
197
+ height: 40px;
198
+ border-bottom: 1px #26304b solid;
199
+ -webkit-user-select: none;
200
+ user-select: none;
201
+
202
+ &:hover {
203
+ background-color: $profiler_panel__sidebar_item_hover;
204
+ }
205
+ &.sidebar__item--blank {
206
+ display: block;
207
+
208
+ // &:hover {
209
+ // background-color: none;
210
+ // }
211
+ }
212
+
213
+ .sidebar__item-inner {
214
+ display: table-cell;
215
+ vertical-align: middle;
216
+
217
+ a {
218
+ width: 100%;
219
+ height: 100%;
220
+ display: inline-block;
221
+ }
222
+ // a:hover .sidebar__item span {
223
+ //
224
+ // }
225
+ }
226
+ .icn {
227
+ display: inline-block;
228
+ vertical-align: middle;
229
+ padding: 0px 8px;
230
+
231
+ img {
232
+ fill: red;
233
+ }
234
+ }
235
+ i, span {
236
+ vertical-align: middle;
237
+ font-weight: 600;
238
+ color: #f3fcf0;
239
+ }
240
+ }
241
+ }
242
+
243
+ #wrapper {
244
+ box-sizing: border-box;
245
+ width: 100%;
246
+ min-height: calc(100% - 80px);
247
+ padding: 20px;
248
+ margin-bottom: 50px;
249
+ }
250
+ .wrapper__container {
251
+ box-sizing: border-box;
252
+ width: 100%;
253
+ min-height: 100%;
254
+ padding: 15px;
255
+ border: 1px #e6e6e6 solid;
256
+ background-color: #fff;
257
+
258
+ a {
259
+ color: #444;
260
+
261
+ &:hover {
262
+ color: #666;
263
+ }
264
+ }
265
+ }
266
+ }
@@ -0,0 +1,36 @@
1
+ <aside id="sidebar">
2
+ <header class="sidebar__header">
3
+ <div class="sidebar__header__wrapper">
4
+ <span class="sidebar__header__icn"><img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+ICAgICAgICA8dGl0bGU+VHJpYW5nbGUgMTwvdGl0bGU+ICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiAgICA8ZGVmcz48L2RlZnM+ICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgICAgICAgPGcgaWQ9IkRlc2t0b3AtMiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTcxLjAwMDAwMCwgLTEwLjAwMDAwMCkiIGZpbGw9IiNGRkZGRkYiPiAgICAgICAgICAgIDxwYXRoIGQ9Ik04MSwzMCBMNzEsMTUgTDkxLDE1IEw4MSwzMCBaIE05MSwxNCBMNzEsMTQgTDc1LDEwIEw4NywxMCBMOTEsMTQgWiIgaWQ9IlRyaWFuZ2xlLTEiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==" alt=""></span>
5
+ <span class="sidebar__header__title">
6
+ <a href="<%= WebProfiler::Router.url_for_profiler %>">Profiler</a>
7
+ </span>
8
+ </div>
9
+ </header>
10
+
11
+ <div class="sidebar__item sidebar__item--blank"></div>
12
+
13
+ <% unless @collectors.nil? %>
14
+ <% @collectors.each do |_k, collector| %>
15
+ <div class="sidebar__item">
16
+ <div class="sidebar__item-inner">
17
+ <a href="<%= WebProfiler::Router.url_for_profiler(@collection.token, collector.name) %>">
18
+ <i class="icn">
19
+ <% unless collector.icon.nil? %><img alt="" src="<%= collector.icon %>" /><% end %>
20
+ </i>
21
+ <span><%= collector.name %></span>
22
+ </a>
23
+ </div>
24
+ </div>
25
+ <% end %>
26
+ <% else %>
27
+ <div class="sidebar__item">
28
+ <div class="sidebar__item-inner">
29
+ <a href="<%= WebProfiler::Router.url_for_clean_profiler %>">
30
+ <i class="icn"></i>
31
+ <span>Cleanup database</span>
32
+ </a>
33
+ </div>
34
+ </div>
35
+ <% end %>
36
+ </aside>