hq-log-monitor-server 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/features/event-page.feature +1 -0
- data/features/overview-page.feature +1 -0
- data/features/submit-event.feature +1 -0
- data/lib/hq/log-monitor-server/event-page.rb +47 -1
- data/lib/hq/log-monitor-server/overview-page.rb +31 -1
- data/lib/hq/log-monitor-server/script.rb +3 -0
- data/lib/hq/log-monitor-server/service-host-page.rb +42 -1
- data/lib/hq/log-monitor-server/service-page.rb +34 -1
- metadata +1 -1
    
        data/features/event-page.feature
    CHANGED
    
    
| @@ -54,9 +54,51 @@ class Script | |
| 54 54 | 
             
            			esc_ht(title),
         | 
| 55 55 | 
             
            		]
         | 
| 56 56 |  | 
| 57 | 
            +
            		html << "<link href=\"%s\" rel=\"stylesheet\">" % [
         | 
| 58 | 
            +
            			"%s/css/bootstrap-combined.min.css" % [
         | 
| 59 | 
            +
            				@assets_elem["bootstrap"],
         | 
| 60 | 
            +
            			],
         | 
| 61 | 
            +
            		]
         | 
| 62 | 
            +
             | 
| 63 | 
            +
            		html << "<script src=\"%s\"></script>" % [
         | 
| 64 | 
            +
            			"%s/js/bootstrap.min.js" % [
         | 
| 65 | 
            +
            				@assets_elem["bootstrap"],
         | 
| 66 | 
            +
            			],
         | 
| 67 | 
            +
            		]
         | 
| 68 | 
            +
             | 
| 57 69 | 
             
            		html << "</head>\n"
         | 
| 58 70 | 
             
            		html << "<body>\n"
         | 
| 59 71 |  | 
| 72 | 
            +
            		html << "<div class=\"navbar navbar-static-top\">\n"
         | 
| 73 | 
            +
            		html << "<div class=\"navbar-inner\">\n"
         | 
| 74 | 
            +
            		html << "<div class=\"container\">\n"
         | 
| 75 | 
            +
            		html << "<ul class=\"nav\">\n"
         | 
| 76 | 
            +
            		html << "<li><a href=\"/\">Overview</a></li>\n"
         | 
| 77 | 
            +
            		html << "<li><a href=\"%s\">Service</a></li>\n" % [
         | 
| 78 | 
            +
            			esc_ht("/service/%s" % [
         | 
| 79 | 
            +
            				event["source"]["service"],
         | 
| 80 | 
            +
            			]),
         | 
| 81 | 
            +
            		]
         | 
| 82 | 
            +
            		html << "<li><a href=\"%s\">Host</a></li>\n" % [
         | 
| 83 | 
            +
            			esc_ht("/service/%s/host/%s" % [
         | 
| 84 | 
            +
            				event["source"]["service"],
         | 
| 85 | 
            +
            				event["source"]["host"],
         | 
| 86 | 
            +
            			])
         | 
| 87 | 
            +
            		]
         | 
| 88 | 
            +
            		html << "<li class=\"active\"><a href=\"%s\">Event</a></li>\n" % [
         | 
| 89 | 
            +
            			esc_ht("/event/%s" % [
         | 
| 90 | 
            +
            				context[:event_id],
         | 
| 91 | 
            +
            			])
         | 
| 92 | 
            +
            		]
         | 
| 93 | 
            +
            		html << "</ul>\n"
         | 
| 94 | 
            +
            		html << "</div>\n"
         | 
| 95 | 
            +
            		html << "</div>\n"
         | 
| 96 | 
            +
            		html << "</div>\n"
         | 
| 97 | 
            +
             | 
| 98 | 
            +
            		html << "<div class=\"container\">\n"
         | 
| 99 | 
            +
            		html << "<div class=\"row\">\n"
         | 
| 100 | 
            +
            		html << "<div class=\"span12\">\n"
         | 
| 101 | 
            +
             | 
| 60 102 | 
             
            		html << "<h1>%s</h1>\n" % [
         | 
| 61 103 | 
             
            			esc_ht(title),
         | 
| 62 104 | 
             
            		]
         | 
| @@ -67,7 +109,7 @@ class Script | |
| 67 109 |  | 
| 68 110 | 
             
            		else
         | 
