Skip to content

Commit

Permalink
#786: Use hawtio simple table for quartz plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
davsclaus authored and gashcrumb committed Jan 27, 2014
1 parent 21e4f64 commit 5c36518
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 29 deletions.
59 changes: 37 additions & 22 deletions hawtio-web/src/main/webapp/app/quartz/html/jobs.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,49 @@
<div ng-show="selectedScheduler" class="row-fluid">

<div class="row-fluid">
<div class="row-fluid">
<div class="pull-left">
<form class="form-inline no-bottom-margin">
<fieldset>
<div class="controls control-group inline-block controls-row">
<div class="btn-group">
<button
ng-disabled="jobsGridOptions.selectedItems.length == 0"
class="btn" ng-click="openJobDetailView()" title="Job Details">
<i class="icon-info"></i></button>
</div>
</div>
</fieldset>
</form>
</div>

<div class="pull-right">
<form class="form-inline no-bottom-margin">
<fieldset>
<div class="control-group inline-block">
<input type="text" class="search-query" placeholder="Filter..."
ng-model="jobsGridOptions.filterOptions.filterText">
<div modal="valueDetails.show" close="valueDetails.close()" options="valueDetails.options">
<form class="form-horizontal no-bottom-margin" ng-submit="valueDetails.close()">
<div class="modal-header"><h4>Job DataMap details...</h4></div>
<div class="modal-body">
<div ng-bind-html-unsafe="jobsGridOptions.selectedItems[0].detailHtml"></div>
</div>
</fieldset>
</form>
</div>
<div class="modal-footer">
<input class="btn" ng-click="valueDetails.close()" value="Close">
</div>
</form>
</div>

<div class="pull-right">
<form class="form-inline no-bottom-margin">
<fieldset>
<div class="control-group inline-block">
<input type="text" class="search-query" placeholder="Filter..."
ng-model="gridOptions.filterOptions.filterText">
</div>
</fieldset>
</form>
</div>
</div>
</div>

<div class="row-fluid">
<table class="table table-condensed" hawtio-simple-table="jobsGridOptions"></table>
</div>

<div modal="valueDetails.show" close="valueDetails.close()" options="valueDetails.options">
<form class="form-horizontal no-bottom-margin" ng-submit="valueDetails.close()">
<div class="modal-header"><h4>Job DataMap details...</h4></div>
<div class="modal-body">
<div ng-bind-html-unsafe="row.detailHtml"></div>
</div>
<div class="modal-footer">
<input class="btn" ng-click="valueDetails.close()" value="Close">
</div>
</form>
<table class="table table-condensed table-striped" hawtio-simple-table="jobsGridOptions"></table>
</div>

</div>
Expand Down
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/quartz/html/triggers.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</div>

<div class="row-fluid">
<table class="table table-condensed" hawtio-simple-table="gridOptions"></table>
<table class="table table-condensed table-striped" hawtio-simple-table="gridOptions"></table>
</div>

</div>
Expand Down
10 changes: 4 additions & 6 deletions hawtio-web/src/main/webapp/app/quartz/js/quartz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module Quartz {

var stateTemplate = '<div class="ngCellText pagination-centered" title="{{row.entity.state}}"><i class="{{row.entity.state | quartzIconClass}}"></i></div>';
var misfireTemplate = '<div class="ngCellText" title="{{row.entity.misfireInstruction}}">{{row.entity.misfireInstruction | quartzMisfire}}</div>';
var jobMapTemplate = '<div class="ngCellText" title="{{row.entity.jobClass}}" ng-click="openDetailView(row.entity)" ng-bind-html-unsafe="row.entity.jobClass | quartzJobDataClassText"></div>';

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

Expand Down Expand Up @@ -133,6 +132,8 @@ module Quartz {
filterText: ''
},
showSelectionCheckbox: false,
enableRowClickSelection: true,
multiSelect: false,
columnDefs: [
{
field: 'group',
Expand Down Expand Up @@ -161,7 +162,6 @@ module Quartz {
{
field: 'jobClass',
displayName: 'Job ClassName',
cellTemplate: jobMapTemplate,
width: 350
},
{
Expand All @@ -172,10 +172,8 @@ module Quartz {
]
};

$scope.openDetailView = (entity) => {
log.info("Open detail view " + entity);
$scope.row = entity;
if (entity.detailHtml) {
$scope.openJobDetailView = () => {
if ($scope.jobsGridOptions.selectedItems.length === 1) {
$scope.valueDetails.open();
}
};
Expand Down

0 comments on commit 5c36518

Please sign in to comment.