powcloud-insurance 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2010 PowCloud Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,19 @@
1
+ = Insurance
2
+
3
+ TODO: write it
4
+
5
+ == Note on Patches/Pull Requests
6
+
7
+ * Fork the project.
8
+ * Make your feature addition or bug fix.
9
+ * Add tests for it. This is important so I don't break it in a
10
+ future version unintentionally.
11
+ * Commit, do not mess with rakefile, version, or history.
12
+ (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
13
+ * Send me a pull request. Bonus points for topic branches.
14
+
15
+ =License
16
+
17
+ Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
18
+
19
+ COPYRIGHT 2010 POWCLOUD INC.
@@ -0,0 +1,63 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "powcloud-insurance"
8
+ gem.summary = %Q{powcloud-insurance}
9
+ gem.description = %Q{powcloud-insurance}
10
+ gem.email = "maxmpz@gmail.com"
11
+ gem.homepage = "http://github.com/powcloud/insurance"
12
+ gem.authors = ["Darren Rush", "Max M. Petrov"]
13
+ gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
14
+ gem.files = FileList["[A-Z_.]*", "{bin,lib,test,examples}/**/*", 'lib/jeweler/templates/.gitignore']
15
+
16
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
17
+ gem.add_dependency('activesupport', '>= 2.3.4')
18
+ gem.add_dependency('eventmachine', '>= 0.12.10')
19
+ gem.add_dependency('log4r', '>= 1.1.2')
20
+ gem.add_dependency('sinatra', '>= 0.9.4')
21
+ gem.add_dependency('async-rack', '>= 0.4.0.1')
22
+ gem.add_dependency('async_sinatra', '>= 0.1.5')
23
+ gem.add_dependency('thin', '>= 1.2.5')
24
+ gem.add_dependency('amqp', '>= 0.6.6')
25
+ end
26
+ Jeweler::GemcutterTasks.new
27
+ rescue LoadError
28
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
29
+ end
30
+
31
+ require 'rake/testtask'
32
+ Rake::TestTask.new(:test) do |test|
33
+ test.libs << 'lib' << 'test'
34
+ test.pattern = 'test/**/test_*.rb'
35
+ test.verbose = true
36
+ end
37
+
38
+ begin
39
+ require 'rcov/rcovtask'
40
+ Rcov::RcovTask.new do |test|
41
+ test.libs << 'test'
42
+ test.pattern = 'test/**/test_*.rb'
43
+ test.verbose = true
44
+ end
45
+ rescue LoadError
46
+ task :rcov do
47
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
48
+ end
49
+ end
50
+
51
+ task :test => :check_dependencies
52
+
53
+ task :default => :test
54
+
55
+ require 'rake/rdoctask'
56
+ Rake::RDocTask.new do |rdoc|
57
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
58
+
59
+ rdoc.rdoc_dir = 'rdoc'
60
+ rdoc.title = "powcloud-insurance #{version}"
61
+ rdoc.rdoc_files.include('README*')
62
+ rdoc.rdoc_files.include('lib/**/*.rb')
63
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require 'powcloud/insurance/agent_container'
5
+ require 'powcloud/insurance/comm/amqp_broadcast_channel'
6
+
7
+ OPTIONS = {:log_level => 'WARN', :config_file => 'config.rb'}
8
+
9
+ parser = OptionParser.new do |opts|
10
+ opts.banner = <<BANNER
11
+ Usage
12
+ =====
13
+
14
+ $> #{File.basename($0)} working_dir agent1 [agent2 [agent3 [...]]]
15
+
16
+ Options are:
17
+ BANNER
18
+ opts.separator ""
19
+ opts.on("--config=CONFIG_FILE", "config.rb", "Config file to load") { |OPTIONS[:config_file]| }
20
+ opts.on("--log-level=#{Log4r::LNAMES.join('|')}", "Log level to use") { |OPTIONS[:log_level]| }
21
+ opts.on("--help", "Show this help message.") { puts opts; exit }
22
+ opts.parse!(ARGV)
23
+ end
24
+
25
+ if ARGV.length < 2
26
+ puts parser
27
+ exit
28
+ end
29
+
30
+ $:.unshift ARGV.shift
31
+ begin
32
+ load OPTIONS[:config_file]
33
+ rescue MissingSourceFile
34
+ end
35
+
36
+ agent_container = Powcloud::Insurance::AgentContainer.new ARGV, OPTIONS
37
+ agent_container.run!
@@ -0,0 +1,47 @@
1
+ body, input, td {
2
+ font-family: tahoma, sans-serif;
3
+ }
4
+
5
+ h4 {
6
+ margin: 0 0 0 10px;
7
+ color: #444;
8
+ }
9
+
10
+ .cluster-agent {
11
+ padding: 10px;
12
+ margin: 10px;
13
+ background: #fff;
14
+ width: 480px;
15
+ border-radius: 8px;
16
+ -moz-border-radius: 8px;
17
+ -webkit-border-radius: 8px;
18
+ box-shadow : 0px 0px 10px #555;
19
+ -moz-box-shadow: 0px 0px 8px #888;
20
+ -webkit-box-shadow: 0px 0px 8px #888;
21
+ }
22
+
23
+ .cluster-agent .node-name {
24
+ background: #eef;
25
+ padding: 5px;
26
+ border-radius: 6px;
27
+ -moz-border-radius: 6px;
28
+ -webkit-border-radius: 6px;
29
+ }
30
+
31
+ .cluster-agent .du-cont {
32
+ margin-left: 3em;
33
+ width: 400px;
34
+ margin-bottom: 1em;
35
+ }
36
+ .cluster-agent .disk-usage {
37
+ overflow: hidden;
38
+ border-bottom: 1px solid #eee;
39
+ }
40
+
41
+ .cluster-agent .fs {
42
+ display: inline-block;
43
+ width: 300px;
44
+ }
45
+ .cluster-agent .usage {
46
+ display: inline;
47
+ }
@@ -0,0 +1,38 @@
1
+ $(function() {
2
+ var $cont = $("div.cluster-agent:first");
3
+
4
+ get_and_render_data()
5
+
6
+ function get_and_render_data() {
7
+ $.getJSON("data", {}, function(json, status) {
8
+ render(json);
9
+ });
10
+ setTimeout(get_and_render_data, 30*1000);
11
+ }
12
+
13
+ function render(json) {
14
+ $cont.empty();
15
+ try {
16
+ $.each(json, function(ix, item) {
17
+ render_node(item);
18
+ });
19
+ } catch(e) {
20
+ if(console) console.log(e);
21
+ else alert(e);
22
+ }
23
+ }
24
+ function render_node(node) {
25
+ var $du_cont = $("<div class='du-cont'></div>");
26
+ if(node.disk_usage) {
27
+ $.each(node.disk_usage, function(fs, usage) {
28
+ var $du = $("<div class='disk-usage'/>").appendTo($du_cont);
29
+ $("<div class='fs'></div>").text(fs).appendTo($du);
30
+ $("<div class='usage'></div>").text(usage).appendTo($du);
31
+ });
32
+ }
33
+
34
+ $("<div class='node-cont'/>").appendTo($cont)
35
+ .append($("<div class='node-name'/>").text(node.name))
36
+ .append($du_cont);
37
+ }
38
+ });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
3
+ *
4
+ * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
5
+ * http://www.opensource.org/licenses/mit-license.php
6
+ *
7
+ */
8
+ if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",encodeURIComponent(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();if(!(navigator.plugins && navigator.mimeTypes.length)) window[this.getAttribute('id')] = document.getElementById(this.getAttribute('id'));return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
@@ -0,0 +1,18 @@
1
+ <script type="text/javascript" src="js/cluster-agent.js"></script>
2
+ <script type="text/javascript" src="js/swfobject.js"></script>
3
+
4
+ <h4>Cluster Monitor</h4>
5
+ <div id="flashcontent">You need to upgrade your Flash Player</div>
6
+
7
+ <script type="text/javascript">
8
+ // <![CDATA[
9
+ var so = new SWFObject("amxy.swf", "cluster1", "520", "400", "8", "#FFFFFF");
10
+ so.addVariable("settings_file", encodeURIComponent("settings"));
11
+ so.addVariable("data_file", encodeURIComponent("data?format=amxy"));
12
+ so.addVariable("chart_id","cluster1");
13
+ so.write("flashcontent");
14
+ // ]]>
15
+ </script>
16
+
17
+ <h4>Disk Usage</h4>
18
+ <div class="cluster-agent"></div>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+ <html>
3
+ <head>
4
+ <title>Cluster Agent</title>
5
+ <link rel="stylesheet" href="css/cluster-agent.css" type="text/css"/>
6
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
7
+ </head>
8
+ <body>
9
+
10
+ <%= yield %>
11
+
12
+ </body>
13
+ </html>
@@ -0,0 +1,352 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- Value between [] brackets, for example [#FFFFFF] shows default value which is used if this parameter is not set -->
3
+ <!-- This means, that if you are happy with this value, you can delete this line at all and reduce file size -->
4
+ <!-- the top left corner has coordinates x = 0, y = 0 -->
5
+ <!-- "!" before x or y position (for example: <x>!20</x>) means that the coordinate will be calculated from the right side or the bottom -->
6
+ <settings>
7
+ <data_type>csv</data_type> <!-- [xml] (xml / csv) -->
8
+ <csv_separator></csv_separator> <!-- [;] (string) csv file data separator (you need it only if you are using csv file for your data) -->
9
+ <skip_rows></skip_rows> <!-- [0] (Number) if you are using csv data type, you can set the number of rows which should be skipped here -->
10
+ <font>Tahoma</font> <!-- [Arial] (font name) use device fonts, such as Arial, Times New Roman, Tahoma, Verdana... -->
11
+ <text_size></text_size> <!-- [11] (Number) text size of all texts. Every text size can be set individually in the settings below -->
12
+ <text_color></text_color> <!-- [#000000] (hex color code) main text color. Every text color can be set individually in the settings below-->
13
+ <decimals_separator>.</decimals_separator> <!-- [,] (string) decimal separator. Note, that this is for displaying data only. Decimals in data xml file must be separated with a dot -->
14
+ <thousands_separator></thousands_separator> <!-- [ ] (string) thousand separator. use "none" if you don't want to separate -->
15
+ <digits_after_decimal></digits_after_decimal> <!-- [] (Number) if your value has less digits after decimal then is set here, zeroes will be added -->
16
+ <scientific_min></scientific_min> <!-- [0.000001] If absolute value of your number is equal or less then scientific_min, this number will be formatted using scientific notation, for example: 0.0000023 -> 2.3e-6 -->
17
+ <scientific_max></scientific_max> <!-- [1000000000000000] If absolute value of your number is equal or bigger then scientific_max, this number will be formatted using scientific notation, for example: 15000000000000000 -> 1.5e16 -->
18
+ <redraw></redraw> <!-- [false] (true / false) if your chart's width or height is set in percents, and redraw is set to true, the chart will be redrawn then screen size changes -->
19
+ <reload_data_interval>3</reload_data_interval> <!-- [0] (Number) how often data should be reloaded (time in seconds) -->
20
+ <preloader_on_reload></preloader_on_reload> <!-- [false] (true / false) Whether to show preloaded when data or settings are reloaded -->
21
+ <add_time_stamp></add_time_stamp> <!-- [false] (true / false) if true, a unique number will be added every time flash loads data. Mainly this feature is useful if you set reload _data_interval -->
22
+ <depth></depth> <!-- [0] (Number) the depth of chart and columns (for 3D effect) -->
23
+ <angle></angle> <!-- [30] (0 - 90) angle of chart area and columns (for 3D effect) -->
24
+ <link_target></link_target> <!-- [] (_blank, _top ...) -->
25
+ <mask></mask> <!-- [true] if true, bubbles, data labels will be masked within plot area. If the <zoom> is enabled, this setting is always "true" -->
26
+ <colors></colors> <!-- [#FF6600,#FCD202,#B0DE09,#0D8ECF,#2A0CD0,#CD0D74,#CC0000,#00CC00,#0000CC,#DDDDDD,#999999,#333333,#990000] Colors of graphs. if the graph color is not set, color from this array will be used -->
27
+ <js_enabled></js_enabled> <!-- [true] (true / false) In case you don't use any flash - JavaScript communication, you shuold set this setting to false - this will save some CPU and will disable the security warning message which appears when opening the chart from hard drive. -->
28
+
29
+ <background> <!-- BACKGROUND -->
30
+ <color></color> <!-- [#FFFFFF] (hex color code) Separate color codes with comas for gradient -->
31
+ <alpha></alpha> <!-- [0] (0 - 100) use 0 if you are using custom swf or jpg for background -->
32
+ <border_color></border_color> <!-- [#000000] (hex color code) -->
33
+ <border_alpha></border_alpha> <!-- [0] (0 - 100) -->
34
+ <file></file> <!-- [] (filename) swf or jpg file of a background. Do not use progressive jpg file, it will be not visible with flash player 7 -->
35
+ <!-- The chart will look for this file in "path" folder ("path" is set in HTML) -->
36
+ </background>
37
+
38
+ <plot_area> <!-- PLOT AREA (the area between axes) -->
39
+ <color></color> <!-- [#FFFFFF](hex color code) Separate color codes with comas for gradient -->
40
+ <alpha></alpha> <!-- [0] (0 - 100) if you want it to be different than background color, use bigger than 0 value -->
41
+ <border_color></border_color> <!-- [#000000] (hex color code) -->
42
+ <border_alpha></border_alpha> <!-- [0] (0 - 100) -->
43
+ <margins> <!-- plot area margins -->
44
+ <left></left> <!-- [60](Number / Number%) -->
45
+ <top></top> <!-- [60](Number / Number%) -->
46
+ <right></right> <!-- [60](Number / Number%) -->
47
+ <bottom></bottom> <!-- [80](Number / Number%) -->
48
+ </margins>
49
+ </plot_area>
50
+
51
+ <grid> <!-- GRID -->
52
+ <x> <!-- x axis grid -->
53
+ <color></color> <!-- [#000000] (hex color code) -->
54
+ <alpha>5</alpha> <!-- [15] (0 - 100) -->
55
+ <dashed></dashed> <!-- [false] (true / false) -->
56
+ <dash_length></dash_length> <!-- [5] (Number) -->
57
+ <approx_count></approx_count> <!-- [10] (Number) approximate number of gridlines -->
58
+ <fill_color></fill_color> <!-- [#FFFFFF] (hex color code) every second area between gridlines will be filled with this color (you will need to set fill_alpha > 0) -->
59
+ <fill_alpha></fill_alpha> <!-- [0] (0 - 100) opacity of fill -->
60
+ </x>
61
+ <y> <!-- y axis grid -->
62
+ <color></color> <!-- [#000000] (hex color code) -->
63
+ <enabled></enabled> <!-- [true] (true / false) -->
64
+ <alpha>5</alpha> <!-- [15] (0 - 100) -->
65
+ <dashed></dashed> <!-- [false] (true / false) -->
66
+ <dash_length></dash_length> <!-- [5] (Number) -->
67
+ <approx_count></approx_count> <!-- [10] (Number) approximate number of gridlines -->
68
+ <fill_color>000000</fill_color> <!-- [#FFFFFF] (hex color code) every second area between gridlines will be filled with this color (you will need to set fill_alpha > 0) -->
69
+ <fill_alpha>5</fill_alpha> <!-- [0] (0 - 100) opacity of fill -->
70
+ </y>
71
+ </grid>
72
+
73
+ <values> <!-- VALUES -->
74
+ <x> <!-- x axis -->
75
+ <enabled></enabled> <!-- [true] (true / false) -->
76
+ <type></type> <!-- [number] (number / date / duration) type of axis. -->
77
+ <!-- "duration" means that your numbers will be formatted as time, for example 130 seconds can be displayed as 02:10 or as 02 min 10 s (you can setup units in <strings>) -->
78
+ <!-- "date" means that your axis will display dates (you must specify date formats in <date_formats>) -->
79
+ <reverse></reverse> <!-- [false] (true / false) whether to reverse this axis values or not. If set to true, values will start from biggest number and will end with a smallest number -->
80
+ <min>0</min> <!-- [] (Number) minimum value of this axis. If empty, this value will be calculated automatically. If this axis type is "date", you can set date here. -->
81
+ <max>200</max> <!-- [] (Number) maximum value of this axis. If empty, this value will be calculated automatically. If this axis type is "date", you can set date here. -->
82
+ <strict_min_max></strict_min_max> <!-- [false] (true / false) by default, if your values are bigger then defined max (or smaller then defined min), max and min is changed so that all the chart would fit to chart area. If you don't want this, set this option to true. -->
83
+ <frequency></frequency> <!-- [1] (Number) how often values should be placed, 1 - near every gridline, 2 - near every second gridline... -->
84
+ <rotate></rotate> <!-- [0] (0 - 90) angle of rotation. If you want to rotate by degree from 1 to 89, you must have font.swf file in fonts folder -->
85
+ <skip_first></skip_first> <!-- [true] (true / false) to skip or not first value -->
86
+ <skip_last></skip_last> <!-- [false] (true / false) to skip or not last value -->
87
+ <color></color> <!-- [text_color] (hex color code) -->
88
+ <text_size></text_size> <!-- [text_size] (Number) -->
89
+ <unit></unit> <!-- [] (text) -->
90
+ <unit_position></unit_position> <!-- [right] (right / left) -->
91
+ <integers_only></integers_only> <!-- [false] (true / false) if set to true, values with decimals will be omitted -->
92
+ <inside></inside> <!-- [false] (true / false) if set to true, axis values will be displayed inside plot area. This setting will not work for values rotated by 1-89 degrees (0 and 90 only) -->
93
+ </x>
94
+ <y> <!-- y axis -->
95
+ <enabled></enabled> <!-- [true] (true / false) -->
96
+ <type></type> <!-- [number] (number / date / duration) type of axis. -->
97
+ <!-- "duration" means that your numbers will be formatted as time, for example 130 seconds can be displayed as 02:10 or as 02 min 10 s (you can setup units in <strings>) -->
98
+ <!-- "date" means that your axis will display dates (you must specify date formats in <date_formats>) -->
99
+ <reverse></reverse> <!-- [false] (true / false) whether to reverse this axis values or not. If set to true, values will start from biggest number and will end with a smallest number -->
100
+ <min>-10</min> <!-- [] (Number) minimum value of this axis. If empty, this value will be calculated automatically. If this axis type is "date", you can set date here. -->
101
+ <max>100</max> <!-- [] (Number) maximum value of this axis. If empty, this value will be calculated automatically. If this axis type is "date", you can set date here. -->
102
+ <strict_min_max></strict_min_max> <!-- [false] (true / false) by default, if your values are bigger then defined max (or smaller then defined min), max and min is changed so that all the chart would fit to chart area. If you don't want this, set this option to true. -->
103
+ <frequency></frequency> <!-- [1] (Number) how often values should be placed, 1 - near every gridline, 2 - near every second gridline... -->
104
+ <rotate></rotate> <!-- [0] (0 - 90) angle of rotation. If you want to rotate by degree from 1 to 89, you must have font.swf file in fonts folder -->
105
+ <skip_first></skip_first> <!-- [true] (true / false) to skip or not first value -->
106
+ <skip_last></skip_last> <!-- [false] (true / false) to skip or not last value -->
107
+ <color></color> <!-- [text_color] (hex color code) -->
108
+ <text_size></text_size> <!-- [text_size] (Number) -->
109
+ <unit></unit> <!-- [] (text) -->
110
+ <unit_position></unit_position> <!-- [right] (right / left) -->
111
+ <integers_only></integers_only> <!-- [false] (true / false) if set to true, values with decimals will be omitted -->
112
+ <inside></inside> <!-- [false] (true / false) if set to true, axis values will be displayed inside plot area. This setting will not work for values rotated by 1-89 degrees (0 and 90 only) -->
113
+ </y>
114
+ </values>
115
+
116
+ <axes> <!-- axes -->
117
+ <x> <!-- x axis -->
118
+ <color></color> <!-- [#000000] (hex color code) -->
119
+ <alpha></alpha> <!-- [100] (0 - 100) -->
120
+ <width></width> <!-- [2] (Number) line width, 0 for hairline -->
121
+ <tick_length></tick_length> <!-- [7] (Number) -->
122
+ <logarithmic></logarithmic> <!-- [false] (true / false) If set to true, this axis will use logarithmic scale instead of linear -->
123
+ </x>
124
+ <y> <!-- y axis -->
125
+ <color></color> <!-- [#000000] (hex color code) -->
126
+ <alpha></alpha> <!-- [100] (0 - 100) -->
127
+ <width></width> <!-- [2] (Number) line width, 0 for hairline -->
128
+ <tick_length></tick_length> <!-- [7] (Number) -->
129
+ <logarithmic></logarithmic> <!-- [false] (true / false) If set to true, this axis will use logarithmic scale instead of linear -->
130
+ </y>
131
+ </axes>
132
+
133
+ <date_formats> <!-- these settings are important only if your axis type is date or duration -->
134
+ <date_input></date_input> <!-- [YYYY-MM-DD hh:mm:ss] (YYYY, MM, DD, hh, mm, ss) date format of your data -->
135
+ <duration_input></duration_input> <!-- [ss] (DD, mm, hh, ss) duration unit of your data (this is important only if your axis type is "duration") -->
136
+ <axis_values> <!-- when axis type is "date", you must specify date formats for different intervals. "first" describes date format of the first grid line, "regular" - of all other grid lines -->
137
+ <ss first="month DD, YYYY" regular="hh:mm:ss"/> <!-- [first="month DD, YYYY" regular="hh:mm:ss"] date formats when interval is second -->
138
+ <mm first="month DD, YYYY" regular="hh:mm"/> <!-- [first="month DD, YYYY" regular="hh:mm"] date formats when interval is minute -->
139
+ <hh first="month DD, YYYY" regular="hh:mm"/> <!-- [first="month DD, YYYY" regular="hh:mm"] date formats when interval is hour -->
140
+ <DD first="month DD, YYYY" regular="month DD"/> <!-- [first="month DD, YYYY" regular="month DD"] date formats when interval is day -->
141
+ <MM first="month, YYYY" regular="month"/> <!-- [first="month, YYYY" regular="month"] date formats when interval is month -->
142
+ <YYYY first="YYYY" regular="YYYY"/> <!-- [first="YYYY" regular="YYYY"] date formats when interval is year -->
143
+ </axis_values>
144
+ <balloon>month DD, YYYY</balloon> <!-- [month DD, YYYY] balloon date format -->
145
+ <data_labels>month DD, YYYY</data_labels> <!-- [month DD, YYYY] data labels date format -->
146
+ </date_formats>
147
+
148
+ <balloon> <!-- BALLOON -->
149
+ <enabled></enabled> <!-- [true] (true / false) -->
150
+ <color></color> <!-- [] (hex color code) balloon background color. If empty, slightly darker then current column color will be used -->
151
+ <alpha></alpha> <!-- [100] (0 - 100) -->
152
+ <text_color></text_color> <!-- [#FFFFFF] (hex color code) -->
153
+ <text_size></text_size> <!-- [text_size] (Number) -->
154
+ <max_width></max_width> <!-- [220] (Number) -->
155
+ <corner_radius></corner_radius> <!-- [0] (Number) Corner radius of a balloon. If you set it > 0, the balloon will not display arrow -->
156
+ <border_width></border_width> <!-- [0] (Number) -->
157
+ <border_alpha></border_alpha> <!-- [balloon.alpha] (Number) -->
158
+ <border_color></border_color> <!-- [balloon.color] (hex color code) -->
159
+ </balloon>
160
+
161
+ <bullets>
162
+ <hover_brightness>20</hover_brightness> <!-- [0] (from -255 to 255) the bullet may darken/lighten when the use rolls over it. The intensity may be set here -->
163
+ <grow_time>2</grow_time> <!-- [0] (Number) the time of animation of the bullets, in seconds. Leave 0 to appear instantly -->
164
+ <sequenced_grow>true</sequenced_grow> <!-- [false] (true / false) whether to animate all bullets at the same time or one after another -->
165
+ <grow_effect></grow_effect> <!-- [elastic] (elastic, regular, strong) -->
166
+ <max_size></max_size> <!-- [50] maximum size of a bullet (balloon) The bullet with the highest value will be equal to this size -->
167
+ <min_size></min_size> <!-- [0] mminimum size of a bullet (balloon) -->
168
+ </bullets>
169
+
170
+ <scroller>
171
+ <enabled></enabled> <!-- [true] (true / false) whether to show scroller when chart is zoomed or not -->
172
+ <color></color> <!-- [#DADADA] (hex color code) scrollbar color. Separate color codes with comas for gradient -->
173
+ <alpha></alpha> <!-- [100] (Number) scrollbar alpha -->
174
+ <bg_color></bg_color> <!-- [#F0F0F0] (hex color code) scroller background color. Separate color codes with comas for gradient -->
175
+ <bg_alpha></bg_alpha> <!-- [100] (Number) scroller background alpha -->
176
+ <height></height> <!-- [10] (Number) scroller height -->
177
+ </scroller>
178
+
179
+ <zoom>
180
+ <enabled></enabled> <!-- [true] (true / false) whether the user can select the area to zoom-in -->
181
+ <max_factor></max_factor> <!-- [20] (Number) The maximum zoom level -->
182
+ <border_color></border_color> <!-- [#BBBB00] color of a zoom box border -->
183
+ <border_alpha></border_alpha> <!-- [100] (Number) zoom box border opacity -->
184
+ <bg_color></bg_color> <!-- [#BBBB00] zoom box background color -->
185
+ <bg_alpha></bg_alpha> <!-- [25] zoom box background opacity -->
186
+ <target></target> <!-- [true] whether to show target when the mouse is over plot area or not -->
187
+ <disable_axis></disable_axis> <!-- [] (x / y) You can disable vertical or horizontal zoom. Set x to disable horizontal and y to disable vertical zoom -->
188
+ </zoom>
189
+
190
+ <zoom_out_button>
191
+ <x></x> <!-- [] (Number / Number% / !Number) x position of zoom out button, if not defined, will be aligned to right of plot area -->
192
+ <y></y> <!-- [] (Number / Number% / !Number) y position of zoom out button, if not defined, will be aligned to top of plot area -->
193
+ <color></color> <!-- [#BBBB00] (hex color code) background color -->
194
+ <alpha></alpha> <!-- [0] (0 - 100) background alpha -->
195
+ <text_color></text_color> <!-- [text_color] (hex color code) button text and magnifying glass icon color -->
196
+ <text_color_hover></text_color_hover> <!-- [#BBBB00] (hex color code) button text and magnifying glass icon roll over color -->
197
+ <text_size></text_size> <!-- [text_size] (Number) button text size -->
198
+ <text></text> <!-- [Show all] (text) -->
199
+ </zoom_out_button>
200
+
201
+ <help> <!-- HELP button and balloon -->
202
+ <button> <!-- help button is only visible if balloon text is defined -->
203
+ <x></x> <!-- [] (Number / Number% / !Number) x position of help button, if not defined, will be aligned to right of chart area -->
204
+ <y></y> <!-- [] (Number / Number% / !Number) y position of help button, if not defined, will be aligned to top of chart area -->
205
+ <color></color> <!-- [#000000] (hex color code) background color -->
206
+ <alpha></alpha> <!-- [100] (0 - 100) background alpha -->
207
+ <text_color></text_color> <!-- [#FFFFFF] (hex color code) button text color -->
208
+ <text_color_hover></text_color_hover> <!-- [#BBBB00](hex color code) button text roll over color -->
209
+ <text_size></text_size> <!-- [] (Number) button text size -->
210
+ <text></text> <!-- [?] (text) -->
211
+ </button>
212
+ <balloon> <!-- help balloon -->
213
+ <color></color> <!-- [#000000] (hex color code) background color -->
214
+ <alpha></alpha> <!-- [100] (0 - 100) background alpha -->
215
+ <width></width> <!-- [300] (Number) -->
216
+ <text_color></text_color> <!-- [#FFFFFF] (hex color code) button text color -->
217
+ <text_size></text_size> <!-- [] (Number) button text size -->
218
+ <text><![CDATA[Select the area to enlarge]]></text> <!-- [] (text) some html tags may be used (supports <b>, <i>, <u>, <font>, <br/>. Enter text between []: <![CDATA[your <b>bold</b> and <i>italic</i> text]]>-->
219
+ </balloon>
220
+ </help>
221
+
222
+ <legend> <!-- LEGEND -->
223
+ <enabled>false</enabled> <!-- [true] (true / false) -->
224
+ <x></x> <!-- [] (Number / Number% / !Number) if empty, will be equal to left margin -->
225
+ <y></y> <!-- [] (Number / Number% / !Number) if empty, will be below plot area -->
226
+ <width></width> <!-- [] (Number / Number%) if empty, will be equal to plot area width -->
227
+ <max_columns></max_columns> <!-- [] (Number) the maximum number of columns in the legend -->
228
+ <color></color> <!-- [#FFFFFF] (hex color code) background color. Separate color codes with comas for gradient -->
229
+ <alpha></alpha> <!-- [0] (0 - 100) background alpha -->
230
+ <border_color></border_color> <!-- [#000000] (hex color code) border color -->
231
+ <border_alpha></border_alpha> <!-- [0] (0 - 100) border alpha -->
232
+ <text_color></text_color> <!-- [text_color] (hex color code) -->
233
+ <text_size></text_size> <!-- [text_size] (Number) -->
234
+ <spacing></spacing> <!-- [10] (Number) vertical and horizontal gap between legend entries -->
235
+ <margins></margins> <!-- [0] (Number) legend margins (space between legend border and legend entries, recommended to use only if legend border is visible or background color is different from chart area background color) -->
236
+ <reverse_order></reverse_order> <!-- [false] (true / false) whether to sort legend entries in a reverse order -->
237
+ <align></align> <!-- [left] (left / center / right) alignment of legend entries -->
238
+ <key> <!-- KEY (the color box near every legend entry) -->
239
+ <size></size> <!-- [16] (Number) key size-->
240
+ <border_color></border_color> <!-- [] (hex color code) leave empty if you don't want to have border -->
241
+ </key>
242
+ </legend>
243
+
244
+ <export_as_image> <!-- export_as_image feature works only on a web server -->
245
+ <file></file> <!-- [] (filename) if you set filename here, context menu (then user right clicks on flash movie) "Export as image" will appear. This will allow user to export chart as an image. Collected image data will be posted to this file name (use amxy/export.php or amxy/export.aspx) -->
246
+ <target></target> <!-- [] (_blank, _top ...) target of a window in which export file must be called -->
247
+ <x></x> <!-- [0] (Number / Number% / !Number) x position of "Collecting data" text -->
248
+ <y></y> <!-- [] (Number / Number% / !Number) y position of "Collecting data" text. If not set, will be aligned to the bottom of flash movie -->
249
+ <color></color> <!-- [#BBBB00] (hex color code) background color of "Collecting data" text -->
250
+ <alpha></alpha> <!-- [0] (0 - 100) background alpha -->
251
+ <text_color></text_color> <!-- [text_color] (hex color code) -->
252
+ <text_size></text_size> <!-- [text_size] (Number) -->
253
+ </export_as_image>
254
+
255
+ <error_messages> <!-- "error_messages" settings will be applied for all error messages except the one which is showed if settings file wasn't found -->
256
+ <enabled></enabled> <!-- [true] (true / false) -->
257
+ <x></x> <!-- [] (Number / Number% / !Number) x position of error message. If not set, will be aligned to the center -->
258
+ <y></y> <!-- [] (Number / Number% / !Number) y position of error message. If not set, will be aligned to the center -->
259
+ <color></color> <!-- [#BBBB00] (hex color code) background color of error message. Separate color codes with comas for gradient -->
260
+ <alpha></alpha> <!-- [100] (0 - 100) background alpha -->
261
+ <text_color></text_color> <!-- [#FFFFFF] (hex color code) -->
262
+ <text_size></text_size> <!-- [text_size] (Number) -->
263
+ </error_messages>
264
+
265
+ <strings>
266
+ <no_data></no_data> <!-- [No data for selected period] (text) if data is missing, this message will be displayed -->
267
+ <export_as_image></export_as_image> <!-- [Export as image] (text) text for right click menu -->
268
+ <collecting_data></collecting_data> <!-- [Collecting data] (text) this text is displayed while exporting chart to an image -->
269
+ <ss></ss> <!-- [] unit of seconds -->
270
+ <mm>:</mm> <!-- [:] unit of minutes -->
271
+ <hh>:</hh> <!-- [:] unit of hours -->
272
+ <DD>d. </DD> <!-- [d ] unit of days -->
273
+ <months>
274
+ <month1>Jan</month1>
275
+ <month2>Feb</month2>
276
+ <month3>Mar</month3>
277
+ <month4>Apr</month4>
278
+ <month5>May</month5>
279
+ <month6>Jun</month6>
280
+ <month7>Jul</month7>
281
+ <month8>Aug</month8>
282
+ <month9>Sep</month9>
283
+ <month10>Oct</month10>
284
+ <month11>Nov</month11>
285
+ <month12>Dec</month12>
286
+ </months>
287
+ </strings>
288
+
289
+ <context_menu> <!-- context menu allows you to controll right-click menu items. You can add custom menu items to create custom controls -->
290
+ <!-- "function_name" specifies JavaScript function which will be called when user clicks on this menu. You can pass variables, for example: function_name="alert('something')" -->
291
+ <!-- "title" sets menu item text. Do not use for title: Show all, Zoom in, Zoom out, Print, Settings... -->
292
+ <!-- you can have any number of custom menus. Uncomment the line below to enable this menu and add apropriate JS function to your html file. -->
293
+
294
+ <!-- <menu function_name="printChart" title="Print chart"></menu> -->
295
+
296
+ <default_items>
297
+ <zoom></zoom> <!-- [false] (true / false) to show or not flash players zoom menu -->
298
+ <print></print> <!-- [true] (true / false) to show or not flash players print menu -->
299
+ </default_items>
300
+ </context_menu>
301
+
302
+
303
+ <labels> <!-- LABELS -->
304
+ <!-- you can add as many labels as you want -->
305
+ <!-- labels can also be added in data xml file, using exactly the same structure like it is here -->
306
+ <label lid="0">
307
+ <x>10</x> <!-- [0] (Number / Number% / !Number) -->
308
+ <y>20</y> <!-- [0] (Number / Number% / !Number) -->
309
+ <rotate>false</rotate> <!-- [false] (true, false) -->
310
+ <width></width> <!-- [] (Number / Number%) if empty, will stretch from left to right untill label fits -->
311
+ <align>center</align> <!-- [left] (left / center / right) -->
312
+ <text_color></text_color> <!-- [text_color] (hex color code) button text color -->
313
+ <text_size></text_size> <!-- [text_size](Number) button text size -->
314
+ <text> <!-- [] (text) html tags may be used (supports <b>, <i>, <u>, <font>, <a href="">, <br/>. Enter text between []: <![CDATA[your <b>bold</b> and <i>italic</i> text]]>-->
315
+ <![CDATA[<b>Cluster Monitor</b>]]>
316
+ </text>
317
+ </label>
318
+ </labels>
319
+
320
+
321
+ <graphs> <!-- GRAPHS SETTINGS. These settings can also be specified in data file, as attributes of <graph>, in this case you can delete everything from <graphs> to </graphs> (including) -->
322
+ <!-- It is recommended to have graph settings here if you don't want to mix data with other params -->
323
+ <!-- copy <graph>...</graph> (including) as many times as many graphs you have and edit settings individually -->
324
+ <!-- if graph settings are defined both here and in data file, the ones from data file are used -->
325
+ <graph gid="0"> <!-- if you are using XML data file, graph "gid" must match graph "gid" in data file -->
326
+ <title></title> <!-- [] (graph title) -->
327
+ <color>B92F2F</color> <!-- [] (hex color code) -->
328
+ <alpha>0</alpha> <!-- [100] (0 - 100) line alpha. WIll not affect bullets. Set to 0 if you want the line to be invisible -->
329
+ <width></width> <!-- [0] (Number) line width -->
330
+ <data_labels>
331
+ <![CDATA[{description}]]> <!-- [] ({title} {value} {description} {x} {y} {percents}) You can format any data label: {title} will be replaced with real title, {value} - with value and so on. You can add your own text or html code too. -->
332
+ </data_labels>
333
+ <balloon_text>
334
+ <![CDATA[]]> <!-- [] ({title} {value} {description} {x} {y} {percents}) You can format any data label: {title} will be replaced with real title, {value} - with value and so on. You can add your own text or html code too. You can also use {title}, {value} and other tags in description. -->
335
+ </balloon_text>
336
+
337
+ <bullet_max_size></bullet_max_size> <!-- [bullets.max_size] maximum size of a bullet (balloon) The bullet with the highest value will be equal to this size -->
338
+ <bullet_min_size></bullet_min_size> <!-- [bullets.min_size] minimum size of a bullet (balloon) -->
339
+ <bullet>bubble</bullet> <!-- [] (square, round, square_outlined, round_outlined, bubble, square_outline, round_outline, x. triangle_up, triangle_down, romb, y_error, x_error, filename.swf) can be used predefined bullets or loaded custom bullets. Leave empty if you don't want to have bullets at all. Outlined bullets use plot area color for outline color -->
340
+ <bullet_size></bullet_size> <!-- [] (Number) bullet size. This param is only used if your values are not set in data file -->
341
+ <bullet_color></bullet_color> <!-- [] (hex color code) bullet color. If not defined, graph color is used -->
342
+ <bullet_alpha></bullet_alpha> <!-- [100] (Number) -->
343
+ <visible_in_legend></visible_in_legend> <!-- [true] (true / false) whether to show legend entry for this graph or not -->
344
+ </graph>
345
+ </graphs>
346
+
347
+ <!-- DATA can also be set in settings file. Just place data in CSV or XML format between <data></data> -->
348
+
349
+ <!--<data>
350
+ </data> -->
351
+
352
+ </settings>