From eba936d0f9f6e714328d255d7b29100c451fa5d2 Mon Sep 17 00:00:00 2001 From: Stanislav Knot Date: Thu, 1 Mar 2018 15:29:22 +0100 Subject: [PATCH] ARTEMIS-1715 Disable to remove a divert from hawtio console --- .../src/main/webapp/plugin/js/artemisPlugin.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/artemisPlugin.js b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/artemisPlugin.js index d0c890a02e..5470aa3ed5 100644 --- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/artemisPlugin.js +++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/artemisPlugin.js @@ -230,7 +230,7 @@ var ARTEMIS = (function(ARTEMIS) { }); workspace.subLevelTabs.push({ - content: ' Delete', + content: ' Delete', title: "Delete an address", isValid: function (workspace) { return isAddress(workspace, artemisJmxDomain); @@ -341,7 +341,11 @@ var ARTEMIS = (function(ARTEMIS) { } function isAddress(workspace, domain) { - return workspace.hasDomainAndProperties(domain, {'component': 'addresses'}) && !workspace.hasDomainAndProperties(domain, {'subcomponent': 'queues'}); + return workspace.hasDomainAndProperties(domain, {'component': 'addresses'}) && !workspace.hasDomainAndProperties(domain, {'subcomponent': 'queues'}) && !workspace.hasDomainAndProperties(domain, {'subcomponent': 'diverts'}); + } + + function isDivert(workspace, domain) { + return workspace.hasDomainAndProperties(domain, {'subcomponent': 'diverts'}); } function isQueue(workspace, domain) {