'writing logs' label
This commit is contained in:
parent
d3ebdfdc91
commit
973d1de4d9
|
@ -15,6 +15,7 @@ public enum FileLog {
|
||||||
SIMULATOR_CONSOLE;
|
SIMULATOR_CONSOLE;
|
||||||
|
|
||||||
public static final String DIR = "out/";
|
public static final String DIR = "out/";
|
||||||
|
public static final String LOG_INFO_TEXT = "Writing logs to '" + DIR + "'";
|
||||||
public static String currentLogName;
|
public static String currentLogName;
|
||||||
public static final String END_OF_TIMESTAND_TAG = "<EOT>: ";
|
public static final String END_OF_TIMESTAND_TAG = "<EOT>: ";
|
||||||
public static final Logger LOGGER = new Logger() {
|
public static final Logger LOGGER = new Logger() {
|
||||||
|
|
|
@ -44,7 +44,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
||||||
* @see EngineSnifferPanel
|
* @see EngineSnifferPanel
|
||||||
*/
|
*/
|
||||||
public class Launcher {
|
public class Launcher {
|
||||||
public static final int CONSOLE_VERSION = 20170218;
|
public static final int CONSOLE_VERSION = 20170222;
|
||||||
public static final boolean SHOW_STIMULATOR = false;
|
public static final boolean SHOW_STIMULATOR = false;
|
||||||
private static final String TAB_INDEX = "main_tab";
|
private static final String TAB_INDEX = "main_tab";
|
||||||
protected static final String PORT_KEY = "port";
|
protected static final String PORT_KEY = "port";
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.rusefi.ui;
|
package com.rusefi.ui;
|
||||||
|
|
||||||
|
import com.rusefi.FileLog;
|
||||||
import com.rusefi.Launcher;
|
import com.rusefi.Launcher;
|
||||||
import com.rusefi.core.MessagesCentral;
|
import com.rusefi.core.MessagesCentral;
|
||||||
import com.rusefi.ui.util.UiUtils;
|
import com.rusefi.ui.util.UiUtils;
|
||||||
|
@ -13,7 +14,7 @@ public class WarningPanel {
|
||||||
|
|
||||||
private static final String WARNING = "WARNING";
|
private static final String WARNING = "WARNING";
|
||||||
private static final String ERROR = "firmware error";
|
private static final String ERROR = "firmware error";
|
||||||
private final JPanel panel = new JPanel(new BorderLayout());
|
private final JPanel panel = new JPanel(new FlowLayout());
|
||||||
|
|
||||||
private final JLabel label = new JLabel();
|
private final JLabel label = new JLabel();
|
||||||
private final JButton reset = new JButton("clear warning");
|
private final JButton reset = new JButton("clear warning");
|
||||||
|
@ -27,7 +28,7 @@ public class WarningPanel {
|
||||||
|
|
||||||
public WarningPanel() {
|
public WarningPanel() {
|
||||||
label.setForeground(Color.red);
|
label.setForeground(Color.red);
|
||||||
panel.add(label, BorderLayout.WEST);
|
panel.add(label);
|
||||||
|
|
||||||
Font currentFont = label.getFont();
|
Font currentFont = label.getFont();
|
||||||
label.setFont(currentFont.deriveFont((float) (currentFont.getSize() * 1.5)));
|
label.setFont(currentFont.deriveFont((float) (currentFont.getSize() * 1.5)));
|
||||||
|
@ -61,7 +62,9 @@ public class WarningPanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
panel.add(reset, BorderLayout.EAST);
|
panel.add(reset);
|
||||||
|
// todo: only display label if logs are being recorded
|
||||||
|
panel.add(new JLabel(FileLog.LOG_INFO_TEXT));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clear() {
|
private void clear() {
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class LogViewer extends JPanel {
|
||||||
return pathname.getName().contains("MAIN_rfi_report");
|
return pathname.getName().contains("MAIN_rfi_report");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
public static final String DEFAULT_LOG_LOCATION = "out";
|
public static final String DEFAULT_LOG_LOCATION = FileLog.DIR;
|
||||||
private final JLabel folderLabel = new JLabel();
|
private final JLabel folderLabel = new JLabel();
|
||||||
private final JLabel fileLabel = new JLabel();
|
private final JLabel fileLabel = new JLabel();
|
||||||
private final DefaultListModel<FileItem> fileListModel = new DefaultListModel<FileItem>();
|
private final DefaultListModel<FileItem> fileListModel = new DefaultListModel<FileItem>();
|
||||||
|
|
Loading…
Reference in New Issue