From 08cdb97eb14e76a2642babb40158a4ae8ebea069 Mon Sep 17 00:00:00 2001 From: Will Gunter Date: Thu, 10 Aug 2023 08:04:57 -0700 Subject: [PATCH 1/4] Revert duration --- install/cws-ui/history.ftl | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/install/cws-ui/history.ftl b/install/cws-ui/history.ftl index 85d15a7a..24eccdc3 100644 --- a/install/cws-ui/history.ftl +++ b/install/cws-ui/history.ftl @@ -59,6 +59,10 @@ var downloadValue = $(this).attr('data-downloadValue'); var downloadName = $(this).attr('data-downloadName'); downloadFile(downloadValue, downloadName); + $(this).attr('aria-label', 'Downloaded!'); + setTimeout(function () { + $('.copy').attr('aria-label', 'Download'); + }, 2000); return; } var copyValue = $(this).attr('data-copyValue'); @@ -249,27 +253,8 @@ } else { $('#procEndTime').html(""); } - if (momentStart !== undefined && momentEnd !== undefined) { - var procDuration = moment.duration(momentEnd.diff(momentStart)); - var procDurationStr = "" - if (procDuration.days() > 0) { - procDurationStr += procDuration.days() + "d "; - } - if (procDuration.hours() > 0) { - procDurationStr += procDuration.hours() + "h "; - } - if (procDuration.minutes() > 0) { - procDurationStr += procDuration.minutes() + "m "; - } - if (procDuration.seconds() > 0) { - procDurationStr += procDuration.seconds() + "s "; - } - if (procDuration.milliseconds() > 0) { - procDurationStr += procDuration.milliseconds() + "ms "; - } - $('#procDuration').html(procDurationStr); - } else { - $('#procDuration').html("N/A"); + if (data.duration !== 0) { + $('#procDuration').html(convertMillis(data.duration)); } $.ajax({ From 4f5a3f854984a0148a3fe33f23cb6d3f5d415439 Mon Sep 17 00:00:00 2001 From: Will Gunter Date: Thu, 10 Aug 2023 08:10:03 -0700 Subject: [PATCH 2/4] Update minimum width for process details table --- cws-ui/src/main/webapp/css/history.css | 4 ++++ install/cws-ui/history.ftl | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cws-ui/src/main/webapp/css/history.css b/cws-ui/src/main/webapp/css/history.css index 2b094aeb..4cbde4d0 100644 --- a/cws-ui/src/main/webapp/css/history.css +++ b/cws-ui/src/main/webapp/css/history.css @@ -93,4 +93,8 @@ summary { #logDataNest { font-size: 95%; +} + +.procInstId-cell { + width: 300px; } \ No newline at end of file diff --git a/install/cws-ui/history.ftl b/install/cws-ui/history.ftl index 24eccdc3..5bac101d 100644 --- a/install/cws-ui/history.ftl +++ b/install/cws-ui/history.ftl @@ -238,7 +238,7 @@ } $('#procDefKey').html(data.procDefKey); - $('#procInstId').html(data.procInstId); + $('#procInstId').html(`
` + data.procInstId + `
`); var momentStart; var momentEnd; if (data.startTime !== null && data.startTime !== undefined && data.startTime !== "") { From 6fede75c6d16973302dc249b130438a81f6160bc Mon Sep 17 00:00:00 2001 From: Will Gunter Date: Thu, 10 Aug 2023 08:28:14 -0700 Subject: [PATCH 3/4] Fix output variable not formatting correctly --- install/cws-ui/history.ftl | 70 ++++++++++++++++++++++++++++++-------- 1 file changed, 55 insertions(+), 15 deletions(-) diff --git a/install/cws-ui/history.ftl b/install/cws-ui/history.ftl index 5bac101d..b180b605 100644 --- a/install/cws-ui/history.ftl +++ b/install/cws-ui/history.ftl @@ -625,7 +625,7 @@ + ``; } else if (key.includes("{")) { var fileName = tempKey.substring(tempKey.indexOf("{") + 1, tempKey.indexOf("}")); - tempKey = tempKey.substring(0, tempKey.indexOf(" {")); + tempKey = tempKey.substring(tempKey.indexOf("]") + 1, tempKey.indexOf(" {")); temp = `
` + `
` + `
` + tempKey + `:
` @@ -714,7 +714,7 @@ + `
`; } else if (tempKey.includes("{")) { var fileName = tempKey.substring(tempKey.indexOf("{") + 1, tempKey.indexOf("}")); - tempKey = tempKey.substring(0, tempKey.indexOf(" {")); + tempKey = tempKey.substring(tempKey.indexOf("]")+1, tempKey.indexOf(" {")); temp = `
` + `
` + `
` + tempKey + `:
` @@ -786,7 +786,7 @@ + `
`; } else if (tempKey.includes("{")) { var fileName = tempKey.substring(tempKey.indexOf("{") + 1, tempKey.indexOf("}")); - tempKey = tempKey.substring(0, tempKey.indexOf(" {")); + tempKey = tempKey.substring(tempKey.indexOf("]")+1, tempKey.indexOf(" {")); temp = `
` + `
` + `
` + tempKey + `:
` @@ -841,23 +841,63 @@ var tempVal = value; var tempKey = key.substring(7); if (tempKey.includes("(file, image")) { - tempKey = tempKey.substring(0, tempKey.indexOf(" (")); - temp = `
` + tempKey + `:
`; + tempKey = tempKey.replace("file, ", ""); + temp = `
` + + `
` + + `
` + tempKey + `:
` + + `
` + + `
` + + `
` + + `` + + `` + + `
`; } else if (tempKey.includes("{")) { var fileName = tempKey.substring(tempKey.indexOf("{") + 1, tempKey.indexOf("}")); - tempKey = tempKey.substring(0, tempKey.indexOf(" {")); - temp = `
` + tempKey + `: ` + fileName + `
`; + tempKey = tempKey.substring(tempKey.indexOf("]")+1, tempKey.indexOf(" {")); + temp = `
` + + `
` + + `
` + tempKey + `:
` + + `
` + + `` + fileName + `
` + + `
` + + `` + + `` + + `
`; } else if (checkforImageURL(tempVal)) { - tempKey = tempKey.substring(0, tempKey.indexOf(" (")); - temp = `
` + tempKey + `:
`; + tempKey = tempKey.replace("string", "url"); + temp = `
` + + `
` + + `
` + + `` + tempKey + `:
` + + `
` + + `
` + + `
` + + `` + + `` + + `
`; } else if (checkForURL(tempVal)) { - tempKey = tempKey.substring(0, tempKey.indexOf(" (")); - temp = `
` + tempKey + `: ` + tempVal + `
`; + tempKey = tempKey.replace("string", "url"); + temp = `
` + + `
` + + `
` + + `` + tempKey + `:
` + + `
` + + `
` + + `` + + `` + + `
`; } else { - if (tempKey.includes("(string)")) { - tempKey = tempKey.substring(0, tempKey.indexOf(" (")); - } - temp = `
` + tempKey + `: ` + tempVal + `
`; + temp = `
` + + `
` + + `
` + + `` + tempKey + `:
` + + `
` + + tempVal + `
` + + `
` + + `` + + `` + + `
`; } output = output + temp; } From bb985d3c0441f6ed8aa596dc132703fd73a2121c Mon Sep 17 00:00:00 2001 From: Will Gunter Date: Thu, 10 Aug 2023 09:00:11 -0700 Subject: [PATCH 4/4] Fix resolving bug --- install/cws-ui/processes.ftl | 3 --- 1 file changed, 3 deletions(-) diff --git a/install/cws-ui/processes.ftl b/install/cws-ui/processes.ftl index f038af00..c46504b1 100644 --- a/install/cws-ui/processes.ftl +++ b/install/cws-ui/processes.ftl @@ -1652,9 +1652,6 @@ $.ajax({ type: "POST", url: "/${base}/rest/processes/markResolved", - Accept: "application/json", - contentType: "application/json", - dataType: "json", data: JSON.stringify(getSelectedRowUuids()) }) .done(function (msg) {