The translations of the values through the dictionary is reserved to attributes of type 'Enum'.
So if you want to have an attribute that looks like a drop-down list in iTop, declare it like:
MetaModel::Init_AddAttribute(new AttributeEnum("monitoring", array("allowed_values"=>new ValueSetEnum('rancid'), "sql"=>"monitoring", "default_value"=>"rancid", "is_null_allowed"=>true, "depends_on"=>array())));
Hope this helps,
- Denis
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I added the following lines to model.itop-config-mgmt.php in class NetworkDevice :
MetaModel::Init_AddAttribute(new AttributeString("monitoring", array("allowed_values"=>new ValueSetEnum('rancid'), "sql"=>"monitoring", "default_value"=>"rancid", "is_null_allowed"=>true, "depends_on"=>array())));
This successfully adds a new attribute to the Network CI with rancid in its list.
The following was added to the file en.dict.itop-config-mgmt.php:
'Class:NetworkDevice/Attribute:monitoring' => 'Monitoring',
'Class:NetworkDevice/Attribute:monitoring+' => '',
'Class:NetworkDevice/Attribute:monitoring/Value:rancid' => 'Rancid',
'Class:NetworkDevice/Attribute:monitoring/Value:rancid+' => '',
'Monitoring' is picked up , but 'Rancid' is not and the item in the list Monitoring keeps showing up as 'rancid'
I am just wondering what I have missed here. Any suggestions would be very welcome. Thanks
Bernhard
The translations of the values through the dictionary is reserved to attributes of type 'Enum'.
So if you want to have an attribute that looks like a drop-down list in iTop, declare it like:
MetaModel::Init_AddAttribute(new AttributeEnum("monitoring", array("allowed_values"=>new ValueSetEnum('rancid'), "sql"=>"monitoring", "default_value"=>"rancid", "is_null_allowed"=>true, "depends_on"=>array())));
Hope this helps,
- Denis
it did thanks