mirror of
https://bitbucket.org/anguist/ntpa
synced 2025-10-05 10:30:56 +00:00
Check for graph support
This commit is contained in:
@ -52,5 +52,7 @@ namespace Ntp.Analyzer.Localize
|
||||
public const string ConfigParseError = "Errors in configuration file:";
|
||||
public const string LogFileError = "Cannot create log file. {0}";
|
||||
public const string PidFileError = "Cannot create pid file. {0}";
|
||||
|
||||
public const string NoGraphBuild = "ntpa was not build with graph support but graphs are configured.";
|
||||
}
|
||||
}
|
@ -227,6 +227,19 @@ namespace Ntp.Analyzer.Process
|
||||
Severity.Info);
|
||||
}
|
||||
|
||||
#if !GRAPH
|
||||
foreach (HostConfiguration server in config.Servers)
|
||||
{
|
||||
if (server.HostGraphs.Count() != 0 ||
|
||||
server.PeerGraphs.Count() != 0 ||
|
||||
server.TrafficGraphs.Count() != 0)
|
||||
{
|
||||
initlog.WriteLine(InitializationMessage.NoGraphBuild, Severity.Warn);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user