Skip to content

Commit

Permalink
Add history and some styles
Browse files Browse the repository at this point in the history
  • Loading branch information
falko committed Aug 16, 2016
1 parent 62b44f3 commit 0987c07
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions snippets/cmmn-kanban-board/src/main/webapp/status.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
</head>
<body>
<div class="container-fluid">
<h1>CMMN Kanban Board</h1>
<h2>CMMN Kanban Board</h2>
<div class="row">
<div class="col-md-4"><h2>Enabled</h2><ul id="enabledExecutions"></ul></div>
<div class="col-md-4"><h2>Active</h2><ul id="activeExecutions"></ul></div>
<div class="col-md-4"><h2>Completed</h2><ul id="completedExecutions"></ul></div>
<div class="col-md-4"><h3 class="bg-info">Enabled</h3><ul id="enabledExecutions"></ul></div>
<div class="col-md-4"><h3 class="bg-primary">Active</h3><ul id="activeExecutions"></ul></div>
<div class="col-md-4"><h3 class="bg-success">Completed</h3><ul id="completedExecutions"></ul></div>
</div>
</div>

Expand All @@ -72,15 +72,18 @@ <h1>CMMN Kanban Board</h1>
function populateList(list, caseExecutions) {
var items = [];
$.each(caseExecutions, function (id, caseExecution) {
items.push('<li>' + caseExecution.activityName + '</li>');
});
items.push('<li>' + (caseExecution.activityName ? caseExecution.activityName : caseExecution.caseActivityName) + '</li>');
});
list.html(items.join(''));
}
$.get(restAccess + '/case-execution/?enabled=true&caseInstanceId=' + caseInstanceId, function(enabledExecutions) {
populateList($("#enabledExecutions"), enabledExecutions);
$.get(restAccess + '/case-execution/?active=true&caseInstanceId=' + caseInstanceId, function(activeExecutions) {

$.get(restAccess + '/case-execution?enabled=true&caseInstanceId=' + caseInstanceId, function(enabledExecutions) {
populateList($("#enabledExecutions"), enabledExecutions);
$.get(restAccess + '/case-execution?active=true&caseInstanceId=' + caseInstanceId, function(activeExecutions) {
populateList($("#activeExecutions"), activeExecutions);
$.get(restAccess + '/history/case-activity-instance?completed=true&caseInstanceId=' + caseInstanceId, function(completedExecutions) {
populateList($("#completedExecutions"), completedExecutions);
});
});
});

Expand Down

0 comments on commit 0987c07

Please sign in to comment.