Skip to content

Commit

Permalink
Merge "Closes-bug: #1447290 - Gearbox for BGP Peer doesn't have delet…
Browse files Browse the repository at this point in the history
…e action"
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed May 8, 2015
2 parents e093c5c + f76af24 commit a069761
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions webroot/config/bgp/ui/js/bgp_config.js
Expand Up @@ -870,6 +870,13 @@ function initComponents() {
onClick: function(rowIndex){
onActionChange('edit-control',rowIndex);
}
},
{
title: 'Delete',
iconClass: 'icon-trash',
onClick: function(rowIndex){
showRemoveWindow(rowIndex);
}
}
],
detail: {
Expand Down Expand Up @@ -961,6 +968,30 @@ function initComponents() {
$('#confirmPeers').modal({backdrop:'static', keyboard: false, show:false});
}

function showRemoveWindow(rowIndex) {
$.contrailBootstrapModal({
id: 'confirmRemove',
title: 'Remove',
body: '<h6>Confirm BGP Router delete</h6>',
footer: [{
title: 'Cancel',
onclick: 'close',
},
{
id: 'btnRemovePopupOK',
title: 'Confirm',
rowIdentifier: rowIndex,
onclick: function(){
var rowNum = this.rowIdentifier;
var selected_row = $("#gridBGP").data("contrailGrid")._dataView.getItem(rowNum);
deleteBgp([selected_row]);
$('#confirmRemove').modal('hide');
},
className: 'btn-primary'
}]
});
}

function onAuthTypeChanged(e) {
if(e.added.value === 'none') {
$('#txtAuthKey').val(' ');
Expand Down

0 comments on commit a069761

Please sign in to comment.