Skip to content

Commit

Permalink
#281 - durable subscriber detail dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
dejanb committed Nov 28, 2013
1 parent fc4bcc9 commit c4f202d
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
Expand Up @@ -43,4 +43,48 @@
</form>
</div>

<div hawtio-slideout="showSubscriberDialog.show" title="Details">
<div class="dialog-body">

<div class="row-fluid">
<div class="pull-right">
<form class="form-horizontal no-bottom-margin">

<button class="btn btn-danger" ng-disabled="!gridOptions.selectedItems.length"
ng-click="deleteDialog = true"
title="Delete the selected messages">
<i class="icon-remove"></i> Delete
</button>

<button class="btn" ng-click="showSubscriberDialog.close()" title="Close this dialog">
<i class="icon-remove"></i> Close
</button>

</form>
</div>
</div>

<div class="row-fluid">
<div class="expandable-body well">
<table class="table table-condensed table-striped">
<thead>
<tr>
<th>Property</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td class="property-name">Subscription Name</td>
<td class="property-value">{{showSubscriberDialog.subscriber["SubscriptionName"]}}</td>
</tr>
</tbody>
</table>
</div>
</div>

</div>

</div>

</div>
14 changes: 13 additions & 1 deletion hawtio-web/src/main/webapp/app/activemq/js/durableSubscriber.ts
Expand Up @@ -9,6 +9,7 @@ module ActiveMQ {

$scope.createSubscriberDialog = new Core.Dialog();
$scope.deleteSubscriberDialog = new Core.Dialog();
$scope.showSubscriberDialog = new Core.Dialog();

$scope.topicName = '';
$scope.clientId = '';
Expand All @@ -26,7 +27,7 @@ module ActiveMQ {
filterOptions: {
filterText: ''
},
selectWithCheckboxOnly: true,
selectWithCheckboxOnly: false,
showSelectionCheckbox: false,
maintainColumnRatios: false,
columnDefs: [
Expand All @@ -38,6 +39,7 @@ module ActiveMQ {
{
field: 'consumerId',
displayName: 'Consumer ID',
cellTemplate: '<div class="ngCellText"><a ng-click="openSubscriberDialog(row)">{{row.entity.consumerId}}</a></div>',
width: '45%'
},
{
Expand Down Expand Up @@ -80,6 +82,16 @@ module ActiveMQ {
}
};

$scope.openSubscriberDialog = (subscriber) => {
jolokia.request({type: "read", mbean: subscriber.entity._id, attribute:["SubscriptionName"]}, onSuccess( (response) => {
$scope.showSubscriberDialog.subscriber = response.value;

}));
$scope.showSubscriberDialog.open();
};



$scope.$watch('workspace.selection', function () {
if (workspace.moveIfViewInvalid()) return;

Expand Down

0 comments on commit c4f202d

Please sign in to comment.