diff --git a/www/asc.gif b/www/asc.gif deleted file mode 100644 index 74157867..00000000 Binary files a/www/asc.gif and /dev/null differ diff --git a/www/bg.gif b/www/bg.gif deleted file mode 100644 index fac668fc..00000000 Binary files a/www/bg.gif and /dev/null differ diff --git a/www/datatables/images/sort_asc.png b/www/datatables/images/sort_asc.png new file mode 100644 index 00000000..a88d7975 Binary files /dev/null and b/www/datatables/images/sort_asc.png differ diff --git a/www/datatables/images/sort_asc_disabled.png b/www/datatables/images/sort_asc_disabled.png new file mode 100644 index 00000000..4e144cf0 Binary files /dev/null and b/www/datatables/images/sort_asc_disabled.png differ diff --git a/www/datatables/images/sort_both.png b/www/datatables/images/sort_both.png new file mode 100644 index 00000000..18670406 Binary files /dev/null and b/www/datatables/images/sort_both.png differ diff --git a/www/datatables/images/sort_desc.png b/www/datatables/images/sort_desc.png new file mode 100644 index 00000000..def071ed Binary files /dev/null and b/www/datatables/images/sort_desc.png differ diff --git a/www/datatables/images/sort_desc_disabled.png b/www/datatables/images/sort_desc_disabled.png new file mode 100644 index 00000000..7824973c Binary files /dev/null and b/www/datatables/images/sort_desc_disabled.png differ diff --git a/www/default.css b/www/default.css index 8f5ad8f5..d5c560ed 100644 --- a/www/default.css +++ b/www/default.css @@ -12,45 +12,24 @@ body { color: #333; } -/****************************** tablesorter ******************************/ -table.tablesorter { - margin-top: 20px; - width: 100%; - text-align: left; -} -table.tablesorter thead tr th, -table.tablesorter tfoot tr th { - background-color: #C8E3F2; - border: 1px solid #FFF; - border-left: 0; - padding: 10px 5px; - vertical-align: middle; +/* DataTables: http://datatables.net/blog/Twitter_Bootstrap_2 */ + +table.table { + margin-top: 15px; } -table.tablesorter thead tr .header { - background-image: url(bg.gif); - background-repeat: no-repeat; - background-position: center right; + +table.table thead .sorting, +table.table thead .sorting_asc, +table.table thead .sorting_desc, +table.table thead .sorting_asc_disabled, +table.table thead .sorting_desc_disabled { cursor: pointer; -} -table.tablesorter tbody td { - color: #3D3D3D; - padding: 8px 5px; - background-color: #FFF; - vertical-align: top; -} -table.tablesorter tbody tr:hover td { - background-color: #F6DCD7 !important; -} -table.tablesorter tbody tr.odd td { - background-color: #eee; -} -table.tablesorter thead tr .headerSortUp { - background-image: url(asc.gif); -} -table.tablesorter thead tr .headerSortDown { - background-image: url(desc.gif); -} -table.tablesorter thead tr .headerSortDown, -table.tablesorter thead tr .headerSortUp { -background-color: #8dbdd8; -} + *cursor: hand; +} + +table.table thead .sorting { background: url('datatables/images/sort_both.png') no-repeat center right; } +table.table thead .sorting_asc { background: url('datatables/images/sort_asc.png') no-repeat center right; } +table.table thead .sorting_desc { background: url('datatables/images/sort_desc.png') no-repeat center right; } + +table.table thead .sorting_asc_disabled { background: url('datatables/images/sort_asc_disabled.png') no-repeat center right; } +table.table thead .sorting_desc_disabled { background: url('datatables/images/sort_desc_disabled.png') no-repeat center right; } diff --git a/www/default.js b/www/default.js index 423ecdd1..8d8dfc32 100644 --- a/www/default.js +++ b/www/default.js @@ -32,54 +32,49 @@ function change_cost(duration) { } -// add parser through the tablesorter addParser method -$.tablesorter.addParser({ - // set a unique id - id: "ioperf", - is: function(s) { return false; }, - format: function(s) { - // format your data for normalization - if (s == "Low") { - return 0; - } else if (s == "Moderate") { - return 1; - } else if (s == "High") { - return 2; - } else { - return 3; +$(function() { + $(document).ready(function() { + $('#data').dataTable({ + "bPaginate": false, + "bFilter": false, + "bInfo": false, + "aoColumnDefs": [ + { + "aTargets": ["ioperf"], + "sType": "span-sort" } - }, - // set type, either numeric or text - type: "numeric" -}); + ] + }); + }); -$(function() { - $(".tablesorter").tablesorter({ - headers: { - /* memory */ - 1: { - sorter: "digit" - }, - /* compute units */ - 2: { - sorter: "digit" - }, - /* storage */ - 3: { - sorter: "digit" - }, - /* i/o perf */ - 5: { - sorter: "ioperf" - } - }, - // sortList: [[0,1]], - widgets: ["zebra"] + $.extend($.fn.dataTableExt.oStdClasses, { + "sWrapper": "dataTables_wrapper form-inline" }); - + change_cost('hourly'); }); $("#cost-dropdown li").bind("click", function(e) { change_cost(e.target.getAttribute("duration")); }); + +// sorting for IO perf column +// http://datatables.net/plug-ins/sorting#hidden_title +jQuery.extend(jQuery.fn.dataTableExt.oSort, { + "span-sort-pre": function(elem) { + var matches = elem.match(/sort="(.*?)"/); + if (matches) { + console.log(elem + " - " + parseInt(matches[1], 10)); + return parseInt(matches[1], 10); + } + return 0; + }, + + "span-sort-asc": function(a, b) { + return ((a < b) ? -1 : ((a > b) ? 1 : 0)); + }, + + "span-sort-desc": function(a, b) { + return ((a < b) ? 1 : ((a > b) ? -1 : 0)); + } +}); diff --git a/www/desc.gif b/www/desc.gif deleted file mode 100644 index 3b30b3c5..00000000 Binary files a/www/desc.gif and /dev/null differ diff --git a/www/index.html b/www/index.html index c62bbf28..2a99e0fd 100644 --- a/www/index.html +++ b/www/index.html @@ -43,7 +43,7 @@

EC2Instances.info Easy Amazon EC2 Instance Comparison

- +
@@ -51,7 +51,7 @@

EC2Instances.info Easy Amazon EC2 Instance Comparison

- + @@ -59,13 +59,13 @@

EC2Instances.info Easy Amazon EC2 Instance Comparison

- + - + @@ -77,12 +77,11 @@

EC2Instances.info Easy Amazon EC2 Instance Comparison

- + - @@ -90,19 +89,19 @@

EC2Instances.info Easy Amazon EC2 Instance Comparison

- + - + - + @@ -114,7 +113,7 @@

EC2Instances.info Easy Amazon EC2 Instance Comparison

- + @@ -126,7 +125,7 @@

EC2Instances.info Easy Amazon EC2 Instance Comparison

- + @@ -138,7 +137,7 @@

EC2Instances.info Easy Amazon EC2 Instance Comparison

- + @@ -150,7 +149,7 @@

EC2Instances.info Easy Amazon EC2 Instance Comparison

- + @@ -162,7 +161,7 @@

EC2Instances.info Easy Amazon EC2 Instance Comparison

- + @@ -174,7 +173,7 @@

EC2Instances.info Easy Amazon EC2 Instance Comparison

- + @@ -186,7 +185,7 @@

EC2Instances.info Easy Amazon EC2 Instance Comparison

- + @@ -198,7 +197,7 @@

EC2Instances.info Easy Amazon EC2 Instance Comparison

- + @@ -210,7 +209,7 @@

EC2Instances.info Easy Amazon EC2 Instance Comparison

- + @@ -222,7 +221,7 @@

EC2Instances.info Easy Amazon EC2 Instance Comparison

- + @@ -234,7 +233,7 @@

EC2Instances.info Easy Amazon EC2 Instance Comparison

- + @@ -246,7 +245,7 @@

EC2Instances.info Easy Amazon EC2 Instance Comparison

- + @@ -255,23 +254,25 @@

EC2Instances.info Easy Amazon EC2 Instance Comparison

Name Compute Units Storage PlatformI/O PerfI/O Perf Max IPs API Name Linux cost
Standard Small 1.70 GB 1 (1 core x 1 unit) 160 GB 32/64-bitModerateModerate 8 m1.small $0.065 per hour 2 (1 core x 2 units) 410 GB 32/64-bitModerateModerate 12 m1.medium $0.13 per hour $0.23 per hour
Standard Large 4 (2 cores x 2 units) 850 GB (2 x 420 GB) 64-bitHigh (EBS Optimized)High (EBS Optimized) 30 m1.large $0.26 per hour $0.46 per hour
Standard Extra Large 15.00 GB 8 (4 cores x 2 units) 1690 GB (4 x 420 GB) 64-bitHigh (EBS Optimized)High (EBS Optimized) 60 m1.xlarge $0.52 per hour 2 (only for short bursts) 0 GB (EBS only) 32/64-bitLowLow 1 t1.micro $0.02 per hour 6.5 (2 cores x 3.25 units) 420 GB 64-bitModerateModerate 60 m2.xlarge $0.45 per hour 13 (4 cores x 3.25 units) 850 GB 64-bitHighHigh 120 m2.2xlarge $0.90 per hour 26 (8 cores x 3.25 units) 1690 GB (2 x 840 GB) 64-bitHigh (EBS Optimized)High (EBS Optimized) 240 m2.4xlarge $1.80 per hour 13 (4 cores x 3.25 units) 0 GB (EBS only) 64-bitModerateModerate 60 m3.xlarge $0.58 per hour 26 (8 cores x 3.25 units) 0 GB (EBS only) 64-bitHighHigh 120 m3.2xlarge $1.16 per hour 5 (2 cores x 2.5 units) 350 GB 32/64-bitModerateModerate 12 c1.medium $0.165 per hour 20 (8 cores x 2.5 units) 1690 GB (4 x 420 GB) 64-bitHighHigh 60 c1.xlarge $0.66 per hour 33.5 (2 x Intel Xeon X5570) 1690 GB (2 x 840 GB) 64-bitVery HighVery High 1 cc1.4xlarge $1.30 per hour 88 (2 x Intel Xeon E5-2670) 3370 GB (4 x 840 GB) 64-bitVery HighVery High 240 cc2.8xlarge $2.40 per hour 33.5 (2 x Intel Xeon X5570) 1690 GB (2 x 840 GB) 64-bitVery HighVery High 1 cg1.4xlarge $2.10 per hour 35 (2 x Intel Xeon X5570) 2048 GB (2 x 1024 GB SSD) 64-bitVery HighVery High 1 hi1.4xlarge $3.10 per hour
- - - - - - + + + + + + + + diff --git a/www/jquery.tablesorter.min.js b/www/jquery.tablesorter.min.js deleted file mode 100644 index b8605df1..00000000 --- a/www/jquery.tablesorter.min.js +++ /dev/null @@ -1,4 +0,0 @@ - -(function($){$.extend({tablesorter:new -function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:true,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'/\.|\,/g',onRenderHeader:null,selectorHeaders:'thead th',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}if(table.tBodies.length==0)return;var rows=table.tBodies[0].rows;if(rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function checkHeaderOptionsSortingLocked(table,i){if((table.config.headers[i])&&(table.config.headers[i].lockedOrder))return table.config.headers[i].lockedOrder;return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i b["+i+"]) ? 1 : 0));";};function makeSortTextDesc(i){return"((b["+i+"] < a["+i+"]) ? -1 : ((b["+i+"] > a["+i+"]) ? 1 : 0));";};function makeSortNumeric(i){return"a["+i+"]-b["+i+"];";};function makeSortNumericDesc(i){return"b["+i+"]-a["+i+"];";};function sortText(a,b){if(table.config.sortLocaleCompare)return a.localeCompare(b);return((ab)?1:0));};function sortTextDesc(a,b){if(table.config.sortLocaleCompare)return b.localeCompare(a);return((ba)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$.data(this,"tablesorter",config);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){$this.trigger("sortStart");var $cell=$(this);var i=this.column;this.order=this.count++%2;if(this.lockedOrder)this.order=this.lockedOrder;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i