| 69 111 |  | 
| 70 | 
            -
            			html << "<table id=\"event\">\n"
         | 
| 112 | 
            +
            			html << "<table id=\"event\" class=\"table table-striped\">\n"
         | 
| 71 113 | 
             
            			html << "<tbody>\n"
         | 
| 72 114 |  | 
| 73 115 | 
             
            			html << "<tr id=\"id\">\n"
         | 
| @@ -189,6 +231,10 @@ class Script | |
| 189 231 |  | 
| 190 232 | 
             
            		html << "</form>\n"
         | 
| 191 233 |  | 
| 234 | 
            +
            		html << "</div>\n"
         | 
| 235 | 
            +
            		html << "</div>\n"
         | 
| 236 | 
            +
            		html << "</div>\n"
         | 
| 237 | 
            +
             | 
| 192 238 | 
             
            		html << "</body>\n"
         | 
| 193 239 | 
             
            		html << "</html>\n"
         | 
| 194 240 |  | 
| @@ -24,9 +24,35 @@ class Script | |
| 24 24 | 
             
            			esc_ht(title),
         | 
| 25 25 | 
             
            		]
         | 
| 26 26 |  | 
| 27 | 
            +
            		html << "<link href=\"%s\" rel=\"stylesheet\">" % [
         | 
| 28 | 
            +
            			"%s/css/bootstrap-combined.min.css" % [
         | 
| 29 | 
            +
            				@assets_elem["bootstrap"],
         | 
| 30 | 
            +
            			],
         | 
| 31 | 
            +
            		]
         | 
| 32 | 
            +
             | 
| 33 | 
            +
            		html << "<script src=\"%s\"></script>" % [
         | 
| 34 | 
            +
            			"%s/js/bootstrap.min.js" % [
         | 
| 35 | 
            +
            				@assets_elem["bootstrap"],
         | 
| 36 | 
            +
            			],
         | 
| 37 | 
            +
            		]
         | 
| 38 | 
            +
             | 
| 27 39 | 
             
            		html << "</head>\n"
         | 
| 28 40 | 
             
            		html << "<body>\n"
         | 
| 29 41 |  | 
| 42 | 
            +
            		html << "<div class=\"navbar navbar-static-top\">\n"
         | 
| 43 | 
            +
            		html << "<div class=\"navbar-inner\">\n"
         | 
| 44 | 
            +
            		html << "<div class=\"container\">\n"
         | 
| 45 | 
            +
            		html << "<ul class=\"nav\">\n"
         | 
| 46 | 
            +
            		html << "<li class=\"active\"><a href=\"/\">Overview</a></li>\n"
         | 
| 47 | 
            +
            		html << "</ul>\n"
         | 
| 48 | 
            +
            		html << "</div>\n"
         | 
| 49 | 
            +
            		html << "</div>\n"
         | 
| 50 | 
            +
            		html << "</div>\n"
         | 
| 51 | 
            +
             | 
| 52 | 
            +
            		html << "<div class=\"container\">\n"
         | 
| 53 | 
            +
            		html << "<div class=\"row\">\n"
         | 
| 54 | 
            +
            		html << "<div class=\"span12\">\n"
         | 
| 55 | 
            +
             | 
| 30 56 | 
             
            		html << "<h1>%s</h1>\n" % [
         | 
| 31 57 | 
             
            			esc_ht(title),
         | 
| 32 58 | 
             
            		]
         | 
| @@ -35,7 +61,7 @@ class Script | |
| 35 61 | 
             
            			html << "<p>No events have been logged</p>\n"
         | 
| 36 62 | 
             
            		else
         | 
| 37 63 |  | 
| 38 | 
            -
            			html << "<table id=\"summaries\">\n"
         | 
| 64 | 
            +
            			html << "<table class=\"table table-striped\" id=\"summaries\">\n"
         | 
| 39 65 | 
             
            			html << "<thead>\n"
         | 
| 40 66 |  | 
| 41 67 | 
             
            			html << "<tr>\n"
         | 
| @@ -87,6 +113,10 @@ class Script | |
| 87 113 |  | 
| 88 114 | 
             
            		end
         | 
| 89 115 |  | 
| 116 | 
            +
            		html << "</div>\n"
         | 
