This commit is contained in:
2025-10-17 16:57:02 +05:30
parent bceca2b714
commit 30cde5052b
5 changed files with 8 additions and 28 deletions

View File

@@ -1,12 +1,11 @@
general: general:
delete_log_file_at_start: true delete_log_file_at_start: true
callsign: XXXXX # Log4OM Callsign used to check if you get spotted by someone callsign: XXXXX # Log4OM Callsign used to check if you get spotted by someone
QRALocator: JN36dg
log_to_file: true log_to_file: true
log_level: INFO # INFO or DEBUG or WARN log_level: INFO # INFO or DEBUG or WARN
telnetserver: true # not in use for now telnetserver: true # not in use for now
flexradiospot: true # not in use for now flexradiospot: true
sendFreqModeToLog4OM: false # if not using a Flex then turn this on to send Freq and Mode to Log4OM which should in turn change the freq on the radio send_freq_log: true # if not using a Flex then turn this on to send Freq and Mode to Log4OM which should in turn change the freq on the radio
# Spot colors, if empty then default, colors in HEX AARRGGBB format # Spot colors, if empty then default, colors in HEX AARRGGBB format
spot_color_new_entity: spot_color_new_entity:
background_color_new_entity: background_color_new_entity:

View File

@@ -18,8 +18,8 @@ type Config struct {
LogLevel string `yaml:"log_level"` LogLevel string `yaml:"log_level"`
TelnetServer bool `yaml:"telnetserver"` TelnetServer bool `yaml:"telnetserver"`
FlexRadioSpot bool `yaml:"flexradiospot"` FlexRadioSpot bool `yaml:"flexradiospot"`
SendFreqModeToLog bool `yaml:"send_freq_log"`
SpotColorNewEntity string `yaml:"spot_color_new_entity"` SpotColorNewEntity string `yaml:"spot_color_new_entity"`
sendFreqModeToLog4OM bool `yaml:"sendFreqModeToLog4OM"`
BackgroundColorNewEntity string `yaml:"background_color_new_entity"` BackgroundColorNewEntity string `yaml:"background_color_new_entity"`
SpotColorNewBand string `yaml:"spot_color_new_band"` SpotColorNewBand string `yaml:"spot_color_new_band"`
BackgroundColorNewBand string `yaml:"background_color_new_band"` BackgroundColorNewBand string `yaml:"background_color_new_band"`

View File

@@ -60,12 +60,12 @@
<div class="bg-slate-900/50 flex-shrink-0"> <div class="bg-slate-900/50 flex-shrink-0">
<div class="flex text-left text-xs text-slate-400 font-semibold"> <div class="flex text-left text-xs text-slate-400 font-semibold">
<div class="p-2" style="width: 12%;">DX</div> <div class="p-2" style="width: 12%;">DX</div>
<div class="p-2" style="width: 25%;">Country</div>
<div class="p-2" style="width: 12%;">Freq</div> <div class="p-2" style="width: 12%;">Freq</div>
<div class="p-2" style="width: 8%;">Band</div> <div class="p-2" style="width: 8%;">Band</div>
<div class="p-2" style="width: 8%;">Mode</div> <div class="p-2" style="width: 8%;">Mode</div>
<div class="p-2" style="width: 12%;">Spotter</div> <div class="p-2" style="width: 12%;">Spotter</div>
<div class="p-2" style="width: 8%;">Time</div> <div class="p-2" style="width: 8%;">Time</div>
<div class="p-2" style="width: 25%;">Country</div>
<div class="p-2" style="width: 15%;">Status</div> <div class="p-2" style="width: 15%;">Status</div>
</div> </div>
</div> </div>
@@ -82,6 +82,9 @@
{item.DX} {item.DX}
</button> </button>
</div> </div>
<div class="p-2 flex items-center text-slate-400 text-xs truncate" style="width: 25%;" title={item.CountryName || 'N/A'}>
{item.CountryName || 'N/A'}
</div>
<div class="p-2 flex items-center font-mono text-xs" style="width: 12%;">{item.FrequencyMhz}</div> <div class="p-2 flex items-center font-mono text-xs" style="width: 12%;">{item.FrequencyMhz}</div>
<div class="p-2 flex items-center" style="width: 8%;"> <div class="p-2 flex items-center" style="width: 8%;">
<span class="px-1.5 py-0.5 bg-slate-700/50 rounded text-xs">{item.Band}</span> <span class="px-1.5 py-0.5 bg-slate-700/50 rounded text-xs">{item.Band}</span>
@@ -93,9 +96,6 @@
{item.SpotterCallsign} {item.SpotterCallsign}
</div> </div>
<div class="p-2 flex items-center text-slate-400 text-xs" style="width: 8%;">{item.UTCTime}</div> <div class="p-2 flex items-center text-slate-400 text-xs" style="width: 8%;">{item.UTCTime}</div>
<div class="p-2 flex items-center text-slate-400 text-xs truncate" style="width: 25%;" title={item.CountryName || 'N/A'}>
{item.CountryName || 'N/A'}
</div>
<div class="p-2 flex items-center" style="width: 15%;"> <div class="p-2 flex items-center" style="width: 15%;">
{#if getStatusLabel(item)} {#if getStatusLabel(item)}
<span class="px-1.5 py-0.5 rounded text-xs font-semibold border {getPriorityColor(item)} truncate"> <span class="px-1.5 py-0.5 rounded text-xs font-semibold border {getPriorityColor(item)} truncate">

View File

@@ -791,7 +791,7 @@ func (s *HTTPServer) handleSendCallsign(w http.ResponseWriter, r *http.Request)
SendUDPMessage([]byte("<CALLSIGN>" + req.Callsign)) SendUDPMessage([]byte("<CALLSIGN>" + req.Callsign))
s.Log.Infof("Sent callsign %s to Log4OM via UDP (127.0.0.1:2241)", req.Callsign) s.Log.Infof("Sent callsign %s to Log4OM via UDP (127.0.0.1:2241)", req.Callsign)
if Cfg.General.sendFreqModeToLog4OM { if Cfg.General.SendFreqModeToLog {
freqLog4OM := strings.Replace(req.Frequency, ".", "", 1) freqLog4OM := strings.Replace(req.Frequency, ".", "", 1)
xmlRequestFreq := RemoteControlRequestFreq{ xmlRequestFreq := RemoteControlRequestFreq{

19
log.go
View File

@@ -51,22 +51,3 @@ func NewLog() *log.Logger {
return Log return Log
} }
// Info ...
// func Info(format string, v ...interface{}) {
// log.Infof(format, v...)
// }
// // Warn ...
// func Warn(format string, v ...interface{}) {
// log.Warnf(format, v...)
// }
// // Error ...
// func Error(format string, v ...interface{}) {
// log.Errorf(format, v...)
// }
// func Debug(format string, v ...interface{}) {
// log.Debugf(format, v...)
// }