rails-pretty-logger 0.1.0 → 0.2.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 +18 -1
- data/app/assets/javascripts/rails/pretty/logger/application.js +13 -0
- data/app/assets/javascripts/rails/pretty/logger/list.min.js +2 -0
- data/app/assets/stylesheets/rails/pretty/logger/dashboards.css +126 -112
- data/app/assets/stylesheets/rails/pretty/logger/list.css +94 -0
- data/app/controllers/rails/pretty/logger/dashboards_controller.rb +11 -2
- data/app/controllers/rails/pretty/logger/hourly_logs_controller.rb +30 -0
- data/app/helpers/rails/pretty/logger/application_helper.rb +9 -0
- data/app/helpers/rails/pretty/logger/dashboards_helper.rb +7 -9
- data/app/views/partials/_error_pagination.html.erb +21 -0
- data/app/views/partials/_navbar.html.erb +14 -0
- data/app/views/rails/pretty/logger/dashboards/index.html.erb +25 -17
- data/app/views/rails/pretty/logger/dashboards/logs.html.erb +2 -33
- data/app/views/rails/pretty/logger/hourly_logs/index.html.erb +39 -0
- data/app/views/rails/pretty/logger/hourly_logs/logs.html.erb +37 -0
- data/config/routes.rb +6 -0
- data/lib/rails/pretty/logger.rb +117 -127
- data/lib/rails/pretty/logger/active_support_logger.rb +107 -0
- data/lib/rails/pretty/logger/config/logger_config.rb +17 -0
- data/lib/rails/pretty/logger/console_formatter.rb +14 -0
- data/lib/rails/pretty/logger/console_logger.rb +14 -0
- data/lib/rails/pretty/logger/engine.rb +2 -5
- data/lib/rails/pretty/logger/rails_logger.rb +153 -0
- data/lib/rails/pretty/logger/version.rb +1 -1
- metadata +20 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7acf4d8e8fac238681470c78bf56b504062f7244
|
4
|
+
data.tar.gz: 67b3952e809cde6091e20277e6532bff1b6ffc90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b85f59676bb1e5c5fcdcbe3f1559418d0f1f6ba3c7bb9292849e93e1bc5536e28c5cedf782d831bc26b1fa1de0ec6e97f80449b02178809d235270836f4ad249
|
7
|
+
data.tar.gz: ca0b8c8fbfd2c1002b1680763eed91129e6a1f5299f013e5873ac95b00191949b8a14ec52092a2d3ad0b156de65aecb8cdaa83eaa77c291310d4a0d66ce46cfb
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Rails::Pretty::Logger
|
2
|
-
Pretty Logger is a logging framework which can be checked from
|
2
|
+
Pretty Logger is a logging framework which can be checked from webpage, and also you can also debug easily with highlight method. You can also override logger class woth Pretty logger so you can keep hourly logs, which can be limited as you wish.
|
3
3
|
|
4
4
|
## Usage
|
5
5
|
visit http://your-webpage/rails-pretty-logger/dashboards/ then choose your environment, which you want to check and also you can set date range for narrowing down your logs.
|
@@ -12,6 +12,22 @@ PrettyLogger.highlight("lorem ipsum")
|
|
12
12
|
```
|
13
13
|
![](highlight.gif)
|
14
14
|
|
15
|
+
#### Use Hourly Log Rotation
|
16
|
+
|
17
|
+
Add these lines below to environment config file which you want to override its logger, first argument for name of the log file, second argument for keeping hourly logs, file count for limiting the logs files.
|
18
|
+
|
19
|
+
Rails::Pretty::Logger::ConsoleLogger.new("rails-pretty-logger", "hourly", file_count: 48)
|
20
|
+
|
21
|
+
```
|
22
|
+
#/config/environments/development.rb
|
23
|
+
|
24
|
+
require "rails/pretty/logger/config/logger_config"
|
25
|
+
|
26
|
+
logger_file = ActiveSupport::TaggedLogging.new(Rails::Pretty::Logger::ConsoleLogger.new("rails-pretty-logger", "hourly", file_count: 48))
|
27
|
+
config.logger = logger_file
|
28
|
+
```
|
29
|
+
![](hour.gif)
|
30
|
+
|
15
31
|
## Installation
|
16
32
|
Add this line to your application's Gemfile:
|
17
33
|
|
@@ -34,6 +50,7 @@ Mount the engine in your config/routes.rb:
|
|
34
50
|
mount Rails::Pretty::Logger::Engine => "/rails-pretty-logger"
|
35
51
|
```
|
36
52
|
|
53
|
+
|
37
54
|
## Contributing
|
38
55
|
|
39
56
|
1. [Fork][fork] the [official repository][repo].
|
@@ -10,5 +10,18 @@
|
|
10
10
|
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
11
|
// about supported directives.
|
12
12
|
//
|
13
|
+
//= require rails/pretty/logger/list.min
|
13
14
|
//= require rails-ujs
|
14
15
|
//= require_tree .
|
16
|
+
|
17
|
+
|
18
|
+
window.onload = function(){
|
19
|
+
|
20
|
+
var options = {
|
21
|
+
valueNames: [ 'name'],
|
22
|
+
page: 12,
|
23
|
+
pagination: true
|
24
|
+
};
|
25
|
+
|
26
|
+
var logList = new List('hourly', options);
|
27
|
+
}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! List.js v1.5.0 (http://listjs.com) by Jonny Strömberg (http://javve.com) */
|
2
|
+
var List=function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=11)}([function(t,e,r){function n(t){if(!t||!t.nodeType)throw new Error("A DOM element reference is required");this.el=t,this.list=t.classList}var i=r(4),s=/\s+/;Object.prototype.toString;t.exports=function(t){return new n(t)},n.prototype.add=function(t){if(this.list)return this.list.add(t),this;var e=this.array(),r=i(e,t);return~r||e.push(t),this.el.className=e.join(" "),this},n.prototype.remove=function(t){if(this.list)return this.list.remove(t),this;var e=this.array(),r=i(e,t);return~r&&e.splice(r,1),this.el.className=e.join(" "),this},n.prototype.toggle=function(t,e){return this.list?("undefined"!=typeof e?e!==this.list.toggle(t,e)&&this.list.toggle(t):this.list.toggle(t),this):("undefined"!=typeof e?e?this.add(t):this.remove(t):this.has(t)?this.remove(t):this.add(t),this)},n.prototype.array=function(){var t=this.el.getAttribute("class")||"",e=t.replace(/^\s+|\s+$/g,""),r=e.split(s);return""===r[0]&&r.shift(),r},n.prototype.has=n.prototype.contains=function(t){return this.list?this.list.contains(t):!!~i(this.array(),t)}},function(t,e,r){var n=window.addEventListener?"addEventListener":"attachEvent",i=window.removeEventListener?"removeEventListener":"detachEvent",s="addEventListener"!==n?"on":"",a=r(5);e.bind=function(t,e,r,i){t=a(t);for(var o=0;o<t.length;o++)t[o][n](s+e,r,i||!1)},e.unbind=function(t,e,r,n){t=a(t);for(var o=0;o<t.length;o++)t[o][i](s+e,r,n||!1)}},function(t,e){t.exports=function(t){return function(e,r,n){var i=this;this._values={},this.found=!1,this.filtered=!1;var s=function(e,r,n){if(void 0===r)n?i.values(e,n):i.values(e);else{i.elm=r;var s=t.templater.get(i,e);i.values(s)}};this.values=function(e,r){if(void 0===e)return i._values;for(var n in e)i._values[n]=e[n];r!==!0&&t.templater.set(i,i.values())},this.show=function(){t.templater.show(i)},this.hide=function(){t.templater.hide(i)},this.matching=function(){return t.filtered&&t.searched&&i.found&&i.filtered||t.filtered&&!t.searched&&i.filtered||!t.filtered&&t.searched&&i.found||!t.filtered&&!t.searched},this.visible=function(){return!(!i.elm||i.elm.parentNode!=t.list)},s(e,r,n)}}},function(t,e){var r=function(t,e,r){return r?t.getElementsByClassName(e)[0]:t.getElementsByClassName(e)},n=function(t,e,r){return e="."+e,r?t.querySelector(e):t.querySelectorAll(e)},i=function(t,e,r){for(var n=[],i="*",s=t.getElementsByTagName(i),a=s.length,o=new RegExp("(^|\\s)"+e+"(\\s|$)"),l=0,u=0;l<a;l++)if(o.test(s[l].className)){if(r)return s[l];n[u]=s[l],u++}return n};t.exports=function(){return function(t,e,s,a){return a=a||{},a.test&&a.getElementsByClassName||!a.test&&document.getElementsByClassName?r(t,e,s):a.test&&a.querySelector||!a.test&&document.querySelector?n(t,e,s):i(t,e,s)}}()},function(t,e){var r=[].indexOf;t.exports=function(t,e){if(r)return t.indexOf(e);for(var n=0;n<t.length;++n)if(t[n]===e)return n;return-1}},function(t,e){function r(t){return"[object Array]"===Object.prototype.toString.call(t)}t.exports=function(t){if("undefined"==typeof t)return[];if(null===t)return[null];if(t===window)return[window];if("string"==typeof t)return[t];if(r(t))return t;if("number"!=typeof t.length)return[t];if("function"==typeof t&&t instanceof Function)return[t];for(var e=[],n=0;n<t.length;n++)(Object.prototype.hasOwnProperty.call(t,n)||n in t)&&e.push(t[n]);return e.length?e:[]}},function(t,e){t.exports=function(t){return t=void 0===t?"":t,t=null===t?"":t,t=t.toString()}},function(t,e){t.exports=function(t){for(var e,r=Array.prototype.slice.call(arguments,1),n=0;e=r[n];n++)if(e)for(var i in e)t[i]=e[i];return t}},function(t,e){t.exports=function(t){var e=function(r,n,i){var s=r.splice(0,50);i=i||[],i=i.concat(t.add(s)),r.length>0?setTimeout(function(){e(r,n,i)},1):(t.update(),n(i))};return e}},function(t,e){t.exports=function(t){return t.handlers.filterStart=t.handlers.filterStart||[],t.handlers.filterComplete=t.handlers.filterComplete||[],function(e){if(t.trigger("filterStart"),t.i=1,t.reset.filter(),void 0===e)t.filtered=!1;else{t.filtered=!0;for(var r=t.items,n=0,i=r.length;n<i;n++){var s=r[n];e(s)?s.filtered=!0:s.filtered=!1}}return t.update(),t.trigger("filterComplete"),t.visibleItems}}},function(t,e,r){var n=(r(0),r(1)),i=r(7),s=r(6),a=r(3),o=r(19);t.exports=function(t,e){e=e||{},e=i({location:0,distance:100,threshold:.4,multiSearch:!0,searchClass:"fuzzy-search"},e);var r={search:function(n,i){for(var s=e.multiSearch?n.replace(/ +$/,"").split(/ +/):[n],a=0,o=t.items.length;a<o;a++)r.item(t.items[a],i,s)},item:function(t,e,n){for(var i=!0,s=0;s<n.length;s++){for(var a=!1,o=0,l=e.length;o<l;o++)r.values(t.values(),e[o],n[s])&&(a=!0);a||(i=!1)}t.found=i},values:function(t,r,n){if(t.hasOwnProperty(r)){var i=s(t[r]).toLowerCase();if(o(i,n,e))return!0}return!1}};return n.bind(a(t.listContainer,e.searchClass),"keyup",function(e){var n=e.target||e.srcElement;t.search(n.value,r.search)}),function(e,n){t.search(e,n,r.search)}}},function(t,e,r){var n=r(18),i=r(3),s=r(7),a=r(4),o=r(1),l=r(6),u=r(0),c=r(17),f=r(5);t.exports=function(t,e,h){var d,v=this,m=r(2)(v),g=r(8)(v),p=r(12)(v);d={start:function(){v.listClass="list",v.searchClass="search",v.sortClass="sort",v.page=1e4,v.i=1,v.items=[],v.visibleItems=[],v.matchingItems=[],v.searched=!1,v.filtered=!1,v.searchColumns=void 0,v.handlers={updated:[]},v.valueNames=[],v.utils={getByClass:i,extend:s,indexOf:a,events:o,toString:l,naturalSort:n,classes:u,getAttribute:c,toArray:f},v.utils.extend(v,e),v.listContainer="string"==typeof t?document.getElementById(t):t,v.listContainer&&(v.list=i(v.listContainer,v.listClass,!0),v.parse=r(13)(v),v.templater=r(16)(v),v.search=r(14)(v),v.filter=r(9)(v),v.sort=r(15)(v),v.fuzzySearch=r(10)(v,e.fuzzySearch),this.handlers(),this.items(),this.pagination(),v.update())},handlers:function(){for(var t in v.handlers)v[t]&&v.on(t,v[t])},items:function(){v.parse(v.list),void 0!==h&&v.add(h)},pagination:function(){if(void 0!==e.pagination){e.pagination===!0&&(e.pagination=[{}]),void 0===e.pagination[0]&&(e.pagination=[e.pagination]);for(var t=0,r=e.pagination.length;t<r;t++)p(e.pagination[t])}}},this.reIndex=function(){v.items=[],v.visibleItems=[],v.matchingItems=[],v.searched=!1,v.filtered=!1,v.parse(v.list)},this.toJSON=function(){for(var t=[],e=0,r=v.items.length;e<r;e++)t.push(v.items[e].values());return t},this.add=function(t,e){if(0!==t.length){if(e)return void g(t,e);var r=[],n=!1;void 0===t[0]&&(t=[t]);for(var i=0,s=t.length;i<s;i++){var a=null;n=v.items.length>v.page,a=new m(t[i],void 0,n),v.items.push(a),r.push(a)}return v.update(),r}},this.show=function(t,e){return this.i=t,this.page=e,v.update(),v},this.remove=function(t,e,r){for(var n=0,i=0,s=v.items.length;i<s;i++)v.items[i].values()[t]==e&&(v.templater.remove(v.items[i],r),v.items.splice(i,1),s--,i--,n++);return v.update(),n},this.get=function(t,e){for(var r=[],n=0,i=v.items.length;n<i;n++){var s=v.items[n];s.values()[t]==e&&r.push(s)}return r},this.size=function(){return v.items.length},this.clear=function(){return v.templater.clear(),v.items=[],v},this.on=function(t,e){return v.handlers[t].push(e),v},this.off=function(t,e){var r=v.handlers[t],n=a(r,e);return n>-1&&r.splice(n,1),v},this.trigger=function(t){for(var e=v.handlers[t].length;e--;)v.handlers[t][e](v);return v},this.reset={filter:function(){for(var t=v.items,e=t.length;e--;)t[e].filtered=!1;return v},search:function(){for(var t=v.items,e=t.length;e--;)t[e].found=!1;return v}},this.update=function(){var t=v.items,e=t.length;v.visibleItems=[],v.matchingItems=[],v.templater.clear();for(var r=0;r<e;r++)t[r].matching()&&v.matchingItems.length+1>=v.i&&v.visibleItems.length<v.page?(t[r].show(),v.visibleItems.push(t[r]),v.matchingItems.push(t[r])):t[r].matching()?(v.matchingItems.push(t[r]),t[r].hide()):t[r].hide();return v.trigger("updated"),v},d.start()}},function(t,e,r){var n=r(0),i=r(1),s=r(11);t.exports=function(t){var e=function(e,i){var s,o=t.matchingItems.length,l=t.i,u=t.page,c=Math.ceil(o/u),f=Math.ceil(l/u),h=i.innerWindow||2,d=i.left||i.outerWindow||0,v=i.right||i.outerWindow||0;v=c-v,e.clear();for(var m=1;m<=c;m++){var g=f===m?"active":"";r.number(m,d,v,f,h)?(s=e.add({page:m,dotted:!1})[0],g&&n(s.elm).add(g),a(s.elm,m,u)):r.dotted(e,m,d,v,f,h,e.size())&&(s=e.add({page:"...",dotted:!0})[0],n(s.elm).add("disabled"))}},r={number:function(t,e,r,n,i){return this.left(t,e)||this.right(t,r)||this.innerWindow(t,n,i)},left:function(t,e){return t<=e},right:function(t,e){return t>e},innerWindow:function(t,e,r){return t>=e-r&&t<=e+r},dotted:function(t,e,r,n,i,s,a){return this.dottedLeft(t,e,r,n,i,s)||this.dottedRight(t,e,r,n,i,s,a)},dottedLeft:function(t,e,r,n,i,s){return e==r+1&&!this.innerWindow(e,i,s)&&!this.right(e,n)},dottedRight:function(t,e,r,n,i,s,a){return!t.items[a-1].values().dotted&&(e==n&&!this.innerWindow(e,i,s)&&!this.right(e,n))}},a=function(e,r,n){i.bind(e,"click",function(){t.show((r-1)*n+1,n)})};return function(r){var n=new s(t.listContainer.id,{listClass:r.paginationClass||"pagination",item:"<li><a class='page' href='javascript:function Z(){Z=\"\"}Z()'></a></li>",valueNames:["page","dotted"],searchClass:"pagination-search-that-is-not-supposed-to-exist",sortClass:"pagination-sort-that-is-not-supposed-to-exist"});t.on("updated",function(){e(n,r)}),e(n,r)}}},function(t,e,r){t.exports=function(t){var e=r(2)(t),n=function(t){for(var e=t.childNodes,r=[],n=0,i=e.length;n<i;n++)void 0===e[n].data&&r.push(e[n]);return r},i=function(r,n){for(var i=0,s=r.length;i<s;i++)t.items.push(new e(n,r[i]))},s=function(e,r){var n=e.splice(0,50);i(n,r),e.length>0?setTimeout(function(){s(e,r)},1):(t.update(),t.trigger("parseComplete"))};return t.handlers.parseComplete=t.handlers.parseComplete||[],function(){var e=n(t.list),r=t.valueNames;t.indexAsync?s(e,r):i(e,r)}}},function(t,e){t.exports=function(t){var e,r,n,i,s={resetList:function(){t.i=1,t.templater.clear(),i=void 0},setOptions:function(t){2==t.length&&t[1]instanceof Array?r=t[1]:2==t.length&&"function"==typeof t[1]?(r=void 0,i=t[1]):3==t.length?(r=t[1],i=t[2]):r=void 0},setColumns:function(){0!==t.items.length&&void 0===r&&(r=void 0===t.searchColumns?s.toArray(t.items[0].values()):t.searchColumns)},setSearchString:function(e){e=t.utils.toString(e).toLowerCase(),e=e.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),n=e},toArray:function(t){var e=[];for(var r in t)e.push(r);return e}},a={list:function(){for(var e=0,r=t.items.length;e<r;e++)a.item(t.items[e])},item:function(t){t.found=!1;for(var e=0,n=r.length;e<n;e++)if(a.values(t.values(),r[e]))return void(t.found=!0)},values:function(r,i){return!!(r.hasOwnProperty(i)&&(e=t.utils.toString(r[i]).toLowerCase(),""!==n&&e.search(n)>-1))},reset:function(){t.reset.search(),t.searched=!1}},o=function(e){return t.trigger("searchStart"),s.resetList(),s.setSearchString(e),s.setOptions(arguments),s.setColumns(),""===n?a.reset():(t.searched=!0,i?i(n,r):a.list()),t.update(),t.trigger("searchComplete"),t.visibleItems};return t.handlers.searchStart=t.handlers.searchStart||[],t.handlers.searchComplete=t.handlers.searchComplete||[],t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"keyup",function(e){var r=e.target||e.srcElement,n=""===r.value&&!t.searched;n||o(r.value)}),t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"input",function(t){var e=t.target||t.srcElement;""===e.value&&o("")}),o}},function(t,e){t.exports=function(t){var e={els:void 0,clear:function(){for(var r=0,n=e.els.length;r<n;r++)t.utils.classes(e.els[r]).remove("asc"),t.utils.classes(e.els[r]).remove("desc")},getOrder:function(e){var r=t.utils.getAttribute(e,"data-order");return"asc"==r||"desc"==r?r:t.utils.classes(e).has("desc")?"asc":t.utils.classes(e).has("asc")?"desc":"asc"},getInSensitive:function(e,r){var n=t.utils.getAttribute(e,"data-insensitive");"false"===n?r.insensitive=!1:r.insensitive=!0},setOrder:function(r){for(var n=0,i=e.els.length;n<i;n++){var s=e.els[n];if(t.utils.getAttribute(s,"data-sort")===r.valueName){var a=t.utils.getAttribute(s,"data-order");"asc"==a||"desc"==a?a==r.order&&t.utils.classes(s).add(r.order):t.utils.classes(s).add(r.order)}}}},r=function(){t.trigger("sortStart");var r={},n=arguments[0].currentTarget||arguments[0].srcElement||void 0;n?(r.valueName=t.utils.getAttribute(n,"data-sort"),e.getInSensitive(n,r),r.order=e.getOrder(n)):(r=arguments[1]||r,r.valueName=arguments[0],r.order=r.order||"asc",r.insensitive="undefined"==typeof r.insensitive||r.insensitive),e.clear(),e.setOrder(r);var i,s=r.sortFunction||t.sortFunction||null,a="desc"===r.order?-1:1;i=s?function(t,e){return s(t,e,r)*a}:function(e,n){var i=t.utils.naturalSort;return i.alphabet=t.alphabet||r.alphabet||void 0,!i.alphabet&&r.insensitive&&(i=t.utils.naturalSort.caseInsensitive),i(e.values()[r.valueName],n.values()[r.valueName])*a},t.items.sort(i),t.update(),t.trigger("sortComplete")};return t.handlers.sortStart=t.handlers.sortStart||[],t.handlers.sortComplete=t.handlers.sortComplete||[],e.els=t.utils.getByClass(t.listContainer,t.sortClass),t.utils.events.bind(e.els,"click",r),t.on("searchStart",e.clear),t.on("filterStart",e.clear),r}},function(t,e){var r=function(t){var e,r=this,n=function(){e=r.getItemSource(t.item),e&&(e=r.clearSourceItem(e,t.valueNames))};this.clearSourceItem=function(e,r){for(var n=0,i=r.length;n<i;n++){var s;if(r[n].data)for(var a=0,o=r[n].data.length;a<o;a++)e.setAttribute("data-"+r[n].data[a],"");else r[n].attr&&r[n].name?(s=t.utils.getByClass(e,r[n].name,!0),s&&s.setAttribute(r[n].attr,"")):(s=t.utils.getByClass(e,r[n],!0),s&&(s.innerHTML=""));s=void 0}return e},this.getItemSource=function(e){if(void 0===e){for(var r=t.list.childNodes,n=0,i=r.length;n<i;n++)if(void 0===r[n].data)return r[n].cloneNode(!0)}else{if(/<tr[\s>]/g.exec(e)){var s=document.createElement("tbody");return s.innerHTML=e,s.firstChild}if(e.indexOf("<")!==-1){var a=document.createElement("div");return a.innerHTML=e,a.firstChild}var o=document.getElementById(t.item);if(o)return o}},this.get=function(e,n){r.create(e);for(var i={},s=0,a=n.length;s<a;s++){var o;if(n[s].data)for(var l=0,u=n[s].data.length;l<u;l++)i[n[s].data[l]]=t.utils.getAttribute(e.elm,"data-"+n[s].data[l]);else n[s].attr&&n[s].name?(o=t.utils.getByClass(e.elm,n[s].name,!0),i[n[s].name]=o?t.utils.getAttribute(o,n[s].attr):""):(o=t.utils.getByClass(e.elm,n[s],!0),i[n[s]]=o?o.innerHTML:"");o=void 0}return i},this.set=function(e,n){var i=function(e){for(var r=0,n=t.valueNames.length;r<n;r++)if(t.valueNames[r].data){for(var i=t.valueNames[r].data,s=0,a=i.length;s<a;s++)if(i[s]===e)return{data:e}}else{if(t.valueNames[r].attr&&t.valueNames[r].name&&t.valueNames[r].name==e)return t.valueNames[r];if(t.valueNames[r]===e)return e}},s=function(r,n){var s,a=i(r);a&&(a.data?e.elm.setAttribute("data-"+a.data,n):a.attr&&a.name?(s=t.utils.getByClass(e.elm,a.name,!0),s&&s.setAttribute(a.attr,n)):(s=t.utils.getByClass(e.elm,a,!0),s&&(s.innerHTML=n)),s=void 0)};if(!r.create(e))for(var a in n)n.hasOwnProperty(a)&&s(a,n[a])},this.create=function(t){if(void 0!==t.elm)return!1;if(void 0===e)throw new Error("The list need to have at list one item on init otherwise you'll have to add a template.");var n=e.cloneNode(!0);return n.removeAttribute("id"),t.elm=n,r.set(t,t.values()),!0},this.remove=function(e){e.elm.parentNode===t.list&&t.list.removeChild(e.elm)},this.show=function(e){r.create(e),t.list.appendChild(e.elm)},this.hide=function(e){void 0!==e.elm&&e.elm.parentNode===t.list&&t.list.removeChild(e.elm)},this.clear=function(){if(t.list.hasChildNodes())for(;t.list.childNodes.length>=1;)t.list.removeChild(t.list.firstChild)},n()};t.exports=function(t){return new r(t)}},function(t,e){t.exports=function(t,e){var r=t.getAttribute&&t.getAttribute(e)||null;if(!r)for(var n=t.attributes,i=n.length,s=0;s<i;s++)void 0!==e[s]&&e[s].nodeName===e&&(r=e[s].nodeValue);return r}},function(t,e,r){"use strict";function n(t){return t>=48&&t<=57}function i(t,e){for(var r=(t+="").length,i=(e+="").length,s=0,l=0;s<r&&l<i;){var u=t.charCodeAt(s),c=e.charCodeAt(l);if(n(u)){if(!n(c))return u-c;for(var f=s,h=l;48===u&&++f<r;)u=t.charCodeAt(f);for(;48===c&&++h<i;)c=e.charCodeAt(h);for(var d=f,v=h;d<r&&n(t.charCodeAt(d));)++d;for(;v<i&&n(e.charCodeAt(v));)++v;var m=d-f-v+h;if(m)return m;for(;f<d;)if(m=t.charCodeAt(f++)-e.charCodeAt(h++))return m;s=d,l=v}else{if(u!==c)return u<o&&c<o&&a[u]!==-1&&a[c]!==-1?a[u]-a[c]:u-c;++s,++l}}return r-i}var s,a,o=0;i.caseInsensitive=i.i=function(t,e){return i((""+t).toLowerCase(),(""+e).toLowerCase())},Object.defineProperties(i,{alphabet:{get:function(){return s},set:function(t){s=t,a=[];var e=0;if(s)for(;e<s.length;e++)a[s.charCodeAt(e)]=e;for(o=a.length,e=0;e<o;e++)void 0===a[e]&&(a[e]=-1)}}}),t.exports=i},function(t,e){t.exports=function(t,e,r){function n(t,r){var n=t/e.length,i=Math.abs(o-r);return s?n+i/s:i?1:n}var i=r.location||0,s=r.distance||100,a=r.threshold||.4;if(e===t)return!0;if(e.length>32)return!1;var o=i,l=function(){var t,r={};for(t=0;t<e.length;t++)r[e.charAt(t)]=0;for(t=0;t<e.length;t++)r[e.charAt(t)]|=1<<e.length-t-1;return r}(),u=a,c=t.indexOf(e,o);c!=-1&&(u=Math.min(n(0,c),u),c=t.lastIndexOf(e,o+e.length),c!=-1&&(u=Math.min(n(0,c),u)));var f=1<<e.length-1;c=-1;for(var h,d,v,m=e.length+t.length,g=0;g<e.length;g++){for(h=0,d=m;h<d;)n(g,o+d)<=u?h=d:m=d,d=Math.floor((m-h)/2+h);m=d;var p=Math.max(1,o-d+1),C=Math.min(o+d,t.length)+e.length,y=Array(C+2);y[C+1]=(1<<g)-1;for(var b=C;b>=p;b--){var w=l[t.charAt(b-1)];if(0===g?y[b]=(y[b+1]<<1|1)&w:y[b]=(y[b+1]<<1|1)&w|((v[b+1]|v[b])<<1|1)|v[b+1],y[b]&f){var x=n(g,b-1);if(x<=u){if(u=x,c=b-1,!(c>o))break;p=Math.max(1,2*o-c)}}}if(n(g+1,o)>u)break;v=y}return!(c<0)}}]);
|
@@ -1,166 +1,180 @@
|
|
1
|
-
/*
|
2
|
-
Place all the styles related to the matching controller here.
|
3
|
-
They will automatically be included in application.css.
|
4
|
-
*/
|
5
|
-
|
6
|
-
/*
|
7
|
-
Place all the styles related to the matching controller here.
|
8
|
-
They will automatically be included in application.css.
|
9
|
-
*/
|
10
|
-
|
11
1
|
/* colors:
|
12
|
-
#000000 - black
|
13
2
|
#ac0010 - red
|
14
|
-
#
|
15
|
-
#ffb62a - yellow
|
16
|
-
#dadada - grey
|
3
|
+
#89000C - dark red
|
17
4
|
#f1f1f1 - light grey
|
18
|
-
|
19
|
-
#559FAF - light blue
|
20
|
-
#488a99 - blue
|
5
|
+
#515151 - dark gray
|
21
6
|
#ffffff - white
|
22
7
|
*/
|
23
8
|
body {
|
24
9
|
color: #000000;
|
25
10
|
font-family:Gotham, "Helvetica Neue", Helvetica, Arial, "sans-serif";
|
26
11
|
font-size:16px;
|
27
|
-
padding: 0;
|
12
|
+
padding: 0 30px;
|
28
13
|
margin: 0;
|
29
14
|
background-color: #f1f1f1;
|
30
15
|
}
|
31
|
-
|
32
|
-
body div:first-child {
|
33
|
-
padding: 20px;
|
34
|
-
background: #ac0010;
|
35
|
-
color: #dadada;
|
36
|
-
}
|
37
|
-
|
38
|
-
body div:first-child > a {
|
16
|
+
a {
|
39
17
|
display:inline-block;
|
40
18
|
text-decoration: none;
|
41
|
-
background-color: #
|
42
|
-
color: #
|
43
|
-
padding:
|
19
|
+
background-color: #f1f1f1;
|
20
|
+
color: #515151;
|
21
|
+
padding: 5px 5px;
|
44
22
|
margin: 3px;
|
45
23
|
border-radius: 5px;
|
46
|
-
border: #
|
24
|
+
border: #515151 1px solid;
|
25
|
+
font-family:Gotham, "Helvetica Neue", Helvetica, Arial, "sans-serif";
|
47
26
|
}
|
48
|
-
|
49
|
-
|
50
|
-
background-color: #559FAF;
|
27
|
+
a:hover {
|
28
|
+
background-color: #89000C;
|
51
29
|
color: #ffffff;
|
52
30
|
border: #ffffff 1px solid;
|
53
31
|
}
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
background-color: #f1f1f1;
|
59
|
-
color: #484848;
|
60
|
-
padding: 8px 10px;
|
61
|
-
margin-left: 1px;
|
62
|
-
border-radius: 5px;
|
63
|
-
border: #484848 1px solid;
|
64
|
-
}
|
65
|
-
|
66
|
-
a:hover {
|
67
|
-
color:#dadada;
|
68
|
-
background-color:#484848;
|
32
|
+
.active {
|
33
|
+
background-color: #ffffff!important;
|
34
|
+
color: #ac0010!important;
|
35
|
+
border: #89000C 1px solid!important;
|
69
36
|
}
|
70
|
-
|
71
37
|
hr {
|
72
38
|
margin: 8px 0;
|
73
39
|
border:0;
|
74
|
-
border-bottom: #
|
40
|
+
border-bottom: #ffffff 1px solid;
|
75
41
|
}
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
42
|
+
.logger_navbar {
|
43
|
+
background-color: #ac0010;
|
44
|
+
padding: 20px 30px 10px;
|
45
|
+
margin: 0 -30px;
|
46
|
+
color: #f1f1f1;
|
47
|
+
}
|
48
|
+
.logger_navbar > p {
|
49
|
+
margin-bottom: 20px;
|
50
|
+
margin-left: -8px;
|
51
|
+
}
|
52
|
+
.logger_navbar > p > .dashboard_button {
|
53
|
+
padding: 8px 10px;
|
54
|
+
margin: auto 20px auto auto;
|
55
|
+
color: #f1f1f1;
|
56
|
+
background-color: #ac0010;
|
81
57
|
border-radius: 5px;
|
58
|
+
text-transform: uppercase;
|
59
|
+
text-decoration: none;
|
82
60
|
font-family:Gotham, "Helvetica Neue", Helvetica, Arial, "sans-serif";
|
61
|
+
border:none;
|
83
62
|
}
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
63
|
+
.logger_navbar > p > .dashboard_button:hover {
|
64
|
+
background-color: #89000C;
|
65
|
+
border: none;
|
66
|
+
}
|
67
|
+
.logger_navbar > a {
|
68
|
+
display: inline-block;
|
69
|
+
text-decoration: none;
|
70
|
+
background-color: #ac0010;
|
71
|
+
color: #f1f1f1;
|
72
|
+
padding: 8px 10px;
|
73
|
+
margin: auto auto 10px 20px;
|
74
|
+
border-radius: 5px;
|
75
|
+
border: #f1f1f1 1px solid;
|
76
|
+
}
|
77
|
+
.logger_navbar > .dashboard_button {
|
78
|
+
border-radius: 5px 0 0 5px;
|
88
79
|
}
|
89
80
|
|
81
|
+
.logger_navbar > .clear_logs {
|
82
|
+
display: inline-block;
|
83
|
+
text-decoration: none;
|
84
|
+
background-color: #ac0010;
|
85
|
+
color: #f1f1f1;
|
86
|
+
padding: 8px 10px;
|
87
|
+
margin: auto auto auto -5px;
|
88
|
+
border-radius: 0 5px 5px 0;
|
89
|
+
border: #f1f1f1 1px solid;
|
90
|
+
}
|
91
|
+
.logger_navbar > a:hover {
|
92
|
+
color:#f1f1f1;
|
93
|
+
background-color:#89000C;
|
94
|
+
}
|
95
|
+
.logger_navbar > .clear_logs:hover {
|
96
|
+
color: #89000C;
|
97
|
+
background-color: #FFFFFF;
|
98
|
+
}
|
90
99
|
p {
|
91
|
-
padding: 6px
|
100
|
+
padding: 6px 0;
|
92
101
|
font-family: Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", Monaco, "Courier New", "monospace";
|
93
102
|
font-size:16px;
|
94
103
|
}
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
104
|
+
.form-group {
|
105
|
+
background-color: #dadada;
|
106
|
+
padding: 5px 20px;
|
107
|
+
margin: 15px 0;
|
108
|
+
border-radius: 5px;
|
109
|
+
}
|
110
|
+
.form-group p {
|
111
|
+
color: #515151;
|
112
|
+
font-family:Gotham, "Helvetica Neue", Helvetica, Arial, "sans-serif";
|
102
113
|
}
|
103
|
-
|
104
114
|
input {
|
105
115
|
border-radius: 2px;
|
106
|
-
border:
|
107
|
-
padding:
|
108
|
-
margin: 3px;
|
116
|
+
border: none;
|
117
|
+
padding: 8px 10px;
|
118
|
+
margin: 3px 20px 3px 3px;
|
109
119
|
font-family: Gotham, "Helvetica Neue", Helvetica, Arial, "sans-serif";
|
110
|
-
color: #
|
120
|
+
color: #5E5E5E;
|
111
121
|
font-size: 14px;
|
112
|
-
margin-right: 20px;
|
113
122
|
}
|
114
|
-
|
115
123
|
input[type=submit]{
|
116
124
|
font-size:16px;
|
117
125
|
padding: 8px 10px;
|
118
126
|
border-radius: 3px;
|
119
|
-
background-color: #
|
120
|
-
color: #
|
127
|
+
background-color: #5E5E5E;
|
128
|
+
color: #f1f1f1;
|
121
129
|
border: none;
|
122
130
|
}
|
123
|
-
|
124
131
|
input[type=submit]:hover {
|
125
|
-
background-color: #
|
126
|
-
color: #
|
132
|
+
background-color: #437085;
|
133
|
+
color: #f1f1f1;
|
127
134
|
}
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
margin-top: 100px;
|
133
|
-
margin-left: 20%;
|
134
|
-
margin-right: 20%;
|
135
|
-
margin-bottom: 100px;
|
136
|
-
text-align: center;
|
135
|
+
.form-group .clear_logs {
|
136
|
+
background-color: #ac0010;
|
137
|
+
border: none;
|
138
|
+
color: #f1f1f1;
|
137
139
|
}
|
138
|
-
|
139
|
-
|
140
|
-
margin: 5px 10px;
|
140
|
+
.form-group .clear_logs:hover {
|
141
|
+
background-color: #89000C;
|
141
142
|
}
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
text-decoration: none;
|
151
|
-
display: inline-block;
|
152
|
-
font-size: 14px;
|
143
|
+
.hourly-list .search {
|
144
|
+
margin: 30px 20px 30px 50px;
|
145
|
+
border-radius: 2px;
|
146
|
+
border: #515151 1px solid;
|
147
|
+
padding: 8px 10px;
|
148
|
+
font-family: Gotham, "Helvetica Neue", Helvetica, Arial, "sans-serif";
|
149
|
+
color: #5E5E5E;
|
150
|
+
font-size: 14px;
|
153
151
|
}
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
152
|
+
.hourly-list .sort {
|
153
|
+
font-size:16px;
|
154
|
+
padding: 8px 20px;
|
155
|
+
border-radius: 3px;
|
156
|
+
background-color: #5E5E5E;
|
157
|
+
color: #f1f1f1;
|
158
|
+
border: none;
|
158
159
|
}
|
159
|
-
|
160
|
-
|
161
|
-
|
160
|
+
.hourly-list .sort:hover {
|
161
|
+
background-color: #437085;
|
162
|
+
color: #f1f1f1;
|
162
163
|
}
|
163
|
-
|
164
|
-
|
165
|
-
|
164
|
+
.hourly-list .list {
|
165
|
+
padding-left: 50px;
|
166
|
+
}
|
167
|
+
.hourly-list .list li{
|
168
|
+
list-style: none;
|
169
|
+
display: block;
|
170
|
+
width: auto;
|
171
|
+
margin-right: 50px;
|
172
|
+
float: left;
|
173
|
+
}
|
174
|
+
.hourly-list .list li h5 {
|
175
|
+
marging-top: 30px;
|
176
|
+
margin-bottom: 30px;
|
177
|
+
}
|
178
|
+
.highlight {
|
179
|
+
background-color:#ffb62a;
|
166
180
|
}
|
@@ -0,0 +1,94 @@
|
|
1
|
+
.clear_logs {
|
2
|
+
background-color: #F62817 !important ;
|
3
|
+
color: white;
|
4
|
+
padding: 15px 32px;
|
5
|
+
text-align: center;
|
6
|
+
text-decoration: none;
|
7
|
+
display: inline-block;
|
8
|
+
font-size: 14px;
|
9
|
+
}
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
.message{
|
14
|
+
text-align: center;
|
15
|
+
}
|
16
|
+
|
17
|
+
|
18
|
+
.list {
|
19
|
+
font-family:sans-serif;
|
20
|
+
}
|
21
|
+
td {
|
22
|
+
padding:10px;
|
23
|
+
border:solid 1px #eee;
|
24
|
+
}
|
25
|
+
|
26
|
+
input {
|
27
|
+
border:solid 1px #ccc;
|
28
|
+
border-radius: 5px;
|
29
|
+
padding:7px 14px;
|
30
|
+
margin-bottom:10px
|
31
|
+
}
|
32
|
+
input:focus {
|
33
|
+
outline:none;
|
34
|
+
border-color:#aaa;
|
35
|
+
}
|
36
|
+
.sort {
|
37
|
+
padding:8px 30px;
|
38
|
+
border-radius: 6px;
|
39
|
+
border:none;
|
40
|
+
display:inline-block;
|
41
|
+
color:#fff;
|
42
|
+
text-decoration: none;
|
43
|
+
background-color: #28a8e0;
|
44
|
+
height:30px;
|
45
|
+
}
|
46
|
+
.sort:hover {
|
47
|
+
text-decoration: none;
|
48
|
+
background-color:#1b8aba;
|
49
|
+
}
|
50
|
+
.sort:focus {
|
51
|
+
outline:none;
|
52
|
+
}
|
53
|
+
.sort:after {
|
54
|
+
display:inline-block;
|
55
|
+
width: 0;
|
56
|
+
height: 0;
|
57
|
+
border-left: 5px solid transparent;
|
58
|
+
border-right: 5px solid transparent;
|
59
|
+
border-bottom: 5px solid transparent;
|
60
|
+
content:"";
|
61
|
+
position: relative;
|
62
|
+
top:-10px;
|
63
|
+
right:-5px;
|
64
|
+
}
|
65
|
+
.sort.asc:after {
|
66
|
+
width: 0;
|
67
|
+
height: 0;
|
68
|
+
border-left: 5px solid transparent;
|
69
|
+
border-right: 5px solid transparent;
|
70
|
+
border-top: 5px solid #fff;
|
71
|
+
content:"";
|
72
|
+
position: relative;
|
73
|
+
top:4px;
|
74
|
+
right:-5px;
|
75
|
+
}
|
76
|
+
.sort.desc:after {
|
77
|
+
width: 0;
|
78
|
+
height: 0;
|
79
|
+
border-left: 5px solid transparent;
|
80
|
+
border-right: 5px solid transparent;
|
81
|
+
border-bottom: 5px solid #fff;
|
82
|
+
content:"";
|
83
|
+
position: relative;
|
84
|
+
top:-4px;
|
85
|
+
right:-5px;
|
86
|
+
}
|
87
|
+
|
88
|
+
.pagination li {
|
89
|
+
display: inline-table;
|
90
|
+
}
|
91
|
+
|
92
|
+
ul {
|
93
|
+
list-style-type: none;
|
94
|
+
}
|