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 @@
Name | @@ -51,7 +51,7 @@Compute Units | Storage | Platform | -I/O Perf | +I/O Perf | Max IPs | API Name | Linux cost | @@ -59,13 +59,13 @@|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Standard Small | 1.70 GB | 1 (1 core x 1 unit) | 160 GB | 32/64-bit | -Moderate | +Moderate | 8 | m1.small | $0.065 per hour | @@ -77,12 +77,11 @@2 (1 core x 2 units) | 410 GB | 32/64-bit | -Moderate | +Moderate | 12 | m1.medium | $0.13 per hour | $0.23 per hour | -|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Standard Large | @@ -90,19 +89,19 @@4 (2 cores x 2 units) | 850 GB (2 x 420 GB) | 64-bit | -High (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-bit | -High (EBS Optimized) | +High (EBS Optimized) | 60 | m1.xlarge | $0.52 per hour | @@ -114,7 +113,7 @@2 (only for short bursts) | 0 GB (EBS only) | 32/64-bit | -Low | +Low | 1 | t1.micro | $0.02 per hour | @@ -126,7 +125,7 @@6.5 (2 cores x 3.25 units) | 420 GB | 64-bit | -Moderate | +Moderate | 60 | m2.xlarge | $0.45 per hour | @@ -138,7 +137,7 @@13 (4 cores x 3.25 units) | 850 GB | 64-bit | -High | +High | 120 | m2.2xlarge | $0.90 per hour | @@ -150,7 +149,7 @@26 (8 cores x 3.25 units) | 1690 GB (2 x 840 GB) | 64-bit | -High (EBS Optimized) | +High (EBS Optimized) | 240 | m2.4xlarge | $1.80 per hour | @@ -162,7 +161,7 @@13 (4 cores x 3.25 units) | 0 GB (EBS only) | 64-bit | -Moderate | +Moderate | 60 | m3.xlarge | $0.58 per hour | @@ -174,7 +173,7 @@26 (8 cores x 3.25 units) | 0 GB (EBS only) | 64-bit | -High | +High | 120 | m3.2xlarge | $1.16 per hour | @@ -186,7 +185,7 @@5 (2 cores x 2.5 units) | 350 GB | 32/64-bit | -Moderate | +Moderate | 12 | c1.medium | $0.165 per hour | @@ -198,7 +197,7 @@20 (8 cores x 2.5 units) | 1690 GB (4 x 420 GB) | 64-bit | -High | +High | 60 | c1.xlarge | $0.66 per hour | @@ -210,7 +209,7 @@33.5 (2 x Intel Xeon X5570) | 1690 GB (2 x 840 GB) | 64-bit | -Very High | +Very High | 1 | cc1.4xlarge | $1.30 per hour | @@ -222,7 +221,7 @@88 (2 x Intel Xeon E5-2670) | 3370 GB (4 x 840 GB) | 64-bit | -Very High | +Very High | 240 | cc2.8xlarge | $2.40 per hour | @@ -234,7 +233,7 @@33.5 (2 x Intel Xeon X5570) | 1690 GB (2 x 840 GB) | 64-bit | -Very High | +Very High | 1 | cg1.4xlarge | $2.10 per hour | @@ -246,7 +245,7 @@35 (2 x Intel Xeon X5570) | 2048 GB (2 x 1024 GB SSD) | 64-bit | -Very High | +Very High | 1 | hi1.4xlarge | $3.10 per hour | @@ -255,23 +254,25 @@