Skip to content

Commit

Permalink
Merge pull request #444 from NitorCreations/small-usability-improvements
Browse files Browse the repository at this point in the history
Small usability improvements
  • Loading branch information
eputtone authored Mar 24, 2021
2 parents a7dcf45 + fc93044 commit b01a853
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 31 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@

**Highlights**
- `nflow-explorer`
- Sortable workflow definitions and instance search result table
- Sortable workflow definitions, workflow instance search result and executors tables
- Persist workflow instance query parameters to URL
- Support wildcard characters when searching workflow instances by business key or external id

**Details**
- `nflow-jetty`
- Dependency updates:
- jetty 9.4.38.v20210224
- `nflow-explorer`
- Added missing `executing` status to workflow instance search criteria
- Included child workflows when auto-refreshing workflow instance actions table
- Added more child workflow details to workflow instance actions
- Dependency updates:
- urijs 1.19.6
- is-svg 4.3.1
- `nflow-engine`
- Support SQL wildcards in workflow instance queries by business key or external id

## 7.2.4 (2021-02-25)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -659,11 +659,11 @@ public Stream<WorkflowInstance> queryWorkflowInstancesAsStream(QueryWorkflowInst
params.addValue("statuses", convertedStatuses);
}
if (query.businessKey != null) {
conditions.add("business_key = :business_key");
conditions.add("business_key like :business_key");
params.addValue("business_key", query.businessKey);
}
if (query.externalId != null) {
conditions.add("external_id = :external_id");
conditions.add("external_id like :external_id");
params.addValue("external_id", query.externalId);
}
conditions.add("executor_group = :executor_group");
Expand Down
3 changes: 2 additions & 1 deletion nflow-explorer/src/app/components/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
CREATED: 'created',
IN_PROGRESS: 'inProgress',
FINISHED: 'finished',
MANUAL: 'manual'
MANUAL: 'manual',
EXECUTING: 'executing'
});
})();
44 changes: 22 additions & 22 deletions nflow-explorer/src/app/executors/executorTable.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
<div>
<h2>Workflow executors</h2>
<table id="executors" class="table table-striped table-hover">
<table st-table="displayedExecutors" st-safe-src="ctrl.executors" id="executors" class="table table-striped table-hover">
<thead>
<tr>
<th>Id</th>
<th>Host</th>
<th>Process ID</th>
<th>Executor group</th>
<th>Started</th>
<th>Stopped</th>
<th>Activity heartbeat</th>
<th>Heartbeat expires</th>
</tr>
<tr class="clickable-header">
<th st-sort="id">Id</th>
<th st-sort="host">Host</th>
<th st-sort="pid">Process ID</th>
<th st-sort="executorGroup">Executor group</th>
<th st-sort="started">Started</th>
<th st-sort="stopped">Stopped</th>
<th st-sort="active">Activity heartbeat</th>
<th st-sort="expires">Heartbeat expires</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="executor in ctrl.executors | orderBy:'active':true | filter:ctrl.isActive"
ng-class="ctrl.executorClass(executor)">
<td>{{executor.id}}</td>
<td>{{executor.host}}</td>
<td>{{executor.pid}}</td>
<td>{{executor.executorGroup}}</td>
<td title="{{executor.started | date:'yyyy-MM-dd HH:mm:ss'}}">{{executor.started | fromNow}}</td>
<td title="{{executor.stopped | date:'yyyy-MM-dd HH:mm:ss'}}">{{executor.stopped | fromNow}}</td>
<td title="{{executor.active | date:'yyyy-MM-dd HH:mm:ss'}}">{{executor.active | fromNow}}</td>
<td title="{{executor.expires | date:'yyyy-MM-dd HH:mm:ss'}}">{{executor.expires | fromNow}}</td>
</tr>
<tr ng-repeat="executor in displayedExecutors | orderBy:'active':true | filter:ctrl.isActive"
ng-class="ctrl.executorClass(executor)">
<td>{{executor.id}}</td>
<td>{{executor.host}}</td>
<td>{{executor.pid}}</td>
<td>{{executor.executorGroup}}</td>
<td title="{{executor.started | date:'yyyy-MM-dd HH:mm:ss'}}">{{executor.started | fromNow}}</td>
<td title="{{executor.stopped | date:'yyyy-MM-dd HH:mm:ss'}}">{{executor.stopped | fromNow}}</td>
<td title="{{executor.active | date:'yyyy-MM-dd HH:mm:ss'}}">{{executor.active | fromNow}}</td>
<td title="{{executor.expires | date:'yyyy-MM-dd HH:mm:ss'}}">{{executor.expires | fromNow}}</td>
</tr>
</tbody>
</table>
</div>
4 changes: 2 additions & 2 deletions nflow-explorer/src/app/search/searchForm.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
</div>
</div>
<div class="row">
<div class="col-xs-3">
<div title="{{ctrl.wildCardTooltip}}" class="col-xs-3">
<label for="businessKey">Business key</label>
<input name="businessKey" type="text" ng-model="ctrl.model.businessKey" empty-to-null class="form-control"/>
</div>
<div class="col-xs-3">
<div title="{{ctrl.wildCardTooltip}}" class="col-xs-3">
<label for="externalId">External id</label>
<input name="externalId" type="text" ng-model="ctrl.model.externalId" empty-to-null class="form-control" />
</div>
Expand Down
1 change: 1 addition & 0 deletions nflow-explorer/src/app/search/searchForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
self.search = navigateSearch;
self.executeSearch = executeSearch;
self.onTypeChange = CriteriaModel.onDefinitionChange;
self.wildCardTooltip = 'Use % to replace many characters and _ to replace a single character';

