|
@@ -333,7 +333,11 @@
|
|
$('#tab-datanode').html(out);
|
|
$('#tab-datanode').html(out);
|
|
$('#table-datanodes').dataTable( {
|
|
$('#table-datanodes').dataTable( {
|
|
'lengthMenu': [ [25, 50, 100, -1], [25, 50, 100, "All"] ],
|
|
'lengthMenu': [ [25, 50, 100, -1], [25, 50, 100, "All"] ],
|
|
|
|
+ 'columnDefs': [
|
|
|
|
+ { 'targets': [ 0 ], 'visible': false, 'searchable': false }
|
|
|
|
+ ],
|
|
'columns': [
|
|
'columns': [
|
|
|
|
+ { 'orderDataType': 'ng-value', 'searchable': true , "defaultContent": "" },
|
|
{ 'orderDataType': 'ng-value', 'searchable': true , "defaultContent": "" },
|
|
{ 'orderDataType': 'ng-value', 'searchable': true , "defaultContent": "" },
|
|
{ 'orderDataType': 'ng-value', 'searchable': true , "defaultContent": ""},
|
|
{ 'orderDataType': 'ng-value', 'searchable': true , "defaultContent": ""},
|
|
{ 'orderDataType': 'ng-value', 'type': 'num' , "defaultContent": 0},
|
|
{ 'orderDataType': 'ng-value', 'type': 'num' , "defaultContent": 0},
|
|
@@ -342,7 +346,22 @@
|
|
{ 'type': 'num' , "defaultContent": 0},
|
|
{ 'type': 'num' , "defaultContent": 0},
|
|
{ 'orderDataType': 'ng-value', 'type': 'num' , "defaultContent": 0},
|
|
{ 'orderDataType': 'ng-value', 'type': 'num' , "defaultContent": 0},
|
|
{ 'type': 'string' , "defaultContent": ""}
|
|
{ 'type': 'string' , "defaultContent": ""}
|
|
- ]});
|
|
|
|
|
|
+ ],
|
|
|
|
+ initComplete: function () {
|
|
|
|
+ var column = this.api().column([0]);
|
|
|
|
+ var select = $('<select class="datanodestatus form-control input-sm"><option value="">All</option></select>')
|
|
|
|
+ .appendTo('#datanodefilter')
|
|
|
|
+ .on('change', function () {
|
|
|
|
+ var val = $.fn.dataTable.util.escapeRegex(
|
|
|
|
+ $(this).val());
|
|
|
|
+ column.search(val ? '^' + val + '$' : '', true, false).draw();
|
|
|
|
+ });
|
|
|
|
+ console.log(select);
|
|
|
|
+ column.data().unique().sort().each(function (d, j) {
|
|
|
|
+ select.append('<option value="' + d + '">' + d + '</option>');
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
renderHistogram(data);
|
|
renderHistogram(data);
|
|
$('#ui-tabs a[href="#tab-datanode"]').tab('show');
|
|
$('#ui-tabs a[href="#tab-datanode"]').tab('show');
|
|
});
|
|
});
|
|
@@ -469,4 +488,4 @@ function open_hostip_list(x0, x1) {
|
|
function close_hostip_list() {
|
|
function close_hostip_list() {
|
|
$("#datanode_ips").remove();
|
|
$("#datanode_ips").remove();
|
|
$("#close_ips").remove();
|
|
$("#close_ips").remove();
|
|
-}
|
|
|
|
|
|
+}
|