uwa_sysload 0.3 → 0.4

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.
@@ -4,7 +4,7 @@ module UWA
4
4
  module Widget
5
5
  class SysLoad < UWA::Handler
6
6
  NAME = 'uwa_sysload'
7
- VERSION = '0.3'
7
+ VERSION = '0.4'
8
8
  COPYRIGHT = 'Copyright (C) 2007 Florent Solt'
9
9
  DESC = 'UWA System Load Monitor widget'
10
10
  AUTHOR = 'Florent Solt'
@@ -6,8 +6,7 @@ class SysLoad
6
6
 
7
7
  def initialize
8
8
  super
9
- @debugMode = true
10
- @author = 'Florent Solt'
9
+ @author = AUTHOR
11
10
  @title = 'My System Load'
12
11
  @values = []
13
12
  @autoRefresh = 1
data/resources/script.js CHANGED
@@ -5,7 +5,11 @@ widget.graph.style.backgroundImage = 'url(' + widget.remoteUrl + 'resource/bg.gi
5
5
 
6
6
  widget.onLoad = function() {
7
7
  widget.setBody(widget.graph);
8
- count = (widget.graph.clientWidth / widget.bar_width).toFixed(0);
8
+ widget.onRefresh();
9
+ }
10
+
11
+ widget.onRefresh = function() {
12
+ count = (widget.graph.getDimensions().width / widget.bar_width).toFixed(0);
9
13
  widget.remoteJson('values?count=' + count, widget.onValues);
10
14
  }
11
15
 
@@ -21,6 +25,7 @@ widget.onValues = function(values) {
21
25
  bar.setStyle('left', i * widget.bar_width + 'px');
22
26
  bar.setStyle('width', widget.bar_width + 'px');
23
27
  bar.setStyle('opacity', values[i]);
28
+ bar.setStyle('filter', 'alpha(opacity=' + height + ')');
24
29
  bar.appendText = '&nbsp;';
25
30
  widget.graph.appendChild(bar);
26
31
  }
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: uwa_sysload
5
5
  version: !ruby/object:Gem::Version
6
- version: "0.3"
7
- date: 2007-04-03 00:00:00 +02:00
6
+ version: "0.4"
7
+ date: 2007-04-12 00:00:00 +02:00
8
8
  summary: UWA System Load Monitor widget
9
9
  require_paths:
10
10
  - lib