ARTEMIS-2986 Improving Browsing functionality on the web console
This commit improves the "Browse Queues" view in the following ways: 1. Remove unused column "Queue Count" 1. When clicking on an address in the "address" column the respective address is selected in the navigation tree 1. Make "name" cell in each row clickable so it selects the respective queue in the navigation tree and sets the queue filter. 1. Make "message count" cell in each row clickable so it navigates to the message queue browser.
This commit is contained in:
parent
cecebb3f6e
commit
9d97c3b6de
|
@ -125,10 +125,13 @@ var Artemis;
|
||||||
};
|
};
|
||||||
ctrl.tableColumns = [
|
ctrl.tableColumns = [
|
||||||
{ header: 'ID', itemField: 'id' },
|
{ header: 'ID', itemField: 'id' },
|
||||||
{ header: 'Name', itemField: 'name' },
|
{ header: 'Name', itemField: 'name',
|
||||||
|
templateFn: function(value, item) { return '<a href="#" onclick="selectQueue(' + item.idx + ')">' + $sanitize(value) + '</a>' }
|
||||||
|
},
|
||||||
{ header: 'Routing Types', itemField: 'routingTypes' },
|
{ header: 'Routing Types', itemField: 'routingTypes' },
|
||||||
{ header: 'Queue Count', itemField: 'queueCount' },
|
{ header: 'Address', itemField: 'address',
|
||||||
{ header: 'Address', itemField: 'address' , templateFn: function(value, item) { return '<a href="#" onclick="selectAddress(' + item.idx + ')">' + $sanitize(value) + '</a>' }},
|
templateFn: function(value, item) { return '<a href="#" onclick="selectAddress(' + item.idx + ')">' + $sanitize(value) + '</a>' }
|
||||||
|
},
|
||||||
{ header: 'Routing Type', itemField: 'routingType' },
|
{ header: 'Routing Type', itemField: 'routingType' },
|
||||||
{ header: 'Filter', itemField: 'filter' },
|
{ header: 'Filter', itemField: 'filter' },
|
||||||
{ header: 'Durable', itemField: 'durable' },
|
{ header: 'Durable', itemField: 'durable' },
|
||||||
|
@ -136,7 +139,9 @@ var Artemis;
|
||||||
{ header: 'Purge On No Consumers', itemField: 'purgeOnNoConsumers' },
|
{ header: 'Purge On No Consumers', itemField: 'purgeOnNoConsumers' },
|
||||||
{ header: 'Consumer Count', itemField: 'consumerCount' },
|
{ header: 'Consumer Count', itemField: 'consumerCount' },
|
||||||
{ header: 'Rate', itemField: 'rate' },
|
{ header: 'Rate', itemField: 'rate' },
|
||||||
{ header: 'Message Count', itemField: 'messageCount' },
|
{ header: 'Message Count', itemField: 'messageCount',
|
||||||
|
templateFn: function(value, item) { return '<a href="#" onclick="browseQueue(' + item.idx + ')" title="Browse Messages">' + value + '</a>' }
|
||||||
|
},
|
||||||
{ header: 'Paused', itemField: 'paused' },
|
{ header: 'Paused', itemField: 'paused' },
|
||||||
{ header: 'Temporary', itemField: 'temporary' },
|
{ header: 'Temporary', itemField: 'temporary' },
|
||||||
{ header: 'Auto Created', itemField: 'autoCreated' },
|
{ header: 'Auto Created', itemField: 'autoCreated' },
|
||||||
|
@ -174,7 +179,7 @@ var Artemis;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (artemisAddress.address) {
|
if (artemisAddress.address) {
|
||||||
Artemis.log.debug("navigating to queue = " + artemisAddress.address.address);
|
Artemis.log.debug("navigating to address = " + artemisAddress.address.address);
|
||||||
ctrl.filter.values.field = ctrl.filter.fieldOptions[3].id;
|
ctrl.filter.values.field = ctrl.filter.fieldOptions[3].id;
|
||||||
ctrl.filter.values.operation = ctrl.filter.operationOptions[0].id;
|
ctrl.filter.values.operation = ctrl.filter.operationOptions[0].id;
|
||||||
ctrl.filter.values.value = artemisAddress.address.address;
|
ctrl.filter.values.value = artemisAddress.address.address;
|
||||||
|
@ -187,10 +192,24 @@ var Artemis;
|
||||||
$location.path("artemis/operations").search({"tab": "artemis", "nid": getQueuesNid(item, $location)});
|
$location.path("artemis/operations").search({"tab": "artemis", "nid": getQueuesNid(item, $location)});
|
||||||
};
|
};
|
||||||
selectAddress = function (idx) {
|
selectAddress = function (idx) {
|
||||||
var address = ctrl.queues[idx].address;
|
var item = ctrl.queues[idx]
|
||||||
Artemis.log.debug("navigating to address:" + address)
|
Artemis.log.debug("navigating to address:" + item.address);
|
||||||
artemisAddress.address = { address: address };
|
artemisAddress.address = { address: item.address };
|
||||||
$location.path("artemis/artemisAddresses");
|
$location.path("artemis/artemisAddresses").search({"tab": "artemis", "nid": getAddressesNid(item, $location)});
|
||||||
|
};
|
||||||
|
selectQueue = function (idx) {
|
||||||
|
var item = ctrl.queues[idx];
|
||||||
|
var nid = getQueuesNid(item, $location);
|
||||||
|
Artemis.log.debug("navigating to queue:" + nid);
|
||||||
|
artemisAddress.address = { address: item.address };
|
||||||
|
artemisQueue.queue = item;
|
||||||
|
$location.path("artemis/artemisQueues").search({"tab": "artemis", "nid": nid});
|
||||||
|
};
|
||||||
|
browseQueue = function (idx) {
|
||||||
|
var item = ctrl.queues[idx];
|
||||||
|
var nid = getQueuesNid(item, $location);
|
||||||
|
Artemis.log.debug("navigating to queue browser:" + nid);
|
||||||
|
$location.path("artemis/artemisBrowseQueue").search({"tab": "artemis", "nid": nid});
|
||||||
};
|
};
|
||||||
function getQueuesNid(item, $location) {
|
function getQueuesNid(item, $location) {
|
||||||
var rootNID = getRootNid($location);
|
var rootNID = getRootNid($location);
|
||||||
|
@ -198,6 +217,12 @@ var Artemis;
|
||||||
Artemis.log.debug("targetNID=" + targetNID);
|
Artemis.log.debug("targetNID=" + targetNID);
|
||||||
return targetNID;
|
return targetNID;
|
||||||
}
|
}
|
||||||
|
function getAddressesNid(item, $location) {
|
||||||
|
var rootNID = getRootNid($location);
|
||||||
|
var targetNID = rootNID + "addresses-" + item.address;
|
||||||
|
Artemis.log.debug("targetNID=" + targetNID);
|
||||||
|
return targetNID;
|
||||||
|
}
|
||||||
function getRootNid($location) {
|
function getRootNid($location) {
|
||||||
var currentNid = $location.search()['nid'];
|
var currentNid = $location.search()['nid'];
|
||||||
Artemis.log.debug("current nid=" + currentNid);
|
Artemis.log.debug("current nid=" + currentNid);
|
||||||
|
|
Loading…
Reference in New Issue