Skip to content

Commit

Permalink
#786: Quartz plugin. Work in progress.
Browse files Browse the repository at this point in the history
  • Loading branch information
davsclaus committed Dec 31, 2013
1 parent f5fa6d1 commit 03e9312
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 36 deletions.
71 changes: 52 additions & 19 deletions hawtio-web/src/main/webapp/app/quartz/html/schedulers.html
Expand Up @@ -9,28 +9,61 @@
</form>
</div>

<!-- the dl need to be wider so we can see the labels -->
<style>
.dl-horizontal dt {
width: 260px;
}
.dl-horizontal dd {
margin-left: 280px;
}
</style>

<div ng-show="selectedSchedulerMBean" class="row-fluid">
<div class="alert alert-info">

<strong>Scheduler Details:</strong>

<br/> Scheduler name: <strong>{{selectedScheduler.SchedulerName}}</strong>
<br/> State: <i class="{{selectedSchedulerIcon}}"></i>
<br/> Version: <strong>{{selectedScheduler.Version}}</strong>

<br/> Details ...
<div class="expandable closed">
<div class="title">
<i class="expandable-indicator"></i>
</div>
<div class="expandable-body well-small">
<div ng-repeat="detail in selectedSchedulerDetails">
{{detail.field}}: <strong>{{detail.displayName}}</strong>
</div>
</div>
<form>

<div class="row-fluid">
<dl class="dl-horizontal">
<dt>Scheduler name</dt>
<dd>{{selectedScheduler.SchedulerName}}</dd>
<dt>Scheduler instance</dt>
<dd>{{selectedScheduler.SchedulerInstanceId}}</dd>
<dt>Version</dt>
<dd>{{selectedScheduler.Version}}</dd>
<dt>State</dt>
<dd><i class="{{selectedSchedulerIcon}}"></i></dd>
<dt>Shutdown</dt>
<dd>{{selectedScheduler.Shutdown}}</dd>
<dt>Standby</dt>
<dd>{{selectedScheduler.Standby}}</dd>
</dl>
</div>

<div>
<dl class="dl-horizontal">
<dt>JobStore ClassName</dt>
<dd>{{selectedScheduler.JobStoreClassName}}</dd>
<dt>Jobs Completed most recent sample</dt>
<dd>{{selectedScheduler.JobsCompletedMostRecentSample}}</dd>
<dt>Jobs Executed most recent sample</dt>
<dd>{{selectedScheduler.JobsExecutedMostRecentSample}}</dd>
<dt>Jobs Scheduled most recent sample</dt>
<dd>{{selectedScheduler.JobsScheduledMostRecentSample}}</dd>
<dt>Sampled Statistics Enabled</dt>
<dd>{{selectedScheduler.SampledStatisticsEnabled}}</dd>
</dl>
</div>

<div>
<dl class="dl-horizontal">
<dt>Thread Pool ClassName</dt>
<dd>{{selectedScheduler.ThreadPoolClassName}}</dd>
<dt>Thread Pool Size</dt>
<dd>{{selectedScheduler.ThreadPoolSize}}</dd>
</dl>
</div>
</div>

</form>
</div>

</div>
Expand Down
17 changes: 0 additions & 17 deletions hawtio-web/src/main/webapp/app/quartz/js/quartz.ts
Expand Up @@ -10,7 +10,6 @@ module Quartz {

$scope.valueDetails = new Core.Dialog();

$scope.selectedSchedulerDetails = [];
$scope.selectedSchedulerIcon = null;
$scope.selectedScheduler = null;
$scope.selectedSchedulerMBean = null;
Expand Down Expand Up @@ -140,22 +139,6 @@ module Quartz {
$scope.selectedScheduler = obj;
$scope.selectedSchedulerIcon = Quartz.iconClass(obj.Started);

// add extra details about the selected scheduler, and turn that into human readable details
angular.forEach(obj, (value, key) => {
if (includePropertyValue(key, value)) {
$scope.selectedSchedulerDetails.push({
field: humanizeValue(key),
displayName: value
});
}
});
// .. which we then sort also
$scope.selectedSchedulerDetails.sort((a, b) => {
var ta = a.field.toString();
var tb = b.field.toString();
return ta.localeCompare(tb);
});

// grab state for all triggers which requires to call a JMX operation per trigger
obj.AllTriggers.forEach(t => {
var state = jolokia.request({type: "exec", mbean: $scope.selectedSchedulerMBean,
Expand Down

0 comments on commit 03e9312

Please sign in to comment.