From b012766b9f5b3125be655cb8dd32ea773c603c7c Mon Sep 17 00:00:00 2001 From: Stanislav Knot Date: Fri, 2 Mar 2018 14:18:19 +0100 Subject: [PATCH] ARTEMIS-1725 fix browsing non-listing tabs under JMX --- .../src/main/webapp/plugin/js/artemisPlugin.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 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 72c881f1b3..d0c890a02e 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 @@ -105,12 +105,21 @@ var ARTEMIS = (function(ARTEMIS) { .when('/artemis/browseQueue', { templateUrl: ARTEMIS.templatePath + 'browseQueue.html' }) + .when('/jmx/browseQueue', { + templateUrl: ARTEMIS.templatePath + 'browseQueue.html' + }) .when('/artemis/diagram', { templateUrl: ARTEMIS.templatePath + 'brokerDiagram.html' }) + .when('/jmx/diagram', { + templateUrl: ARTEMIS.templatePath + 'brokerDiagram.html' + }) .when('/artemis/sendMessage', { templateUrl: ARTEMIS.templatePath + 'sendMessage.html' }) + .when('/jmx/sendMessage', { + templateUrl: ARTEMIS.templatePath + 'sendMessage.html' + }) .when('/artemis/connections', { templateUrl: ARTEMIS.templatePath + 'connections.html' }) @@ -257,21 +266,21 @@ var ARTEMIS = (function(ARTEMIS) { content: ' Browse', title: "Browse the messages on the queue", isValid: function (workspace) { return isQueue(workspace, artemisJmxDomain); }, - href: function () { return "#/artemis/browseQueue"; } + href: function () { if (workspace.isTopTabActive("artemis")) return "#/artemis/browseQueue"; else return "#/jmx/browseQueue";} }); workspace.subLevelTabs.push({ content: ' Send', title: "Send a message to this address", isValid: function (workspace) { return isAddress(workspace, artemisJmxDomain) || isQueue(workspace, artemisJmxDomain); }, - href: function () { return "#/artemis/sendMessage"; } + href: function () { if (workspace.isTopTabActive("artemis")) return "#/artemis/sendMessage"; else return "#/jmx/sendMessage";} }); workspace.subLevelTabs.unshift({ content: ' Diagram             |', title: "View a diagram of the producers, destinations and consumers", isValid: function (workspace) { return workspace.isTopTabActive("artemis") || workspace.selectionHasDomain(artemisJmxDomain); }, - href: function () { return "#/artemis/diagram"; } + href: function () { if (workspace.isTopTabActive("artemis"))return "#/artemis/diagram"; else return "#/jmx/diagram";} }); workspace.subLevelTabs.unshift({