Kavitha Alagesan
Committed by Simon Hunt

fix for ONOS-3428

Change-Id: I180ee4fb26383c017fbeff98c324d99dc21a34c4
(cherry picked from commit b7fc92d5)
......@@ -8,6 +8,23 @@
tooltip tt-msg="autoRefreshTip"
ng-click="toggleRefresh()"></div>
<div class="separator"></div>
<span ng-if="brief">
<div class="active"
icon icon-id="plus" icon-size="42"
tooltip tt-msg="detailTip"
ng-click="briefToggle()"> </div>
</span>
<span ng-if="!brief">
<div class="active"
icon icon-id="minus" icon-size="42"
tooltip tt-msg="briefTip"
ng-click="briefToggle()"> </div>
</span>
<div class="separator"></div>
<div ng-class="{active: !!selId}"
......@@ -57,12 +74,12 @@
</tr>
<tr ng-click="selectCallback($event, intent)"
ng-class="{selected: intent.key === selId}"
row-id="{{intent.key}}">
row-id="{{intent.key}}" ng-hide="brief" >
<td class="resources" colspan="5">{{intent.resources}}</td>
</tr>
<tr ng-click="selectCallback($event, intent)"
ng-class="{selected: intent.key === selId}"
row-id="{{intent.key}}" ng-repeat-end>
row-id="{{intent.key}}" ng-hide="brief" ng-repeat-end>
<td class="details" colspan="5">{{intent.details}}</td>
</tr>
</table>
......
......@@ -32,6 +32,9 @@
'TopoTrafficService', 'DialogService',
function ($log, $scope, tbs, ns, tts, ds) {
$scope.briefTip = 'Switch to brief view';
$scope.detailTip = 'Switch to detailed view';
$scope.brief = true;
function selCb($event, row) {
$log.debug('Got a click on:', row);
......@@ -85,6 +88,10 @@
.bindKeys();
};
$scope.briefToggle = function () {
$scope.brief = !$scope.brief;
};
$scope.$on('$destroy', function () {
ds.closeDialog();
$log.debug('OvIntentCtrl has been destroyed');
......