Skip to content

Commit

Permalink
Merge pull request #249 from camunda-community-hub/248-html-values
Browse files Browse the repository at this point in the history
fix: handle variable and secret values as text
  • Loading branch information
saig0 authored Sep 27, 2023
2 parents 8bc5c0f + e96f799 commit 488644f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
5 changes: 2 additions & 3 deletions src/main/resources/public/js/incident-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ async function confirmResolveIncidentModal() {

showNotificationSuccess(
"set-variables-" + key,
"Variables set successfully",
"<code>" + variables + "</code>"
"Variables set successfully"
);

track?.("zeebePlay:single-operation", {
Expand All @@ -127,7 +126,7 @@ async function confirmResolveIncidentModal() {
.fail(
showFailure(
"set-variables" + scope,
"Failed to set variables <code>" + variables + "</code>."
"Failed to set variables."
)
);
}
7 changes: 5 additions & 2 deletions src/main/resources/public/js/view-connectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ function loadConnectorSecrets() {
let row = `
<tr>
<td>${index + 1}</td>
<td>${secret.name}</td>
<td class="secretName"></td>
<td>
<code>${secret.value}</code>
<code></code>
</td>
<td>
<button id="${editButtonId}" type="button" class="btn btn-sm btn-secondary" title="Edit" data-bs-toggle="modal"
Expand All @@ -42,6 +42,9 @@ function loadConnectorSecrets() {

$("#connector-secrets-table tbody:last-child").append(row);

$("#connector-secrets-table tbody:last-child tr:last-child .secretName").text(secret.name);
$("#connector-secrets-table tbody:last-child tr:last-child code").text(secret.value);

$("#" + editButtonId).click(function () {
// fill modal
$("#edit-connector-secret-name").val(secret.name);
Expand Down
13 changes: 5 additions & 8 deletions src/main/resources/public/js/view-process-instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,6 @@ function loadVariablesOfProcessInstance() {

let scopeElement = formatBpmnElementInstance(scope.element);

let valueFormatted = "<code>" + variable.value + "</code>";

let lastUpdatedFormatted =
'<div class="row row-cols-1">' +
'<div class="col">' +
Expand Down Expand Up @@ -665,9 +663,7 @@ function loadVariablesOfProcessInstance() {
"<td>" +
variable.name +
"</td>" +
"<td>" +
valueFormatted +
"</td>" +
"<td><code></code></td>" +
"<td>" +
scopeFormatted +
"</td>" +
Expand All @@ -685,6 +681,8 @@ function loadVariablesOfProcessInstance() {
"</td>" +
"</tr>"
);

$("#variables-of-process-instance-table > tbody:last-child > tr:last-child code").text(variable.value);
});
});
}
Expand Down Expand Up @@ -719,16 +717,15 @@ function setVariablesModal() {
const toastId = "set-variables-" + key;
showNotificationSuccess(
toastId,
"Variables set successfully",
"<code>" + variables + "</code>."
"Variables set successfully"
);

loadVariablesOfProcessInstance();
})
.fail(
showFailure(
"set-variables" + scope,
"Failed to set variables <code>" + variables + "</code>."
"Failed to set variables."
)
);
}
Expand Down

0 comments on commit 488644f

Please sign in to comment.