Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

made process instance management ui mobile friendly, added exort butto… #138

Merged
merged 1 commit into from
Oct 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,24 @@

}

let exportInstance = function(id, instanceId) {

$.ajax({
url : '/management/processes/' + id + '/instances/' + instanceId + '/export?status=' + status,
type : 'GET',
dataType : 'json',
crossDomain : true,
success : function(data) {
var blob=new Blob([JSON.stringify(data)], {type: "application/json"});
var link=document.createElement('a');
link.href=window.URL.createObjectURL(blob);
link.download=instanceId + ".json";
link.click();
},
});

}

let retryInstance = function(id, instanceId, errorId) {

$.ajax({
Expand Down Expand Up @@ -259,6 +277,11 @@
} else {
$("#piActions-abort").hide();
}
$("#piActions-export").attr('onclick', 'exportInstance(\''
+ instanceData.processId + '\', \''
+ instanceData.id
+ '\')');


let tags = '';
instanceData.tags
Expand Down Expand Up @@ -448,11 +471,11 @@
.forEach(function(item, index) {
lastRow = true;
if (index++ % 3 == 0) {
$newRow = $('<div class="row">').appendTo($cards);
$newRow = $('<div class="row row-cols-1 row-cols-md-3">').appendTo($cards);
rowCount++;
}
$newRow
.append('<div class="col-4 d-flex align-items-stretch"><div id="card_' + item.id +'" class="card" style="width:400"><span class="notify-badge">' + item.activeInstances +'</span>'
.append('<div class="col mb-4"><div id="card_' + item.id +'" class="card h-100"><span class="notify-badge">' + item.activeInstances +'</span>'
+ '<img class="card-img-top" src="' + item.image +'" alt="Missing process image" height="200">'
+ '<div class="card-body">'
+ ' <h5 class="card-title">'
Expand Down Expand Up @@ -606,6 +629,7 @@ <h5 id="piTitle" class="modal-title">Process instance details</h5>
<div class="row">
<div class="col-12">
<div id="piActions" class="float-right">
<button id="piActions-export" type="button" class="btn btn-sm btn-secondary">Export</button>
<button id="piActions-abort" type="button" class="btn btn-sm btn-danger">Abort</button>
</div>
</div>
Expand Down