Skip to content

Commit

Permalink
Merge pull request #423 from wttech/reformat-summary
Browse files Browse the repository at this point in the history
reformat summary entries
  • Loading branch information
dprzybyl authored Oct 31, 2023
2 parents 511d1c9 + e447e9b commit 102f3d0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,8 @@ interface Entry {

List<String> getMessages();

List<String> getPrettyMessages();

List<String> getParameters();

List<String> getPrettyParameters();

Status getStatus();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import com.google.common.collect.ImmutableList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

public class ProgressEntry implements Entry {

Expand Down Expand Up @@ -71,25 +70,11 @@ public List<String> getMessages() {
return messages;
}

@Override
public List<String> getPrettyMessages() {
return messages.stream()
.map(message -> message.replaceAll("\n", "<br>").replaceAll("\t", "&nbsp;&nbsp;&nbsp;&nbsp;"))
.collect(Collectors.toList());
}

@Override
public List<String> getParameters() {
return parameters;
}

@Override
public List<String> getPrettyParameters() {
return parameters.stream()
.map(message -> message.replaceAll("\n", "<br>").replaceAll("\t", "&nbsp;&nbsp;&nbsp;&nbsp;"))
.collect(Collectors.toList());
}

@Override
public Status getStatus() {
return status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@
background-color: rgba(221, 52, 52, 0.7);
}
}
}
}

li {
white-space: pre-wrap;
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h3><a name="available-commands">Available commands</a></h3>
<p>${map.description}</p>
<div data-sly-test="${map.examples}" class="code-example">
<strong>Examples</strong>
<code data-sly-repeat.example="${map.examples}">${example @ context='html'}</code>
<code data-sly-repeat.example="${map.examples}">${example}</code>
</div>
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@
<td class="_coral-Table-cell">${execution.command.toUpperCase}</td>
<td class="_coral-Table-cell">
<ul>
<li data-sly-repeat.text="${execution.prettyParameters}">${text @ context='html'}</li>
<li data-sly-repeat.text="${execution.parameters}">${text}</li>
</ul>
</td>
<td class="_coral-Table-cell">
<coral-icon title="${execution.status.iconTitle}" icon="${execution.status.iconType}"/>
</td>
<td class="_coral-Table-cell">
<ul>
<li data-sly-repeat.text="${execution.prettyMessages}">${text @ context='html'}</li>
<li data-sly-repeat.text="${execution.messages}">${text}</li>
</ul>
</td>
</tr>
Expand Down

0 comments on commit 102f3d0

Please sign in to comment.