Skip to content

Commit 4c506f0

Browse files
authored
Merge pull request #3307 from ControlSystemStudio/alarm_table
minor logging and docs improvements based on #3271 reviews
2 parents af20f73 + ef44cd5 commit 4c506f0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

app/alarm/model/src/main/resources/alarm_preferences.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ alarm_tree_startup_ms=2000
6565

6666
# Order of columns in alarm table
6767
# Allows re-ordering as well as omitting columns
68+
# The supported columns are: Icon, PV, Description, Alarm Severity, Alarm Message, Alarm Time, Alarm Value, PV Severity, PV Message
6869
alarm_table_columns=Icon, PV, Description, Alarm Severity, Alarm Message, Alarm Time, Alarm Value, PV Severity, PV Message
6970

7071
# By default, the alarm table uses the common alarm severity colors

app/alarm/ui/src/main/java/org/phoebus/applications/alarm/ui/table/AlarmTableUI.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
import java.util.Optional;
1717
import java.util.logging.Level;
1818
import java.util.regex.Pattern;
19+
import java.util.stream.Collectors;
1920

2021
import javafx.application.Platform;
22+
import javafx.scene.control.TableColumnBase;
2123
import javafx.scene.layout.Background;
2224
import javafx.scene.layout.BorderPane;
2325
import javafx.scene.layout.Priority;
@@ -493,7 +495,8 @@ private TableView<AlarmInfoRow> createTable(final ObservableList<AlarmInfoRow> r
493495
if (to_add.isPresent())
494496
table.getColumns().add(to_add.get());
495497
else
496-
logger.log(Level.WARNING, "Unknown Alarm Table column '" + header + "'");
498+
logger.log(Level.SEVERE, "Unknown Alarm Table column '" + header + "' " +
499+
" Supported columns are: " + cols.stream().map(TableColumnBase::getText).collect(Collectors.joining(", ")));
497500
}
498501

499502
// Initially, sort on PV name

0 commit comments

Comments
 (0)