Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#456 Add details page for scr components.
- Loading branch information
Showing
8 changed files
with
179 additions
and
12 deletions.
There are no files selected for viewing
100 changes: 100 additions & 0 deletions
100
hawtio-web/src/main/webapp/app/karaf/html/scr-component-details.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<div> | ||
<table class="overviewSection"> | ||
<tr ng-hide="hasFabric"> | ||
<td></td> | ||
<td class="less-big"> | ||
<div class="btn-group"> | ||
<button ng-disabled="selectedComponents.length == 0" class="btn" ng-click="activate()"><i | ||
class="icon-play-circle"></i> Activate | ||
</button> | ||
<button ng-disabled="selectedComponents.length == 0" class="btn" ng-click="deactivate()"><i | ||
class="icon-off"></i> Deactivate | ||
</button> | ||
</div> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td class="pull-right"><strong>Id:</strong></td> | ||
<td class="less-big">{{row.Id}} | ||
</td> | ||
</tr> | ||
<tr> | ||
<td class="pull-right"><strong>Name:</strong></td> | ||
<td class="less-big">{{row.Name}} | ||
</td> | ||
</tr> | ||
<tr> | ||
<td class="pull-right"><strong>State:</strong></td> | ||
<td class="less-big">{{row.State}} | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
</td> | ||
<td> | ||
<div class="accordion" id="accordionProperties"> | ||
<div class="accordion-group"> | ||
<div class="accordion-heading"> | ||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionProperties" | ||
href="#collapseProperties"> | ||
Properties | ||
</a> | ||
</div> | ||
<div id="collapseProperties" class="accordion-body collapse in"> | ||
<table class="accordion-inner"> | ||
<tr ng-repeat="(key, value) in row.Properties"> | ||
<td valign="top">{{key}}</td> | ||
<td>{{value.Value}}</td> | ||
</tr> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
</td> | ||
<td> | ||
<div class="accordion" id="accordionReferences"> | ||
<div class="accordion-group"> | ||
<div class="accordion-heading"> | ||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionReferences" | ||
href="#collapseReferences"> | ||
References | ||
</a> | ||
</div> | ||
<div id="collapseReferences" class="accordion-body collapse in"> | ||
<table class="accordion-inner"> | ||
<thead> | ||
<tr> | ||
<th>Name</th> | ||
<th>Availability</th> | ||
<th>Cardinality</th> | ||
<th>Policy</th> | ||
<th>Bound Services</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr ng-repeat="(key, value) in row.References"> | ||
<td valign="left" class="less-big">{{value.Name}}</td> | ||
<td valign="left" class="less-big">{{value.Availability}}</td> | ||
<td valign="left" class="less-big">{{value.Cardinality}}</td> | ||
<td valign="left" class="less-big">{{value.Policy}}</td> | ||
<td> | ||
<ul> | ||
<li ng-repeat="id in value['Bound Services']"> | ||
<i class="icon-cog less-big text-info" id="bound.service.{{id}}">{{id}}</i> | ||
</li> | ||
</ul> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
</td> | ||
</tr> | ||
</table> | ||
</div> |
10 changes: 10 additions & 0 deletions
10
hawtio-web/src/main/webapp/app/karaf/html/scr-component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<div ng-controller="Karaf.ScrComponentController"> | ||
<div class="row-fluid"> | ||
<div class="span4"> | ||
<h1>{{row.id}}</h1> | ||
</div> | ||
</div> | ||
|
||
<div ng-include src="'app/karaf/html/scr-component-details.html'"></div> | ||
|
||
</div> |
2 changes: 1 addition & 1 deletion
2
...b/src/main/webapp/app/karaf/html/scr.html → ...webapp/app/karaf/html/scr-components.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
module Karaf { | ||
|
||
export function ScrComponentController($scope, $location, workspace, jolokia, $routeParams) { | ||
|
||
$scope.name = $routeParams.name; | ||
populateTable(); | ||
|
||
|
||
|
||
function populateTable() { | ||
$scope.row = getComponentByName(workspace, jolokia, $scope.name); | ||
Core.$apply($scope); | ||
} | ||
|
||
$scope.activate = () => { | ||
activateComponent(workspace, jolokia, $scope.row['Name'], function () { | ||
console.log("Activated!") | ||
}, function () { | ||
console.log("Failed to activate!") | ||
}); | ||
}; | ||
|
||
$scope.deactivate = () => { | ||
deactivateComponent(workspace, jolokia, $scope.row['Name'], function () { | ||
console.log("Deactivated!") | ||
}, function () { | ||
console.log("Failed to deactivate!") | ||
}); | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters