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 24, 2013
1 parent b45383b commit d614c5a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hawtio-web/src/main/webapp/app/quartz/js/quartz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module Quartz {
var log:Logging.Logger = Logger.get("Quartz");

var stateTemplate = '<div class="ngCellText pagination-centered" title="{{row.getProperty(col.field)}}"><i class="{{row.getProperty(col.field) | quartzIconClass}}"></i></div>';
var misfireTemplate = '<div class="ngCellText" title="{{row.getProperty(col.field)}}">{{row.getProperty(col.field) | quartzMisfire}}</div>';

$scope.selectedSchedulerDetails = [];
$scope.selectedSchedulerIcon = null;
Expand Down Expand Up @@ -41,6 +42,11 @@ module Quartz {
field: 'name',
displayName: 'Name'
},
{
field: 'misfireInstruction',
displayName: 'Misfire Instruction',
cellTemplate: misfireTemplate
},
{
field: 'previousFireTime',
displayName: 'Previous Fire Timestamp'
Expand Down
16 changes: 16 additions & 0 deletions hawtio-web/src/main/webapp/app/quartz/js/quartzHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@ module Quartz {
return "orange icon-off";
}

export function misfireText(val:number) {
if (val) {
switch (val) {
case -1:
return "ignore";
case 0:
return "smart";
case 1:
return "fire once now";
case 2:
return "do nothing";
}
}
return "unknown";
}

/**
* Returns true if the state of the item begins with the given state - or one of the given states
* @method
Expand Down
1 change: 1 addition & 0 deletions hawtio-web/src/main/webapp/app/quartz/js/quartzPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module Quartz {
when('/quartz/schedulers', {templateUrl: 'app/quartz/html/schedulers.html'})
}).
filter('quartzIconClass',() => iconClass).
filter('quartzMisfire',() => misfireText).
run(($location:ng.ILocationService, workspace:Workspace, viewRegistry, layoutFull, helpRegistry) => {

viewRegistry['quartz'] = 'app/quartz/html/layoutQuartzTree.html';
Expand Down

0 comments on commit d614c5a

Please sign in to comment.