Skip to content

Commit

Permalink
Link to existing detail pages
Browse files Browse the repository at this point in the history
  • Loading branch information
gashcrumb committed May 29, 2013
1 parent ca72ff9 commit 992033c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
6 changes: 2 additions & 4 deletions hawtio-web/src/main/webapp/app/fabric/html/fabricView.html
Expand Up @@ -41,6 +41,7 @@

<div class="box-right">
<i class="icon1point5x icon-signin clickable" ng-show="container.jolokiaUrl && container.alive" title="Open a new window and connect to this container" ng-click="connect(container)"></i>
<i class="icon1point5x clickable icon-info-sign" title="Show Details" ng-click="showContainer(container)"></i>
<i class="icon1point5x" title="{{getStatusTitle(container)}}" ng-class='statusIcon(container)'></i>
</div>

Expand Down Expand Up @@ -124,7 +125,7 @@
</div>

<div class="box-right">
<i class="icon1point5x clickable icon-info-sign" title="Show Details"></i>
<i class="icon1point5x clickable icon-info-sign" title="Show Details" ng-click="showProfile(profile)"></i>
</div>

</div>
Expand Down Expand Up @@ -229,7 +230,4 @@
</form>
</div>




</div>
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/fabric/js/fabricPlugin.ts
Expand Up @@ -13,7 +13,7 @@ module Fabric {
when('/fabric/profiles', {templateUrl: 'app/fabric/html/profiles.html'}).
when('/fabric/profile/:versionId/:profileId', {templateUrl: 'app/fabric/html/profile.html'}).
when('/fabric/profile/:versionId/:profileId/:fname', {templateUrl: 'app/fabric/html/pid.html'}).
when('/fabric/view', {templateUrl: 'app/fabric/html/fabricView.html'});
when('/fabric/view', { templateUrl: 'app/fabric/html/fabricView.html', reloadOnSearch: false });
}).
run(($location: ng.ILocationService, workspace: Workspace, jolokia, viewRegistry, pageTitle) => {

Expand Down
24 changes: 17 additions & 7 deletions hawtio-web/src/main/webapp/app/fabric/js/fabricView.ts
Expand Up @@ -7,10 +7,6 @@ module Fabric {
$scope.containersOp = 'containers(java.util.List)';

$scope.activeVersionId = $location.search()['cv'];
$scope.activeProfileId = $location.search()['cp'];
$scope.activeContainerId = $location.search()['ac'];
$scope.activeContainerVersion = $location.search()['acv'];


$scope.versions = [];
$scope.profiles = [];
Expand All @@ -36,6 +32,7 @@ module Fabric {
$scope.createProfileDialog = false;
$scope.createVersionDialog = false;


// Data for profile/version creation dialogs
$scope.createProfileGridOptions = {
data: 'profiles',
Expand Down Expand Up @@ -92,6 +89,9 @@ module Fabric {
$scope.selectedParents = [];
$scope.selectedParentVersion = [];

$scope.$on('$routeUpdate', () => {
$scope.activeVersionId = $location.search()['cv'];
});

// watchers for selection handling
$scope.$watch('activeVersionId', (oldValue, newValue) => {
Expand All @@ -101,6 +101,7 @@ module Fabric {
$scope.activeProfileId = '';
$scope.profiles = [];
}
$location.search('cv', $scope.activeVersionId);
}
});

Expand Down Expand Up @@ -253,7 +254,7 @@ module Fabric {
if ($scope.selectedActiveProfiles.length > 0) {

if ($scope.selectedActiveProfiles.none( (ap) => {
console.log("Checking ap: ", ap, " container: ", container);
//console.log("Checking ap: ", ap, " container: ", container);
return ap.versionId === container.versionId &&
container.profileIds.some(ap.id);
})) {
Expand Down Expand Up @@ -534,6 +535,16 @@ module Fabric {
};


$scope.showProfile = (profile) => {
$location.path('/fabric/profile/' + $scope.activeVersionId + '/' + profile.id);
};


$scope.showContainer = (container) => {
$location.path('/fabric/container/' + container.id);
};


$scope.updateContainers = (newContainers) => {

var response = angular.toJson(newContainers);
Expand Down Expand Up @@ -585,8 +596,7 @@ module Fabric {
{type: 'exec', mbean: managerMBean, operation: $scope.containersOp, arguments: [$scope.containerArgs]}
], onSuccess($scope.dispatch));

};



}
}

0 comments on commit 992033c

Please sign in to comment.