Skip to content

Commit

Permalink
Merge pull request #32 from NetSPI/2.0.2
Browse files Browse the repository at this point in the history
2.0.2 - Improving "Status" display
  • Loading branch information
jakekarnes42 authored Apr 14, 2022
2 parents dd6c604 + 868ecf4 commit 343bd16
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group "com.netspi.awssigner"
version "2.0.1"
version "2.0.2"

apply plugin: "java"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,7 @@ private void initListeners() {
Profile newProfile = newProfileOptional.get();
if (profile.getName().equals(newProfile.getName())) {
//Showing the same profile. we can update UI fields.
view.profileStatusTextLabel.putClientProperty("html.disable", null);
view.profileStatusTextLabel.setText("<html><font color='darkgreen'>Success</font></html>");
view.profileStatusTextLabel.setText("Success");
if (profile instanceof CommandProfile) {
view.commandExtractedAccessKeyTextField.setText(creds.getAccessKey());
view.commandExtractedSecretKeyTextField.setText(creds.getSecretKey());
Expand All @@ -311,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 @@ -374,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 343bd16

Please sign in to comment.