Skip to content

Commit 46bb2bf

Browse files
authored
Merge pull request #2422 from ControlSystemStudio/CSSTUDIO-1753
Render one PV per line for Data Browser log entry
2 parents 783db2b + aed436f commit 46bb2bf

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

app/trends/rich-adapters/src/main/java/org/phoebus/apps/trends/rich/adapters/DatabrowserAdapterFactory.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,21 @@ else if (adapterType.isAssignableFrom(LogEntry.class))
9191
return Optional.ofNullable(null);
9292
}
9393

94+
/**
95+
* Formats the body of the log entry.
96+
*
97+
* List of PVs is separated both by two blanks and a line separator. This is needed in order to get both the
98+
* log entry editor and the Markdown text -> html conversion to render one PV per line.
99+
* @param databrowserSelection The data selected from Data Browser
100+
* @return The contents of the body text.
101+
*/
94102
private String getBody(DatabrowserSelection databrowserSelection)
95103
{
96104
StringBuffer body = new StringBuffer();
97105
databrowserSelection.getPlotTitle().ifPresent(body::append);
98-
body.append("databrowser plot for the following pvs:" + System.lineSeparator());
99-
body.append(databrowserSelection.getPlotPVs().stream().collect(Collectors.joining(System.lineSeparator())));
100-
body.append(System.lineSeparator());
106+
body.append("databrowser plot for the following pvs: " + System.lineSeparator());
107+
body.append(databrowserSelection.getPlotPVs().stream().collect(Collectors.joining(" " + System.lineSeparator())));
108+
body.append(" " + System.lineSeparator());
101109
body.append("Over the time period: " + databrowserSelection.getPlotTime().toAbsoluteInterval().toString());
102110
return body.toString();
103111
}

0 commit comments

Comments
 (0)