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 CHANGED
@@ -24,4 +24,7 @@
24
24
 
25
25
  === 0.0.7 /2010-02-21
26
26
  * Added drilldown on dashboard
27
- * Bug fixes and clean up
27
+ * Bug fixes and clean up
28
+
29
+ === 0.0.8 /2010-02-21
30
+ * Fix bug on mission and local time
data/lib/app.rb CHANGED
@@ -19,7 +19,7 @@ end
19
19
  # Configurations
20
20
 
21
21
  configure :production do
22
- set :logging, false
22
+ set :logging, true
23
23
  end
24
24
 
25
25
  configure do
@@ -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.7' unless defined? Wackamole::VERSION
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
- to_date = count_logs
11
- today = count_logs( last_tick, true )
12
- last_tick = count_logs( last_tick )
13
- { :to_date => to_date, :today => today, :last_tick => last_tick }
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} unless single_day
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;
@@ -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%">24 hours</th>
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
  &nbsp;<%= format_number(count) %>&nbsp;
59
43
  </span>
60
44
  </td>
61
- <!-- < if period == 'last_tick' %>
62
- <td width="5px" class="<=clazz%>">&nbsp;&nbsp;</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.7
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-21 00:00:00 -07:00
12
+ date: 2010-02-22 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency