ONOS-7021 Application View: Add Filter Widget

Change-Id: I71d027921b06203fadfa7b2b95a28cf0714c0c90
This commit is contained in:
ArturoF Velasco 2017-10-09 17:30:30 +02:00 committed by Steven Burrows
parent 0c47d5386e
commit f9c40da3b9
2 changed files with 26 additions and 1 deletions

View File

@ -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}}">

View File

@ -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');
}])