|
59 | 59 | var downloadValue = $(this).attr('data-downloadValue'); |
60 | 60 | var downloadName = $(this).attr('data-downloadName'); |
61 | 61 | downloadFile(downloadValue, downloadName); |
| 62 | + $(this).attr('aria-label', 'Downloaded!'); |
| 63 | + setTimeout(function () { |
| 64 | + $('.copy').attr('aria-label', 'Download'); |
| 65 | + }, 2000); |
62 | 66 | return; |
63 | 67 | } |
64 | 68 | var copyValue = $(this).attr('data-copyValue'); |
|
234 | 238 | } |
235 | 239 | |
236 | 240 | $('#procDefKey').html(data.procDefKey); |
237 | | - $('#procInstId').html(data.procInstId); |
| 241 | + $('#procInstId').html(`<div class="procInstId-cell">` + data.procInstId + `</div>`); |
238 | 242 | var momentStart; |
239 | 243 | var momentEnd; |
240 | 244 | if (data.startTime !== null && data.startTime !== undefined && data.startTime !== "") { |
|
249 | 253 | } else { |
250 | 254 | $('#procEndTime').html(""); |
251 | 255 | } |
252 | | - if (momentStart !== undefined && momentEnd !== undefined) { |
253 | | - var procDuration = moment.duration(momentEnd.diff(momentStart)); |
254 | | - var procDurationStr = "" |
255 | | - if (procDuration.days() > 0) { |
256 | | - procDurationStr += procDuration.days() + "d "; |
257 | | - } |
258 | | - if (procDuration.hours() > 0) { |
259 | | - procDurationStr += procDuration.hours() + "h "; |
260 | | - } |
261 | | - if (procDuration.minutes() > 0) { |
262 | | - procDurationStr += procDuration.minutes() + "m "; |
263 | | - } |
264 | | - if (procDuration.seconds() > 0) { |
265 | | - procDurationStr += procDuration.seconds() + "s "; |
266 | | - } |
267 | | - if (procDuration.milliseconds() > 0) { |
268 | | - procDurationStr += procDuration.milliseconds() + "ms "; |
269 | | - } |
270 | | - $('#procDuration').html(procDurationStr); |
271 | | - } else { |
272 | | - $('#procDuration').html("N/A"); |
| 256 | + if (data.duration !== 0) { |
| 257 | + $('#procDuration').html(convertMillis(data.duration)); |
273 | 258 | } |
274 | 259 | |
275 | 260 | $.ajax({ |
|
640 | 625 | + `</span></div></div>`; |
641 | 626 | } else if (key.includes("{")) { |
642 | 627 | var fileName = tempKey.substring(tempKey.indexOf("{") + 1, tempKey.indexOf("}")); |
643 | | - tempKey = tempKey.substring(0, tempKey.indexOf(" {")); |
| 628 | + tempKey = tempKey.substring(tempKey.indexOf("]") + 1, tempKey.indexOf(" {")); |
644 | 629 | temp = `<div class="proc-var-flex-main">` |
645 | 630 | + `<div class="proc-var-flex-main-sub-1">` |
646 | 631 | + `<div class="proc-var-flex-main-sub-2"><b>` + tempKey + `: </b></div>` |
|
729 | 714 | + `</span></div></div>`; |
730 | 715 | } else if (tempKey.includes("{")) { |
731 | 716 | var fileName = tempKey.substring(tempKey.indexOf("{") + 1, tempKey.indexOf("}")); |
732 | | - tempKey = tempKey.substring(0, tempKey.indexOf(" {")); |
| 717 | + tempKey = tempKey.substring(tempKey.indexOf("]")+1, tempKey.indexOf(" {")); |
733 | 718 | temp = `<div class="proc-var-flex-main">` |
734 | 719 | + `<div class="proc-var-flex-main-sub-1">` |
735 | 720 | + `<div class="proc-var-flex-main-sub-2"><b>` + tempKey + `: </b></div>` |
|
801 | 786 | + `</span></div></div>`; |
802 | 787 | } else if (tempKey.includes("{")) { |
803 | 788 | var fileName = tempKey.substring(tempKey.indexOf("{") + 1, tempKey.indexOf("}")); |
804 | | - tempKey = tempKey.substring(0, tempKey.indexOf(" {")); |
| 789 | + tempKey = tempKey.substring(tempKey.indexOf("]")+1, tempKey.indexOf(" {")); |
805 | 790 | temp = `<div class="proc-var-flex-main">` |
806 | 791 | + `<div class="proc-var-flex-main-sub-1">` |
807 | 792 | + `<div class="proc-var-flex-main-sub-2"><b>` + tempKey + `: </b></div>` |
|
856 | 841 | var tempVal = value; |
857 | 842 | var tempKey = key.substring(7); |
858 | 843 | if (tempKey.includes("(file, image")) { |
859 | | - tempKey = tempKey.substring(0, tempKey.indexOf(" (")); |
860 | | - temp = `<div class="proc-var-flex-main"><div style="align-self: start"><b>` + tempKey + `: </b><img class="grow historyLimitSize" src="` + tempVal + `"></div><div class="proc-var-flex-btn"><span aria-label="Copy to clipboard" data-microtip-position="top-left" role="tooltip" class="copy" data-isImage="true" data-copyValue="` + tempVal + `" onClick=''><img src="images/copy.svg" class="copy-icon clipboard"></span></div></div>`; |
| 844 | + tempKey = tempKey.replace("file, ", ""); |
| 845 | + temp = `<div class="proc-var-flex-main">` |
| 846 | + + `<div class="proc-var-flex-main-sub-1">` |
| 847 | + + `<div class="proc-var-flex-main-sub-2"><b>` + tempKey + `: </b></div>` |
| 848 | + + `<div class="proc-var-flex-main-sub-3">` |
| 849 | + + `<img class="grow historyLimitSize" src='` + tempVal + `'></div></div>` |
| 850 | + + `<div class="proc-var-flex-btn">` |
| 851 | + + `<span aria-label="Copy to clipboard" data-microtip-position="top-left" role="tooltip" class="copy" data-isImage="true" data-copyValue="` + tempVal + `" onClick=''>` |
| 852 | + + `<img src="images/copy.svg" class="copy-icon clipboard">` |
| 853 | + + `</span></div></div>`; |
861 | 854 | } else if (tempKey.includes("{")) { |
862 | 855 | var fileName = tempKey.substring(tempKey.indexOf("{") + 1, tempKey.indexOf("}")); |
863 | | - tempKey = tempKey.substring(0, tempKey.indexOf(" {")); |
864 | | - temp = `<div class="proc-var-flex-main"><div style="align-self: start"><b>` + tempKey + `: </b><i>` + fileName + `</i></div><div class="proc-var-flex-btn"><span aria-label="Download" data-microtip-position="top-left" role="tooltip" class="copy" data-isImage="false" data-downloadValue="` + tempVal + `" data-downloadName="` + fileName + `" onClick=''><img src="images/download.svg" class="copy-icon clipboard"></span></div></div>`; |
| 856 | + tempKey = tempKey.substring(tempKey.indexOf("]")+1, tempKey.indexOf(" {")); |
| 857 | + temp = `<div class="proc-var-flex-main">` |
| 858 | + + `<div class="proc-var-flex-main-sub-1">` |
| 859 | + + `<div class="proc-var-flex-main-sub-2"><b>` + tempKey + `: </b></div>` |
| 860 | + + `<div class="proc-var-flex-main-sub-3">` |
| 861 | + + `<i>` + fileName + `</i></div></div>` |
| 862 | + + `<div class="proc-var-flex-btn">` |
| 863 | + + `<span aria-label="Download" data-microtip-position="top-left" role="tooltip" class="copy" data-isImage="false" data-downloadValue="` + tempVal + `" data-downloadName="` + fileName + `" onClick=''>` |
| 864 | + + `<img src="images/download.svg" class="copy-icon clipboard">` |
| 865 | + + `</span></div></div>`; |
865 | 866 | } else if (checkforImageURL(tempVal)) { |
866 | | - tempKey = tempKey.substring(0, tempKey.indexOf(" (")); |
867 | | - temp = `<div class="proc-var-flex-main"><div style="align-self: start"><b>` + tempKey + `: </b><img class="grow historyLimitSize" src="` + tempVal + `"></div><div class="proc-var-flex-btn"><span aria-label="Copy to clipboard" data-microtip-position="top-left" role="tooltip" class="copy" data-isImage="false" data-copyValue="` + tempVal + `" onClick=''><img src="images/copy.svg" class="copy-icon clipboard"></span></div></div>`; |
| 867 | + tempKey = tempKey.replace("string", "url"); |
| 868 | + temp = `<div class="proc-var-flex-main">` |
| 869 | + + `<div class="proc-var-flex-main-sub-1">` |
| 870 | + + `<div class="proc-var-flex-main-sub-2">` |
| 871 | + + `<b>` + tempKey + `: </b></div>` |
| 872 | + + `<div class="proc-var-flex-main-sub-3">` |
| 873 | + + `<img class="grow historyLimitSize" src="` + tempVal + `"></div></div>` |
| 874 | + + `<div class="proc-var-flex-btn">` |
| 875 | + + `<span aria-label="Copy to clipboard" data-microtip-position="top-left" role="tooltip" class="copy" data-isImage="false" data-copyValue="` + tempVal + `" onClick=''>` |
| 876 | + + `<img src="images/copy.svg" class="copy-icon clipboard">` |
| 877 | + + `</span></div></div>`; |
868 | 878 | } else if (checkForURL(tempVal)) { |
869 | | - tempKey = tempKey.substring(0, tempKey.indexOf(" (")); |
870 | | - temp = `<div class="proc-var-flex-main"><div style="align-self: start"><b>` + tempKey + `: </b><a href="` + tempVal + `">` + tempVal + `</a></div><div class="proc-var-flex-btn"><span aria-label="Copy to clipboard" data-microtip-position="top-left" role="tooltip" class="copy" data-isImage="true" data-copyValue="` + tempVal + `" onClick=''><img src="images/copy.svg" class="copy-icon clipboard"></span></div></div>`; |
| 879 | + tempKey = tempKey.replace("string", "url"); |
| 880 | + temp = `<div class="proc-var-flex-main">` |
| 881 | + + `<div class="proc-var-flex-main-sub-1">` |
| 882 | + + `<div class="proc-var-flex-main-sub-2">` |
| 883 | + + `<b>` + tempKey + `: </b></div>` |
| 884 | + + `<div class="proc-var-flex-main-sub-3">` |
| 885 | + + `<a href="` + tempVal + `">` + tempVal + `</a></div></div>` |
| 886 | + + `<div class="proc-var-flex-btn">` |
| 887 | + + `<span aria-label="Copy to clipboard" data-microtip-position="top-left" role="tooltip" class="copy" data-isImage="true" data-copyValue="` + tempVal + `" onClick=''>` |
| 888 | + + `<img src="images/copy.svg" class="copy-icon clipboard">` |
| 889 | + + `</span></div></div>`; |
871 | 890 | } else { |
872 | | - if (tempKey.includes("(string)")) { |
873 | | - tempKey = tempKey.substring(0, tempKey.indexOf(" (")); |
874 | | - } |
875 | | - temp = `<div class="proc-var-flex-main"><div style="align-self: start"><b>` + tempKey + `: </b>` + tempVal + `</a></div><div class="proc-var-flex-btn"><span aria-label="Copy to clipboard" data-microtip-position="top-left" role="tooltip" class="copy" data-isImage="true" data-copyValue="` + tempVal + `" onClick=''><img src="images/copy.svg" class="copy-icon clipboard"></span></div></div>`; |
| 891 | + temp = `<div class="proc-var-flex-main">` |
| 892 | + + `<div class="proc-var-flex-main-sub-1">` |
| 893 | + + `<div class="proc-var-flex-main-sub-2">` |
| 894 | + + `<b>` + tempKey + `: </b></div>` |
| 895 | + + `<div class="proc-var-flex-main-sub-3">` |
| 896 | + + tempVal + `</div></div>` |
| 897 | + + `<div class="proc-var-flex-btn">` |
| 898 | + + `<span aria-label="Copy to clipboard" data-microtip-position="top-left" role="tooltip" class="copy" data-isImage="true" data-copyValue="` + tempVal + `" onClick=''>` |
| 899 | + + `<img src="images/copy.svg" class="copy-icon clipboard">` |
| 900 | + + `</span></div></div>`; |
876 | 901 | } |
877 | 902 | output = output + temp; |
878 | 903 | } |
|
0 commit comments