(connectionId)
| 1517 | } |
| 1518 | |
| 1519 | function removeServer (connectionId) { |
| 1520 | var node; |
| 1521 | if (typeof(connectionId) === 'object') { |
| 1522 | // context menu click |
| 1523 | node = getKeyTree().get_node(connectionId.reference[0]); |
| 1524 | connectionId = getRootConnection(node); |
| 1525 | } |
| 1526 | else { |
| 1527 | node = getKeyTree().get_node(connectionId); |
| 1528 | } |
| 1529 | var result = confirm('Are you sure you want to disconnect from "' + node.text + '"?'); |
| 1530 | if (result) { |
| 1531 | $.post('logout/' + encodeURIComponent(connectionId), function (err, status) { |
| 1532 | if (status !== 'success') { |
| 1533 | return alert('Could not remove instance'); |
| 1534 | } |
| 1535 | $(window).off('beforeunload', 'clearStorage'); |
| 1536 | location.reload(); |
| 1537 | }); |
| 1538 | } |
| 1539 | } |
| 1540 | |
| 1541 | function addServer () { |
| 1542 | $('#addServerForm').trigger('submit'); |
nothing calls this directly
no test coverage detected