RBF: Add search box in Router's tab-mounttable web page (#3968)

This commit is contained in:
Neil 2022-02-10 01:17:23 +08:00 committed by GitHub
parent a08e69d33e
commit 390967f1f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 4 deletions

View File

@ -458,7 +458,7 @@ No nodes are decommissioning.
</ul> </ul>
</div> </div>
<small> <small>
<table class="table"> <table class="table" id="table-mounttable">
<thead> <thead>
<tr> <tr>
<th>Global path</th> <th>Global path</th>
@ -478,9 +478,9 @@ No nodes are decommissioning.
<tbody> <tbody>
{#MountTable} {#MountTable}
<tr> <tr>
<td>{sourcePath}</td> <td ng-value="{sourcePath}">{sourcePath}</td>
<td>{nameserviceId}</td> <td ng-value="{nameserviceId}">{nameserviceId}</td>
<td>{path}</td> <td ng-value="{path}">{path}</td>
<td>{order}</td> <td>{order}</td>
<td align="center" class="federationhealth-mounttable-icon federationhealth-mounttable-{readonly}" title="{status}"/> <td align="center" class="federationhealth-mounttable-icon federationhealth-mounttable-{readonly}" title="{status}"/>
<td align="center" class="mount-table-icon mount-table-fault-tolerant-{faulttolerant}" title="{ftStatus}"></td> <td align="center" class="mount-table-icon mount-table-fault-tolerant-{faulttolerant}" title="{ftStatus}"></td>

View File

@ -475,6 +475,22 @@
var base = dust.makeBase(HELPERS); var base = dust.makeBase(HELPERS);
dust.render('mounttable', base.push(data), function(err, out) { dust.render('mounttable', base.push(data), function(err, out) {
$('#tab-mounttable').html(out); $('#tab-mounttable').html(out);
$('#table-mounttable').dataTable( {
'lengthMenu': [ [25, 50, 100, -1], [25, 50, 100, "All"] ],
'columns': [
{ 'orderDataType': 'ng-value', 'searchable': true },
{ 'orderDataType': 'ng-value', 'searchable': true },
{ 'orderDataType': 'ng-value', 'searchable': true },
{ 'type': 'string' , "defaultContent": "" },
{ 'type': 'string' , "defaultContent": "" },
{ 'type': 'string' , "defaultContent": "" },
{ 'type': 'string' , "defaultContent": "" },
{ 'type': 'string' , "defaultContent": "" },
{ 'type': 'string' , "defaultContent": "" },
{ 'type': 'string' , "defaultContent": "" },
{ 'type': 'string' , "defaultContent": "" },
{ 'type': 'string' , "defaultContent": "" }
]});
$('#ui-tabs a[href="#tab-mounttable"]').tab('show'); $('#ui-tabs a[href="#tab-mounttable"]').tab('show');
}); });
})).fail(ajax_error_handler); })).fail(ajax_error_handler);