| 117 | 
            +
            		html << "</div>\n"
         | 
| 118 | 
            +
            		html << "</div>\n"
         | 
| 119 | 
            +
             | 
| 90 120 | 
             
            		html << "</body>\n"
         | 
| 91 121 | 
             
            		html << "</html>\n"
         | 
| 92 122 |  | 
| @@ -32,9 +32,46 @@ class Script | |
| 32 32 | 
             
            			esc_ht(title),
         | 
| 33 33 | 
             
            		]
         | 
| 34 34 |  | 
| 35 | 
            +
            		html << "<link href=\"%s\" rel=\"stylesheet\">" % [
         | 
| 36 | 
            +
            			"%s/css/bootstrap-combined.min.css" % [
         | 
| 37 | 
            +
            				@assets_elem["bootstrap"],
         | 
| 38 | 
            +
            			],
         | 
| 39 | 
            +
            		]
         | 
| 40 | 
            +
             | 
| 41 | 
            +
            		html << "<script src=\"%s\"></script>" % [
         | 
| 42 | 
            +
            			"%s/js/bootstrap.min.js" % [
         | 
| 43 | 
            +
            				@assets_elem["bootstrap"],
         | 
| 44 | 
            +
            			],
         | 
| 45 | 
            +
            		]
         | 
| 46 | 
            +
             | 
| 35 47 | 
             
            		html << "</head>\n"
         | 
| 36 48 | 
             
            		html << "<body>\n"
         | 
| 37 49 |  | 
| 50 | 
            +
            		html << "<div class=\"navbar navbar-static-top\">\n"
         | 
| 51 | 
            +
            		html << "<div class=\"navbar-inner\">\n"
         | 
| 52 | 
            +
            		html << "<div class=\"container\">\n"
         | 
| 53 | 
            +
            		html << "<ul class=\"nav\">\n"
         | 
| 54 | 
            +
            		html << "<li><a href=\"/\">Overview</a></li>\n"
         | 
| 55 | 
            +
            		html << "<li><a href=\"%s\">Service</a></li>\n" % [
         | 
| 56 | 
            +
            			esc_ht("/service/%s" % [
         | 
| 57 | 
            +
            				context[:service],
         | 
| 58 | 
            +
            			]),
         | 
| 59 | 
            +
            		]
         | 
| 60 | 
            +
            		html << "<li class=\"active\"><a href=\"%s\">Host</a></li>\n" % [
         | 
| 61 | 
            +
            			esc_ht("/service/%s/host/%s" % [
         | 
| 62 | 
            +
            				context[:service],
         | 
| 63 | 
            +
            				context[:host],
         | 
| 64 | 
            +
            			])
         | 
| 65 | 
            +
            		]
         | 
| 66 | 
            +
            		html << "</ul>\n"
         | 
| 67 | 
            +
            		html << "</div>\n"
         | 
| 68 | 
            +
            		html << "</div>\n"
         | 
| 69 | 
            +
            		html << "</div>\n"
         | 
| 70 | 
            +
             | 
| 71 | 
            +
            		html << "<div class=\"container\">\n"
         | 
| 72 | 
            +
            		html << "<div class=\"row\">\n"
         | 
| 73 | 
            +
            		html << "<div class=\"span12\">\n"
         | 
| 74 | 
            +
             | 
| 38 75 | 
             
            		html << "<h1>%s</h1>\n" % [
         | 
| 39 76 | 
             
            			esc_ht(title),
         | 
| 40 77 | 
             
            		]
         | 
| @@ -44,7 +81,7 @@ class Script | |
| 44 81 | 
             
            				"host</p>\n"
         | 
| 45 82 | 
             
            		else
         | 
| 46 83 |  | 
| 47 | 
            -
            			html << "<table id=\"events\">\n"
         | 
| 84 | 
            +
            			html << "<table id=\"events\" class=\"table table-striped\">\n"
         | 
| 48 85 | 
             
            			html << "<thead>\n"
         | 
| 49 86 |  | 
| 50 87 | 
             
            			html << "<tr>\n"
         | 
| @@ -96,6 +133,10 @@ class Script | |
| 96 133 |  | 
| 97 134 | 
             
            		end
         | 
