mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Ref T82, removed add button for servers, only save
* save will add a new server when not already existing * when saved with same name, it will override values * default values for FSD setup * adjusted validation
This commit is contained in:
@@ -91,13 +91,14 @@ namespace BlackMisc
|
||||
{
|
||||
static const CLogCategoryList cats(CLogCategoryList(this).join({ CLogCategory::validation()}));
|
||||
CStatusMessageList msgs;
|
||||
if (this->getName().isEmpty()) { msgs.push_back(CStatusMessage(CStatusMessage::SeverityWarning, "Missing name")); }
|
||||
if (this->getAddress().isEmpty()) { msgs.push_back(CStatusMessage(CStatusMessage::SeverityWarning, "Missing address")); }
|
||||
if (this->getName().isEmpty()) { msgs.push_back(CStatusMessage(CStatusMessage::SeverityError, "Missing name")); }
|
||||
if (this->getAddress().isEmpty()) { msgs.push_back(CStatusMessage(CStatusMessage::SeverityError, "Missing address")); }
|
||||
if (this->getDescription().isEmpty()) { msgs.push_back(CStatusMessage(CStatusMessage::SeverityWarning, "Missing description")); }
|
||||
if (this->getPort() < 1 || this->getPort() > 65535) { msgs.push_back(CStatusMessage(CStatusMessage::SeverityWarning, "Wrong port")); }
|
||||
if (this->getPort() < 1 || this->getPort() > 65535) { msgs.push_back(CStatusMessage(CStatusMessage::SeverityError, "Wrong port")); }
|
||||
msgs.push_back(this->getUser().validate());
|
||||
msgs.push_back(this->getFsdSetup().validate());
|
||||
msgs.addCategories(cats);
|
||||
msgs.sortBySeverity();
|
||||
return msgs;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user