Skip to content

Commit

Permalink
Fixed an issue where "\n" would not be replaced within warning texts
Browse files Browse the repository at this point in the history
  • Loading branch information
tpanajott committed Aug 18, 2024
1 parent 380e287 commit 07fcd7f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docker/web/nspanelmanager/web/static/edit_nspanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,15 @@ function update_nspanel_status(data) {
$("#warning_container").html("");
data["warnings"].split("\n").forEach((warning) => {
if (warning != "") {
console.log(warning);
var warning_text = warning;
warning_text = warning_text.replace('\\n', '');
console.log(warning_text);
$("#warning_container").append(
$("<div>", {
class:
"p-4 mt-2 text-sm text-yellow-800 rounded-lg bg-yellow-50 dark:bg-yellow-300 dark:text-gray-800",
role: "alert",
text: warning,
text: warning_text,
}),
);
}
Expand Down

0 comments on commit 07fcd7f

Please sign in to comment.