wf history: details
This commit is contained in:
parent
7db3d1b401
commit
761ad265fa
|
@ -3,6 +3,8 @@ var app = angular.module('wfHistoryApp', []);
|
||||||
app.controller('wfHistoryController', function($scope, $http) {
|
app.controller('wfHistoryController', function($scope, $http) {
|
||||||
$scope.workflows = [];
|
$scope.workflows = [];
|
||||||
$scope.currentWf = {};
|
$scope.currentWf = {};
|
||||||
|
$scope.currDetailsKey = '';
|
||||||
|
$scope.currDetailsValue = '';
|
||||||
$scope.sortField = 'processId';
|
$scope.sortField = 'processId';
|
||||||
$scope.sortReverse = false;
|
$scope.sortReverse = false;
|
||||||
|
|
||||||
|
@ -16,8 +18,18 @@ app.controller('wfHistoryController', function($scope, $http) {
|
||||||
|
|
||||||
$scope.setCurrentWf = function(wf) {
|
$scope.setCurrentWf = function(wf) {
|
||||||
$scope.currentWf = angular.copy(wf);
|
$scope.currentWf = angular.copy(wf);
|
||||||
|
$scope.currDetailsKey = '';
|
||||||
|
$scope.currDetailsValue = '';
|
||||||
|
$scope.currentWf.arrayDetails = [];
|
||||||
|
angular.forEach(wf.details, function(v,k) {
|
||||||
|
$scope.currentWf.arrayDetails.push({'k':k, 'v':v});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$scope.setCurrentDetailParam = function(k, v) {
|
||||||
|
$scope.currDetailsKey = k;
|
||||||
|
$scope.currDetailsValue = v;
|
||||||
|
}
|
||||||
|
|
||||||
$scope.reload();
|
$scope.reload();
|
||||||
});
|
});
|
||||||
|
|
|
@ -100,11 +100,24 @@
|
||||||
<div class="modal-dialog modal-xl">
|
<div class="modal-dialog modal-xl">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title" ng-if="mode == 'new'">Details</h4>
|
<h4 class="modal-title">Details</h4>
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
{{currentWf.details}}
|
<input type="text" class="form-control form-control-sm" ng-model="detailsFilter" placeholder="Filter..."/>
|
||||||
|
|
||||||
|
<table class="table table-sm table-striped small mt-2" style="table-layout: fixed;">
|
||||||
|
<tr ng-repeat="p in currentWf.arrayDetails | filter:detailsFilter">
|
||||||
|
<th style="width: 30%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"><a href="javascript:void(0)" ng-click="setCurrentDetailParam(p.k,p.v)">{{p.k}}</a></th>
|
||||||
|
<td style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">{{p.v}}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="card card-body bg-light" ng-show="currDetailsKey">
|
||||||
|
<b>{{currDetailsKey}}</b><br />
|
||||||
|
<pre>{{currDetailsValue}}</pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">Close</button>
|
||||||
|
|
Loading…
Reference in New Issue