| 98 135 |  | 
| 136 | 
            +
            		html << "</div>\n"
         | 
| 137 | 
            +
            		html << "</div>\n"
         | 
| 138 | 
            +
            		html << "</div>\n"
         | 
| 139 | 
            +
             | 
| 99 140 | 
             
            		html << "</body>\n"
         | 
| 100 141 | 
             
            		html << "</html>\n"
         | 
| 101 142 |  | 
| @@ -30,9 +30,38 @@ class Script | |
| 30 30 | 
             
            			esc_ht(title),
         | 
| 31 31 | 
             
            		]
         | 
| 32 32 |  | 
| 33 | 
            +
            		html << "<link href=\"%s\" rel=\"stylesheet\">" % [
         | 
| 34 | 
            +
            			"%s/css/bootstrap-combined.min.css" % [
         | 
| 35 | 
            +
            				@assets_elem["bootstrap"],
         | 
| 36 | 
            +
            			],
         | 
| 37 | 
            +
            		]
         | 
| 38 | 
            +
             | 
| 39 | 
            +
            		html << "<script src=\"%s\"></script>" % [
         | 
| 40 | 
            +
            			"%s/js/bootstrap.min.js" % [
         | 
| 41 | 
            +
            				@assets_elem["bootstrap"],
         | 
| 42 | 
            +
            			],
         | 
| 43 | 
            +
            		]
         | 
| 44 | 
            +
             | 
| 33 45 | 
             
            		html << "</head>\n"
         | 
| 34 46 | 
             
            		html << "<body>\n"
         | 
| 35 47 |  | 
| 48 | 
            +
            		html << "<div class=\"navbar navbar-static-top\">\n"
         | 
| 49 | 
            +
            		html << "<div class=\"navbar-inner\">\n"
         | 
| 50 | 
            +
            		html << "<div class=\"container\">\n"
         | 
| 51 | 
            +
            		html << "<ul class=\"nav\">\n"
         | 
| 52 | 
            +
            		html << "<li><a href=\"/\">Overview</a></li>\n"
         | 
| 53 | 
            +
            		html << "<li class=\"active\"><a href=\"%s\">Service</a></li>\n" % [
         | 
| 54 | 
            +
            			"/service/#{context[:service]}",
         | 
| 55 | 
            +
            		]
         | 
| 56 | 
            +
            		html << "</ul>\n"
         | 
| 57 | 
            +
            		html << "</div>\n"
         | 
| 58 | 
            +
            		html << "</div>\n"
         | 
| 59 | 
            +
            		html << "</div>\n"
         | 
| 60 | 
            +
             | 
| 61 | 
            +
            		html << "<div class=\"container\">\n"
         | 
| 62 | 
            +
            		html << "<div class=\"row\">\n"
         | 
| 63 | 
            +
            		html << "<div class=\"span12\">\n"
         | 
| 64 | 
            +
             | 
| 36 65 | 
             
            		html << "<h1>%s</h1>\n" % [
         | 
| 37 66 | 
             
            			esc_ht(title),
         | 
| 38 67 | 
             
            		]
         | 
| @@ -41,7 +70,7 @@ class Script | |
| 41 70 | 
             
            			html << "<p>No events have been logged for this service</p>\n"
         | 
| 42 71 | 
             
            		else
         | 
| 43 72 |  | 
| 44 | 
            -
            			html << "<table id=\"summaries\">\n"
         | 
| 73 | 
            +
            			html << "<table id=\"summaries\" class=\"table table-striped\">\n"
         | 
| 45 74 | 
             
            			html << "<thead>\n"
         | 
| 46 75 |  | 
| 47 76 | 
             
            			html << "<tr>\n"
         | 
| @@ -99,6 +128,10 @@ class Script | |
| 99 128 |  | 
| 100 129 | 
             
            		end
         | 
| 101 130 |  | 
| 131 | 
            +
            		html << "</div>\n"
         | 
| 132 | 
            +
            		html << "</div>\n"
         | 
| 133 | 
            +
            		html << "</div>\n"
         | 
| 134 | 
            +
             | 
| 102 135 | 
             
            		html << "</body>\n"
         | 
| 103 136 | 
             
            		html << "</html>\n"
         | 
| 104 137 |  |