mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-23 21:31:00 +02:00
ONOS-7021 Application View: Add Filter Widget
Change-Id: I71d027921b06203fadfa7b2b95a28cf0714c0c90
This commit is contained in:
parent
0c47d5386e
commit
f9c40da3b9
@ -44,6 +44,22 @@
|
||||
ng-class="{active: ctrlBtnState.selection}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search">
|
||||
<input type="text" ng-model="queryTxt" placeholder="Search"/>
|
||||
<select ng-model="queryBy">
|
||||
<option value="" disabled>Search By</option>
|
||||
<option value="$">All Fields</option>
|
||||
<option value="title">{{lion('title')}}</option>
|
||||
<option value="id">{{lion('app_id')}}</option>
|
||||
<option value="version">{{lion('version')}}</option>
|
||||
<option value="category">{{lion('category')}}</option>
|
||||
<option value="apporiginName">{{lion('origin')}}</option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="summary-list" onos-table-resize>
|
||||
@ -69,7 +85,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr ng-repeat="app in tableData track by $index"
|
||||
<tr ng-repeat="app in tableData | filter:queryFilter track by $index"
|
||||
ng-click="selectCallback($event, app)"
|
||||
ng-class="{selected: app.id === selId}"
|
||||
ng-repeat-complete row-id="{{app.id}}">
|
||||
|
@ -402,6 +402,15 @@
|
||||
ds.closeDialog();
|
||||
});
|
||||
|
||||
Object.defineProperty($scope, 'queryFilter', {
|
||||
get: function () {
|
||||
var out = {};
|
||||
out[$scope.queryBy || '$'] = $scope.queryTxt;
|
||||
return out;
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
$log.log('OvAppCtrl has been created');
|
||||
}])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user