wackamole 0.0.7 → 0.0.8
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/History.txt +4 -1
- data/lib/app.rb +1 -1
- data/lib/controllers/mission.rb +1 -0
- data/lib/wackamole.rb +1 -1
- data/lib/wackamole/models/mission.rb +8 -5
- data/public/stylesheets/wackamole.css +14 -1
- data/views/mission/_report.erb +1 -20
- metadata +2 -2
data/History.txt
CHANGED
data/lib/app.rb
CHANGED
data/lib/controllers/mission.rb
CHANGED
@@ -26,6 +26,7 @@ module Mission
|
|
26
26
|
erb :'/mission/refresh_js', :layout => false
|
27
27
|
end
|
28
28
|
|
29
|
+
# ---------------------------------------------------------------------------
|
29
30
|
get '/mission/logs/:app_name/:stage/:type' do
|
30
31
|
Wackamole::Control.switch_mole_db!( params[:app_name].downcase, params[:stage] )
|
31
32
|
|
data/lib/wackamole.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Wackamole
|
2
2
|
|
3
3
|
# :stopdoc:
|
4
|
-
VERSION = '0.0.
|
4
|
+
VERSION = '0.0.8' unless defined? Wackamole::VERSION
|
5
5
|
LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR unless defined? Wackamole::LIBPATH
|
6
6
|
PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR unless defined? Wackamole::PATH
|
7
7
|
# :startdoc:
|
@@ -7,10 +7,10 @@ module Wackamole
|
|
7
7
|
# -----------------------------------------------------------------------
|
8
8
|
# Pick up moled application pulse
|
9
9
|
def self.pulse( last_tick )
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
{ :to_date =>
|
10
|
+
count_to_date = count_logs
|
11
|
+
count_today = count_logs( last_tick, true )
|
12
|
+
count_last_tick = count_logs( last_tick )
|
13
|
+
{ :to_date => count_to_date, :today => count_today, :last_tick => count_last_tick }
|
14
14
|
end
|
15
15
|
|
16
16
|
# -----------------------------------------------------------------------
|
@@ -18,10 +18,13 @@ module Wackamole
|
|
18
18
|
def self.gen_conds( now, single_day )
|
19
19
|
conds = {}
|
20
20
|
if now
|
21
|
+
if single_day
|
22
|
+
now = Time.local( now.year, now.month, now.day, 0, 0, 0 ).utc
|
23
|
+
end
|
21
24
|
date_id = now.to_date_id.to_s
|
22
25
|
time_id = now.to_time_id
|
23
26
|
conds[:did] = date_id
|
24
|
-
conds[:tid] = {'$gte' => time_id}
|
27
|
+
conds[:tid] = {'$gte' => time_id}
|
25
28
|
end
|
26
29
|
conds
|
27
30
|
end
|
@@ -585,6 +585,20 @@ div.load svg {
|
|
585
585
|
margin-top: 30px;
|
586
586
|
}
|
587
587
|
|
588
|
+
table#mission {
|
589
|
+
width: 100%;
|
590
|
+
border: 1;
|
591
|
+
text-align: left;
|
592
|
+
min-height: 500px;
|
593
|
+
}
|
594
|
+
table#mission thead tr {
|
595
|
+
font-size: 1.2em;
|
596
|
+
color: #808080;
|
597
|
+
}
|
598
|
+
table#mission tr.div {
|
599
|
+
border-bottom: 1px #c1c1c1 solid;
|
600
|
+
}
|
601
|
+
|
588
602
|
div.doh {
|
589
603
|
background: transparent url(../images/mole_error.png) no-repeat;
|
590
604
|
padding: 10px 10px 0px 120px;
|
@@ -669,7 +683,6 @@ span.today_feature {
|
|
669
683
|
color: #87b76c;
|
670
684
|
}
|
671
685
|
|
672
|
-
|
673
686
|
a.fixed {
|
674
687
|
color: orange;
|
675
688
|
text-decoration: none;
|
data/views/mission/_report.erb
CHANGED
@@ -1,19 +1,3 @@
|
|
1
|
-
<style>
|
2
|
-
table#mission {
|
3
|
-
width: 100%;
|
4
|
-
border: 1;
|
5
|
-
text-align: left;
|
6
|
-
min-height: 500px;
|
7
|
-
}
|
8
|
-
table#mission thead tr {
|
9
|
-
font-size: 1.2em;
|
10
|
-
color: #808080;
|
11
|
-
}
|
12
|
-
table#mission tr.div {
|
13
|
-
border-bottom: 1px #c1c1c1 solid;
|
14
|
-
}
|
15
|
-
</style>
|
16
|
-
|
17
1
|
<% applications = extract_applications( @pulse ) %>
|
18
2
|
<% if applications.empty? == 0 %>
|
19
3
|
<div class="doh">
|
@@ -28,7 +12,7 @@ table#mission tr.div {
|
|
28
12
|
<th width="25%">application</th>
|
29
13
|
<th width="10%">environment</th>
|
30
14
|
<th width="20%">to date</th>
|
31
|
-
<th width="20%">
|
15
|
+
<th width="20%">today</th>
|
32
16
|
<th width="20%">last tick</th>
|
33
17
|
</tr>
|
34
18
|
</thead>
|
@@ -58,9 +42,6 @@ table#mission tr.div {
|
|
58
42
|
<%= format_number(count) %>
|
59
43
|
</span>
|
60
44
|
</td>
|
61
|
-
<!-- < if period == 'last_tick' %>
|
62
|
-
<td width="5px" class="<=clazz%>"> </td>
|
63
|
-
< end %> -->
|
64
45
|
</tr>
|
65
46
|
<% end %>
|
66
47
|
</tbody>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wackamole
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fernand Galiana
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-02-
|
12
|
+
date: 2010-02-22 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|