diff --git a/addons/process-management/automatiko-process-management-addon/src/main/resources/automatiko-index.html b/addons/process-management/automatiko-process-management-addon/src/main/resources/automatiko-index.html index f71af1b65..ad9c9da76 100644 --- a/addons/process-management/automatiko-process-management-addon/src/main/resources/automatiko-index.html +++ b/addons/process-management/automatiko-process-management-addon/src/main/resources/automatiko-index.html @@ -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({ @@ -259,6 +277,11 @@ } else { $("#piActions-abort").hide(); } + $("#piActions-export").attr('onclick', 'exportInstance(\'' + + instanceData.processId + '\', \'' + + instanceData.id + + '\')'); + let tags = ''; instanceData.tags @@ -448,11 +471,11 @@ .forEach(function(item, index) { lastRow = true; if (index++ % 3 == 0) { - $newRow = $('
').appendTo($cards); + $newRow = $('
').appendTo($cards); rowCount++; } $newRow - .append('
' + item.activeInstances +'' + .append('
' + item.activeInstances +'' + 'Missing process image' + '
' + '
' @@ -606,6 +629,7 @@
+