[onos-5262] Adding patchset 1
[onos-5262] Adding patchset 2
Change-Id: I43cb43deca16bcfe1874699bccdb94b0301d30d1
diff --git a/web/gui/src/main/webapp/app/view/intent/intent.js b/web/gui/src/main/webapp/app/view/intent/intent.js
index 1b49a98..71c07cf 100644
--- a/web/gui/src/main/webapp/app/view/intent/intent.js
+++ b/web/gui/src/main/webapp/app/view/intent/intent.js
@@ -71,6 +71,7 @@
});
$scope.topoTip = 'Show selected intent on topology view';
+ $scope.resubmitTip = 'Resubmit selected intent';
$scope.deactivateTip = 'Remove selected intent';
$scope.purgeTip = 'Purge selected intent';
@@ -87,20 +88,22 @@
return $scope.intentState === 'Withdrawn';
};
- function executeAction(bPurge) {
+ function executeAction(action) {
var content = ds.createDiv(),
- txt = bPurge ? 'purge' : 'withdraw' ;
+ txt,
+ bPurge = action === 'purge';
$scope.intentData.intentPurge = bPurge;
content.append('p').
- text('Are you sure you want to '+ txt +
+ text('Are you sure you want to '+ action +
' the selected intent?');
function dOk() {
var d = $scope.intentData;
$log.debug(d);
- d && tts.removeIntent(d);
+ d && (action === 'resubmit' ? tts.resubmitIntent(d) :
+ tts.removeIntent(d));
$scope.fired = true;
}
@@ -118,11 +121,15 @@
}
$scope.deactivateIntent = function () {
- executeAction(false);
+ executeAction("withdraw");
+ };
+
+ $scope.resubmitIntent = function () {
+ executeAction("resubmit");
};
$scope.purgeIntent = function () {
- executeAction(true);
+ executeAction("purge");
};
$scope.briefToggle = function () {