initialize();

Expand Down
7 changes: 6 additions & 1 deletion nflow-explorer/src/app/workflow/tabs/actionHistory.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@
<div ng-click="$event.stopPropagation();" ng-if="ctrl.childWorkflowFromAction(action).length" >
<strong>Child workflows</strong>
<ul ng-repeat="childWorkflow in ctrl.childWorkflowFromAction(action)">
<li><small><a ui-sref="workflow({id: childWorkflow.id})">{{childWorkflow.type}} ({{childWorkflow.id}})</a></small></li>
<li>
<small title="Business key: {{childWorkflow.businessKey}}&#10;External id: {{childWorkflow.externalId}}&#10;State text: {{childWorkflow.stateText}}&#10;Retries: {{childWorkflow.retries}}&#10;Priority: {{childWorkflow.priority}}&#10;Started: {{childWorkflow.started}}&#10;Modified: {{childWorkflow.modified}}">
<a ui-sref="workflow({id: childWorkflow.id})">{{childWorkflow.type}} ({{childWorkflow.id}})</a>
- {{childWorkflow.status}} in {{childWorkflow.state}}
</small>
</li>
</ul>
</div>
</td>
Expand Down
5 changes: 4 additions & 1 deletion nflow-explorer/src/app/workflow/workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
function reloadWorkflow(workflowId) {
console.log('Fetching workflow id ' + workflowId);
WorkflowService.get(workflowId).then(function(workflow) {
self.workflow = workflow;
WorkflowService.query({parentWorkflowId: workflow.id}).then(function(childWorkflows) {
self.workflow = workflow;
self.childWorkflows = childWorkflows;
});
});
}
self.poller = $interval(function() { reloadWorkflow(self.workflow.id); },
Expand Down
2 changes: 1 addition & 1 deletion nflow-explorer/test/spec/search/searchForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('Directive: searchForm', function () {
});

it('sets instance statuses into view model', function () {
expect(getCtrl(WorkflowService).instanceStatuses).toEqual([ 'created', 'inProgress', 'finished', 'manual' ]);
expect(getCtrl(WorkflowService).instanceStatuses).toEqual([ 'created', 'inProgress', 'finished', 'manual', 'executing' ]);
});

it('with empty criteria does not trigger search', function () {
Expand Down

0 comments on commit b01a853

Please sign in to comment.