Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix #600, requires fabric-core rebuild to pick up new JMX api call
  • Loading branch information
gashcrumb committed Oct 1, 2013
1 parent 05f669a commit 3e7922c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 8 additions & 2 deletions hawtio-web/src/main/webapp/app/fabric/js/containerDirective.ts
Expand Up @@ -11,7 +11,8 @@ module Fabric {
public controller($scope, $element, $attrs, jolokia, $location, workspace) {

$scope.containerArgs = ["id", "alive", "parentId", "profileIds", "versionId", "provisionResult", "jolokiaUrl", "root", 'jmxDomains'];
$scope.containersOp = 'containers(java.util.List)';
$scope.profileFields = ["id", "hidden"];
$scope.containersOp = 'containers(java.util.List, java.util.List)';
$scope.ensembleContainerIdListOp = 'EnsembleContainers';

$scope.containers = [];
Expand Down Expand Up @@ -86,6 +87,11 @@ module Fabric {
$scope.containers.each((container) => {
container.profileIds.each((profile) => {

var p = container.profiles.find((p) => { return p.id === profile; });
if (p && p.hidden) {
return;
}

var activeProfile = answer.find((o) => { return o.versionId === container.versionId && o.id === profile });

if (activeProfile) {
Expand Down Expand Up @@ -347,7 +353,7 @@ module Fabric {


Core.register(jolokia, $scope, [
{type: 'exec', mbean: Fabric.managerMBean, operation: $scope.containersOp, arguments: [$scope.containerArgs]},
{type: 'exec', mbean: Fabric.managerMBean, operation: $scope.containersOp, arguments: [$scope.containerArgs, $scope.profileFields]},
{type: 'read', mbean: Fabric.clusterManagerMBean, attribute: $scope.ensembleContainerIdListOp}
], onSuccess($scope.dispatch));

Expand Down
Expand Up @@ -59,6 +59,8 @@ module Fabric {
}
});

$scope.profiles = $scope.profiles.exclude((p) => { return p.hidden; });

if ($scope.excludedProfiles) {
$scope.profiles = $scope.profiles.exclude((p) => { return $scope.excludedProfiles.some((e) => { return e === p.id; })});
}
Expand Down Expand Up @@ -174,7 +176,7 @@ module Fabric {
jolokia.request({
type: 'exec', mbean: Fabric.managerMBean,
operation: 'getProfiles(java.lang.String, java.util.List)',
arguments: [$scope.versionId, ['id']]
arguments: [$scope.versionId, ['id', 'hidden']]
},
{
method: 'POST',
Expand All @@ -194,7 +196,7 @@ module Fabric {
type: 'exec',
mbean: managerMBean,
operation: 'getProfiles(java.lang.String, java.util.List)',
arguments: [$scope.versionId, ['id']]
arguments: [$scope.versionId, ['id', 'hidden']]
}, onSuccess($scope.render));
}
};
Expand Down

0 comments on commit 3e7922c

Please sign in to comment.