andywq 发表于 2015-6-10 14:39:21

关于自定义Datamodel

前辈的帖子已经讲得很清楚了:

http://www.ITILxf.com/forum.php?mod=viewthread&tid=43336&extra=page%3D1%26filter%3Dtypeid%26typeid%3D243%26typeid%3D243

http://www.ITILxf.com/forum.php?mod=viewthread&tid=43570&extra=page%3D1%26filter%3Dtypeid%26typeid%3D243%26typeid%3D243

我在这里补充一点儿我的思路吧

1. 在ITOP里主要数据模型都称为datamodel,从文件上说应该都在datamodels目录下的(子目录下的) datamodel.xxxx.xml文件中定义
2. xml中除了定义model(数据),menu(菜单)控制也在其中(<menus>段)
3. 多对多关联参见lnkServerToVolume(itop-storage-mgmt/datamodel.itop-storage-mgmt.xml 其实就是个中间表)
4. 一对多关联参见PhysicalDevice.location_id(itop-config-mgmt/datamodel.itop-config-mgmt.xml)
5. 主要的"compile"xml 到 php 文件的过程大致应该都在setup下能找到(貌似主要是这个文件setup/compiler.class.inc.php,所以如果xml文件格式有啥问题,除了看文档也可以看看这个文件里面是怎么解析的)


990487026 发表于 2015-7-8 11:51:49

如何在pc里面,自定义添加一个【disk】字段?
页: [1]
查看完整版本: 关于自定义Datamodel