This is an automated email from the ASF dual-hosted git repository.
eallen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
The following commit(s) were added to refs/heads/master by this push:
new 7d3f860 DISPATCH-1308 Only allow manual killing of endpoint
connections
7d3f860 is described below
commit 7d3f86038b844dd7e9bc705f4a93117b6f98a64a
Author: Ernest Allen <[email protected]>
AuthorDate: Mon May 13 12:57:13 2019 -0400
DISPATCH-1308 Only allow manual killing of endpoint connections
---
console/stand-alone/plugin/html/qdrOverview.html | 2 +-
console/stand-alone/plugin/js/qdrList.js | 2 +-
console/stand-alone/plugin/js/qdrOverview.js | 5 ++++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/console/stand-alone/plugin/html/qdrOverview.html
b/console/stand-alone/plugin/html/qdrOverview.html
index 05b27b8..dd94aac 100644
--- a/console/stand-alone/plugin/html/qdrOverview.html
+++ b/console/stand-alone/plugin/html/qdrOverview.html
@@ -203,7 +203,7 @@ under the License.
<li ng-repeat="mode in gridModes"
ng-click="selectMode(mode,'Connection')" ng-class="{active :
isModeSelected(mode,'Connection')}" title="{{mode.title}}"
ng-bind-html="mode.content"> </li>
</ul>
<div ng-if="isModeVisible('Connection','attributes')"
class="selectedItems">
- <h3>Connection {{connection.title}} <button
ng-click="killAConnection(connection)" class="btn btn-danger">Kill</button></h3>
+ <h3>Connection {{connection.title}} <span
ng-if="isNormalConnection(connection)" <button
ng-click="killAConnection(connection)" class="btn btn-danger">Kill</button></h3>
<div class="grid noHighlight" ui-grid="connectionGrid"
ui-grid-auto-resize ui-grid-resize-columns ui-grid-save-state></div>
</div>
<div ng-if="isModeVisible('Connection','links')" class="selectedItems">
diff --git a/console/stand-alone/plugin/js/qdrList.js
b/console/stand-alone/plugin/js/qdrList.js
index 3d79417..53427f7 100644
--- a/console/stand-alone/plugin/js/qdrList.js
+++ b/console/stand-alone/plugin/js/qdrList.js
@@ -560,7 +560,7 @@ export class ListController {
}
});
$scope.isConnection = function (selectedEntity) {
- return selectedEntity === 'connection';
+ return selectedEntity === 'connection' && $scope.detailsObject &&
$scope.detailsObject.role === 'normal';
};
$scope.killAConnection = function (selectedRecordName) {
const identityField = $scope.detailFields.filter(field => field.name ===
'identity');
diff --git a/console/stand-alone/plugin/js/qdrOverview.js
b/console/stand-alone/plugin/js/qdrOverview.js
index 0350464..be7d94e 100644
--- a/console/stand-alone/plugin/js/qdrOverview.js
+++ b/console/stand-alone/plugin/js/qdrOverview.js
@@ -802,7 +802,7 @@ export class OverviewController {
{
field: 'Kill',
width: '4%',
- cellTemplate: '<div><button class="btn btn-danger"
ng-click="grid.appScope.killConnection(row, $event)">Kill</button></div>'
+ cellTemplate: '<div ng-if="row.entity.role === \'normal\'"><button
class="btn btn-danger" ng-click="grid.appScope.killConnection(row,
$event)">Kill</button></div>'
}
],
enablePaging: true,
@@ -819,6 +819,9 @@ export class OverviewController {
enableRowHeaderSelection: false,
noUnselect: true
};
+ $scope.isNormalConnection = function (connection) {
+ return connection.data.fields.role === 'normal';
+ };
$scope.killConnection = function (row, event) {
row.cancelEvent = true;
killDialog(row);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]