mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-16 18:02:05 +02:00
[onos-5204] This commit contains fix for bug onos-5204
Addressed review comments Addressed review comments - take2 Change-Id: I9eb1e19f70deffd33d57cdab6bb0346bd2ebbd98
This commit is contained in:
parent
f5e6be4da7
commit
317f329e56
@ -32,10 +32,10 @@
|
|||||||
tooltip tt-msg="topoTip"
|
tooltip tt-msg="topoTip"
|
||||||
ng-click="showIntent()"></div>
|
ng-click="showIntent()"></div>
|
||||||
|
|
||||||
<div ng-class="{'active': !!selId}"
|
<div ng-class="{'active': !!selId && isIntentInstalled()}"
|
||||||
icon icon-id="stop" icon-size="42"
|
icon icon-id="stop" icon-size="42"
|
||||||
tooltip tt-msg="deactivateTip"
|
tooltip tt-msg="deactivateTip"
|
||||||
ng-click="deactivateIntent()"></div>
|
ng-click="(!!selId && isIntentInstalled()) ? deactivateIntent():''"></div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -35,6 +35,8 @@
|
|||||||
$scope.briefTip = 'Switch to brief view';
|
$scope.briefTip = 'Switch to brief view';
|
||||||
$scope.detailTip = 'Switch to detailed view';
|
$scope.detailTip = 'Switch to detailed view';
|
||||||
$scope.brief = true;
|
$scope.brief = true;
|
||||||
|
$scope.intentState = 'NA';
|
||||||
|
$scope.fired = false;
|
||||||
|
|
||||||
function selCb($event, row) {
|
function selCb($event, row) {
|
||||||
$log.debug('Got a click on:', row);
|
$log.debug('Got a click on:', row);
|
||||||
@ -47,12 +49,24 @@
|
|||||||
appName: name,
|
appName: name,
|
||||||
key: row.key
|
key: row.key
|
||||||
} : null;
|
} : null;
|
||||||
|
|
||||||
|
$scope.intentState = row.state;
|
||||||
|
}
|
||||||
|
|
||||||
|
function respCb() {
|
||||||
|
if ($scope.fired) {
|
||||||
|
if ($scope.changedData) {
|
||||||
|
$scope.intentState = $scope.changedData.state;
|
||||||
|
}
|
||||||
|
$scope.fired = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tbs.buildTable({
|
tbs.buildTable({
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
tag: 'intent',
|
tag: 'intent',
|
||||||
selCb: selCb,
|
selCb: selCb,
|
||||||
|
respCb: respCb,
|
||||||
idKey: 'key'
|
idKey: 'key'
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -64,6 +78,10 @@
|
|||||||
d && ns.navTo('topo', d);
|
d && ns.navTo('topo', d);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.isIntentInstalled = function () {
|
||||||
|
return $scope.intentState === 'Installed';
|
||||||
|
};
|
||||||
|
|
||||||
$scope.deactivateIntent = function () {
|
$scope.deactivateIntent = function () {
|
||||||
var content = ds.createDiv();
|
var content = ds.createDiv();
|
||||||
|
|
||||||
@ -73,6 +91,7 @@
|
|||||||
function dOk() {
|
function dOk() {
|
||||||
var d = $scope.intentData;
|
var d = $scope.intentData;
|
||||||
d && tts.removeIntent(d);
|
d && tts.removeIntent(d);
|
||||||
|
$scope.fired = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function dCancel() {
|
function dCancel() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user