-
Notifications
You must be signed in to change notification settings - Fork 322
#2632 add to the alarm list component the option to write comments #3194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/2.8.0
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,9 +33,28 @@ | |
| <c:if test="${!hideIdColumn}"><td align="center">${event.id}</td></c:if> | ||
| <c:if test="${!hideAlarmLevelColumn}"><td align="center"><tag:eventIcon event="${event}"/></td></c:if> | ||
| <c:if test="${!hideTimestampColumn}"><td align="center">${sst:time(event.activeTimestamp)}</td></c:if> | ||
| <td onmouseover="this.style.whiteSpace='normal'" onmouseout="this.style.whiteSpace='nowrap'" style=" white-space: nowrap; max-width:100vh;"> | ||
| <p style="margin:auto; overflow: hidden; text-overflow: ellipsis; font-weight: bold;"><sst:i18n message="${event.message}"/></p> | ||
| </td> | ||
| <td> | ||
| <table cellspacing="0" cellpadding="0" width="100%"> | ||
| <colgroup> | ||
| <col /> | ||
| <col /> | ||
| <col style="width:1%" /> | ||
| </colgroup> | ||
|
|
||
| <tr> | ||
| <td colspan="2"><b><sst:i18n message="${event.message}"/></b></td> | ||
| <td align="right"> | ||
| <tag:img png="comment_add" title="notes.addNote" | ||
| onclick="openCommentDialog(${applicationScope['constants.UserComment.TYPE_EVENT']}, ${event.id})"/> | ||
| </td> | ||
| </tr> | ||
|
|
||
| <tbody id="eventComments${event.id}"> | ||
| <tag:comments comments="${event.eventComments}"/> | ||
| </tbody> | ||
| </table> | ||
| </td> | ||
|
|
||
|
Comment on lines
+36
to
+57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify the constant is defined somewhere predictable
rg -n --hidden -S "constants\.UserComment\.TYPE_EVENT|TYPE_EVENT" | head -30Repository: SCADA-LTS/Scada-LTS Length of output: 3626 🏁 Script executed: #!/bin/bash
# Inspect the tag implementation/usage to see what it renders (TR vs TBODY)
rg -n --hidden -S "<tag:comments\b" -A 2 -B 2 | head -50Repository: SCADA-LTS/Scada-LTS Length of output: 1265 🏁 Script executed: #!/bin/bash
# Check for JSP constant patterns in other files
rg -n --hidden -S "jsp:useBean.*constants" | head -20Repository: SCADA-LTS/Scada-LTS Length of output: 45 🏁 Script executed: #!/bin/bash
# Check eventList.jsp to see if it uses a better pattern for the constant
cat WebContent/WEB-INF/snippet/eventList.jsp | head -100Repository: SCADA-LTS/Scada-LTS Length of output: 4710 🏁 Script executed: #!/bin/bash
# Find the tag:comments tag file implementation
fd -t f "comments.tag" WebContent/Repository: SCADA-LTS/Scada-LTS Length of output: 99 🏁 Script executed: #!/bin/bash
# Inspect the comments.tag implementation
cat WebContent/WEB-INF/tags/comments.tagRepository: SCADA-LTS/Scada-LTS Length of output: 1612 Make the "add comment" control keyboard accessible. The <button type="button"
onclick="openCommentDialog(${applicationScope['constants.UserComment.TYPE_EVENT']}, ${event.id})"
title="<spring:message code='notes.addNote'/>">
<tag:img png="comment_add" alt=""/>
</button>The constant |
||
| <c:if test="${!hideInactivityColumn}"> | ||
| <td> | ||
| <c:choose> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use
cssFloatinstead offloatfor CSS property access.floatis a reserved word in JavaScript. While browsers generally toleratestyle.float, the standard DOM property name iscssFloat.🔧 Suggested fix
function unhideCommentSource() { var n = document.getElementById("CommentDialog"); if (!n) return n; n.removeAttribute("hidden"); n.setAttribute("aria-hidden", "false"); n.style.visibility = "visible"; n.style.display = ""; - n.style.float = "none"; + n.style.cssFloat = "none"; return n; }📝 Committable suggestion
🤖 Prompt for AI Agents