mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-03-25 20:57:29 +01:00
2010-01-07 Vadim Kurland <vadim@vk.crocodile.org>
* FWObjectPropertiesFactory.cpp (FWObjectPropertiesFactory::getObjectPropertiesBrief): fixes #1059: "set attribute field in gui tree for policy and nat based on its settings". Show "top ruleset" and "ipv4" or "ipv6" in the second column of the object tree for rule set objects.
This commit is contained in:
parent
129fa41bfc
commit
7c4a31d461
@ -1,5 +1,10 @@
|
||||
2010-01-07 Vadim Kurland <vadim@vk.crocodile.org>
|
||||
|
||||
* FWObjectPropertiesFactory.cpp (FWObjectPropertiesFactory::getObjectPropertiesBrief):
|
||||
fixes #1059: "set attribute field in gui tree for policy and nat
|
||||
based on its settings". Show "top ruleset" and "ipv4" or "ipv6" in
|
||||
the second column of the object tree for rule set objects.
|
||||
|
||||
* ProjectPanel_file_ops.cpp (ProjectPanel::loadLibrary): fixed bug
|
||||
#1053 "duplicate objects created on "Import library" operation".
|
||||
When user used "File/Import Library" function, the library is
|
||||
|
||||
@ -62,6 +62,7 @@
|
||||
#include "fwbuilder/Policy.h"
|
||||
#include "fwbuilder/Resources.h"
|
||||
#include "fwbuilder/Rule.h"
|
||||
#include "fwbuilder/RuleSet.h"
|
||||
#include "fwbuilder/TCPService.h"
|
||||
#include "fwbuilder/TagService.h"
|
||||
#include "fwbuilder/UDPService.h"
|
||||
@ -247,6 +248,18 @@ QString FWObjectPropertiesFactory::getObjectPropertiesBrief(FWObject *obj)
|
||||
{
|
||||
const UserService* user_srv = UserService::constcast(obj);
|
||||
str << "User id: \"" << user_srv->getUserId().c_str() << "\"" ;
|
||||
} else if (RuleSet::cast(obj) != NULL)
|
||||
{
|
||||
QStringList attrs;
|
||||
RuleSet *rs = RuleSet::cast(obj);
|
||||
if (rs->isTop()) attrs.push_back("top ruleset");
|
||||
if (rs->isDual()) attrs.push_back("ipv4/ipv6");
|
||||
else
|
||||
{
|
||||
if (rs->isV4()) attrs.push_back("ipv4");
|
||||
if (rs->isV6()) attrs.push_back("ipv6");
|
||||
}
|
||||
str << attrs.join(" ");
|
||||
} else if (Interval::isA(obj))
|
||||
{
|
||||
|
||||
|
||||
@ -139,9 +139,6 @@ void ObjectManipulator::setupProject(ProjectPanel *project)
|
||||
*/
|
||||
QString ObjectManipulator::getTreeLabel( FWObject *obj )
|
||||
{
|
||||
QString name;
|
||||
if (RuleSet::cast(obj)) return "";
|
||||
|
||||
return FWObjectPropertiesFactory::getObjectPropertiesBrief(obj);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user