diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/addresses.js b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/addresses.js index 6cc10b080c..66070eb860 100644 --- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/addresses.js +++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/addresses.js @@ -30,13 +30,13 @@ var ARTEMIS = (function(ARTEMIS) { var objectType = "address"; var method = 'listAddresses(java.lang.String, int, int)'; var defaultAttributes = [ - { - field: 'manage', - displayName: 'manage', - width: '*', - cellTemplate: '
attributes operations
' - }, - { + { + field: 'manage', + displayName: 'manage', + width: '*', + cellTemplate: '
attributes operations
' + }, + { field: 'id', displayName: 'ID', width: '*' @@ -44,7 +44,8 @@ var ARTEMIS = (function(ARTEMIS) { { field: 'name', displayName: 'Name', - width: '*' + width: '*', + cellTemplate: '
{{row.entity.name}}
' }, { field: 'routingTypes', @@ -56,6 +57,7 @@ var ARTEMIS = (function(ARTEMIS) { field: 'queueCount', displayName: 'Queue Count', width: '*', + cellTemplate: '
{{row.entity.queueCount}}
', sortable: false } ]; @@ -118,6 +120,10 @@ var ARTEMIS = (function(ARTEMIS) { $scope.navigateToAddressOps = function (row) { $location.path("jmx/operations").search({"tab": "artemis", "nid": ARTEMIS.getAddressNid(row.entity, $location)}); }; + $scope.selectQueues = function (row) { + artemisAddress.address = row.entity; + $location.path("artemis/queues"); + }; $scope.workspace = workspace; $scope.objects = []; $scope.totalServerItems = 0; @@ -168,9 +174,9 @@ var ARTEMIS = (function(ARTEMIS) { $scope.loadTable(); }; $scope.loadTable = function () { - $scope.filter.values.sortColumn = $scope.sortOptions.fields[0]; + $scope.filter.values.sortColumn = $scope.sortOptions.fields[0]; $scope.filter.values.sortBy = $scope.sortOptions.directions[0]; - $scope.filter.values.sortOrder = $scope.sortOptions.directions[0]; + $scope.filter.values.sortOrder = $scope.sortOptions.directions[0]; var mbean = getBrokerMBean(jolokia); if (mbean.includes("undefined")) { onBadMBean(); diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/queues.js b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/queues.js index e43d88a4a0..3cd9ea09b6 100644 --- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/queues.js +++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/queues.js @@ -19,7 +19,7 @@ */ var ARTEMIS = (function(ARTEMIS) { - ARTEMIS.QueuesController = function ($scope, $location, workspace, ARTEMISService, jolokia, localStorage, artemisConnection, artemisSession, artemisQueue) { + ARTEMIS.QueuesController = function ($scope, $location, workspace, ARTEMISService, jolokia, localStorage, artemisConnection, artemisSession, artemisQueue, artemisAddress) { var artemisJmxDomain = localStorage['artemisJmxDomain'] || "org.apache.activemq.artemis"; @@ -44,12 +44,14 @@ var ARTEMIS = (function(ARTEMIS) { { field: 'name', displayName: 'Name', - width: '*' + width: '*', + cellTemplate: '
{{row.entity.name}}
' }, { field: 'address', displayName: 'Address', - width: '*' + width: '*', + cellTemplate: '
{{row.entity.address}}
' }, { field: 'routingType', @@ -59,7 +61,8 @@ var ARTEMIS = (function(ARTEMIS) { { field: 'filter', displayName: 'Filter', - width: '*' + width: '*', + cellTemplate: '
{{row.entity.filter}}
' }, { field: 'durable', @@ -89,7 +92,8 @@ var ARTEMIS = (function(ARTEMIS) { { field: 'messageCount', displayName: 'Message Count', - width: '*' + width: '*', + cellTemplate: '
{{row.entity.messageCount}}
' }, // Hidden @@ -204,6 +208,12 @@ var ARTEMIS = (function(ARTEMIS) { * * TODO Refactor into new separate files */ + if (artemisAddress.address) { + $scope.filter.values.field = $scope.filter.fieldOptions[3].id; + $scope.filter.values.operation = $scope.filter.operationOptions[0].id; + $scope.filter.values.value = artemisAddress.address.name; + artemisAddress.address = null; + } if (artemisQueue.queue) { $scope.filter.values.field = $scope.filter.fieldOptions[1].id; $scope.filter.values.operation = $scope.filter.operationOptions[0].id; @@ -218,6 +228,13 @@ var ARTEMIS = (function(ARTEMIS) { $scope.navigateToQueueOps = function (row) { $location.path("jmx/operations").search({"tab": "artemis", "nid": ARTEMIS.getQueueNid(row.entity, $location)}); }; + $scope.navigateToBrowseQueue = function (row) { + $location.path("artemis/browseQueue").search({"tab": "artemis", "nid": ARTEMIS.getQueueNid(row.entity, $location)}); + }; + $scope.selectAddress = function (row) { + artemisAddress.address = row.entity; + $location.path("artemis/addresses"); + }; $scope.workspace = workspace; $scope.objects = []; $scope.totalServerItems = 0; @@ -268,9 +285,9 @@ var ARTEMIS = (function(ARTEMIS) { $scope.loadTable(); }; $scope.loadTable = function () { - $scope.filter.values.sortColumn = $scope.sortOptions.fields[0]; + $scope.filter.values.sortColumn = $scope.sortOptions.fields[0]; $scope.filter.values.sortBy = $scope.sortOptions.directions[0]; - $scope.filter.values.sortOrder = $scope.sortOptions.directions[0]; + $scope.filter.values.sortOrder = $scope.sortOptions.directions[0]; var mbean = getBrokerMBean(jolokia); if (mbean.includes("undefined")) { onBadMBean();