Skip to content

Commit

Permalink
Add word wrapping for error messages displayed in 'Status' Area
Browse files Browse the repository at this point in the history
  • Loading branch information
jakekarnes42 committed Apr 14, 2022
1 parent 62c63d1 commit 868ecf4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ private void initListeners() {
//Quick check to see if we need to report the cause at one level deeper
Throwable cause = ex.getCause() == null ? ex : ex.getCause();
logError("Cause: " + cause.getMessage());
view.profileStatusTextLabel.setText("Error testing profile: " + cause.getMessage());
view.profileStatusTextLabel.putClientProperty("html.disable", null);
view.profileStatusTextLabel.setText("<html><b>Error testing profile:</b> " + cause.getMessage() + "</html>");
}
}).start();

Expand Down Expand Up @@ -373,7 +374,8 @@ private void initListeners() {
logError("Unable to parse session policy into JSON object and pretty print. Current value: " + sessionPolicy);
//Quick check to see if we need to report the cause at one level deeper
Throwable cause = ex.getCause() == null ? ex : ex.getCause();
view.profileStatusTextLabel.setText("Session policy error: " + cause.getMessage());
view.profileStatusTextLabel.putClientProperty("html.disable", null);
view.profileStatusTextLabel.setText("<html><b>Session policy error:</b> " + cause.getMessage() + "</html>");
}
} else {
logDebug("There's no current session policy. Nothing to set.");
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/netspi/awssigner/view/BurpTabPanel.form
Original file line number Diff line number Diff line change
Expand Up @@ -421,11 +421,11 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="10" pref="10" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Group type="102" attributes="0">
<Component id="profileStatusLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="profileStatusTextLabel" min="-2" max="-2" attributes="0"/>
<Component id="profileStatusTextLabel" pref="637" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
Expand Down Expand Up @@ -468,9 +468,9 @@
<Component id="profileNameLabel" alignment="3" min="-2" pref="30" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="profileStatusLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="profileStatusTextLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="profileStatusLabel" min="-2" max="-2" attributes="0"/>
<Component id="profileStatusTextLabel" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/netspi/awssigner/view/BurpTabPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -643,11 +643,11 @@ public void mouseClicked(java.awt.event.MouseEvent evt) {
.addGroup(profileConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(profileConfigurationPanelLayout.createSequentialGroup()
.addGap(10, 10, 10)
.addGroup(profileConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(profileConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(profileConfigurationPanelLayout.createSequentialGroup()
.addComponent(profileStatusLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(profileStatusTextLabel))
.addComponent(profileStatusTextLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 637, Short.MAX_VALUE))
.addGroup(profileConfigurationPanelLayout.createSequentialGroup()
.addGroup(profileConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(profileServiceLabel)
Expand Down Expand Up @@ -678,7 +678,7 @@ public void mouseClicked(java.awt.event.MouseEvent evt) {
.addComponent(profileConfigurationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(profileNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(profileConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addGroup(profileConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(profileStatusLabel)
.addComponent(profileStatusTextLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
Expand Down

0 comments on commit 868ecf4

Please sign in to comment.