You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ea...@apache.org on 2018/07/06 21:52:14 UTC

qpid-dispatch git commit: DISPATCH-1038 Don't provide Delete option in console for http enabled listener.

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 73a9658f9 -> a18397d81


DISPATCH-1038 Don't provide Delete option in console for http enabled listener.


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/a18397d8
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/a18397d8
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/a18397d8

Branch: refs/heads/master
Commit: a18397d81280fc5c2c5bed19f803add4735a531e
Parents: 73a9658
Author: Ernest Allen <ea...@redhat.com>
Authored: Fri Jul 6 17:51:56 2018 -0400
Committer: Ernest Allen <ea...@redhat.com>
Committed: Fri Jul 6 17:51:56 2018 -0400

----------------------------------------------------------------------
 console/stand-alone/plugin/js/qdrList.js | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/a18397d8/console/stand-alone/plugin/js/qdrList.js
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/js/qdrList.js b/console/stand-alone/plugin/js/qdrList.js
index 5160fc4..673ad0f 100644
--- a/console/stand-alone/plugin/js/qdrList.js
+++ b/console/stand-alone/plugin/js/qdrList.js
@@ -75,7 +75,7 @@ export class ListController {
         id: 'delete',
         op: 'DELETE',
         title: 'Delete',
-        isValid: function () { return $scope.operations.indexOf(this.op) > -1; }
+        isValid: function () { return canDelete(); }
       },
       {
         content: '<a><i class="icon-eye-open"></i> Fetch</a>',
@@ -85,6 +85,16 @@ export class ListController {
         isValid: function () { return ($scope.selectedEntity === 'log'); }
       }
     ];
+    let canDelete = function () {
+      if ($scope.selectedEntity === 'listener' && $scope.detailFields) {
+        if ($scope.detailFields.some( function (field) {
+          return field.attributeName === 'Http' && field.attributeValue === true;
+        })) {
+          return false;
+        }
+      }
+      return $scope.operations.indexOf('DELETE') > -1;
+    };
     $scope.operations = [];
     $scope.currentMode = $scope.modes[0];
     $scope.isModeSelected = function (mode) {
@@ -185,8 +195,6 @@ export class ListController {
           list.push(tnode.key);
         }
       });
-      console.log('saving expanded list');
-      console.log(list);
       localStorage[ListExpandedKey] = JSON.stringify(list);
     };
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org