-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
升级到2.7.x #112
Comments
插件开发方式变化Since: 2.4 Ref: https://www.itophub.io/wiki/page?id=2_7_0%3Acustomization%3Adatamodel 区分 extension 和 module 扩展是一个或者多个模块组成的。
目录中包含 如果一个模块被多个扩展使用,iTop 只会安装版本最高的那个(这样似乎会出现重复代码?)。 extension.xmlAn XML definition file, used by iTop 2.4 and above. This file contains some information similar to the module PHP file, but enables the support of extensions containing several modules. If the module is located inside a folder already containing an extension.xml file (in the parent folder), the content of this file is ignored. 只有一个模块的扩展是可以只分一层目录的,把 extension.xml 直接放到模块根目录,这种模块如果被另外一个扩展引用,即其父目录也会有一个 extension.xml 文件,这时,这种模块的 extension.xml 会被忽略。 一个例子 <?xml version="1.0" encoding="UTF-8"?>
<extension format="1.0">
<extension_code>molkobain-datacenter-view</extension_code>
<company>Molkobain</company>
<author><![CDATA[Guillaume Lajarige]]></author>
<label><![CDATA[Datacenter view]]></label>
<description><![CDATA[Visual representation of racks, enclosures & devices]]></description>
<version>1.7.0</version>
<release_date>2020-06-14</release_date>
<version_description><![CDATA[Add filter panel to highlight devices based on their name / serial number / asset number]]></version_description>
<itop_version_min>2.4.0</itop_version_min>
<status>stable</status>
<mandatory>false</mandatory>
<more_info_url>https://github.com/Molkobain/itop-datacenter-view</more_info_url>
</extension> |
唯一性检查功能Since: 2.6 通过 xml 定义唯一性规则,不需要在单独写 一个例子,要求FunctionalCI 下的对象如果属于同一个子类,则名字不能重复,否则可以重复,比如某个
即 另外一个完整的例子,标准模型中的
可以看到
标准模型定义了以下规则
修改规则和修改其他属性是一样的方法。如:
|
Tag Attribute功能Since: 2.6 新增了一个 链接:https://www.itophub.io/wiki/page?id=2_6_0%3Afeature%3Atag |
对象更新,对象删除触发器Since: 2.6 新增了对象更新和对象删除触发器,不需要单独插件了,需要测试是否兼容以前使用的插件的功能。 兼容性
注意
Be aware that if you set a TriggerOnUpdate on class Team for field members_list,
取值
TriggerOnUpdate 其他注意事项
|
函数变化Since: 2.7 跟踪对象变化,或者变化前的值
MetaModel::GetObject这时一个很常用的函数,影响会比较大。 // before 2.7.0 this was working for non admin users
$oUser = MetaModel::GetObject('User', $iCurrentUserId);
// After 2.7.0 to search for objects of the User class
// You need to explicitly specify to ignore current user rights on the User class
// Forcing the 4st parameter to true, bypass "current user rights"
$oUser = MetaModel::GetObject('User', $iCurrentUserId, true, true); 函数定义 public static GetObject($sClass, $iKey, $bMustBeFound = true, $bAllowAllData = false, $aModifierProperties = null) DBSearch::AllowAllDataitop-request-template 中用到了。
|
Dashboard AttributeSince: 2.6
|
API变化Since: 2.6.1
limit (int): Amount of results to return (default: 0 = no limit)
|
iTop MarkupSince: 2.7 通过此功能可以修改 console 或者 portal 里一些项目的样式,比如高亮某个属性。在 Kubernetes 插件中,有高亮 Deployment 的状态,可以考虑用此功能重做。 文档见:https://www.itophub.io/wiki/page?id=2_7_0%3Afeature%3Amarkup#itop_markup |
密码策略Since: 2.7 可以为
文档:https://www.itophub.io/wiki/page?id=2_7_0%3Aadmin%3Apassword-policy |
认证APISince: 2.7 Starting with version 2.7.0, it is now much easier to add new authentication methods in order to connect to iTop. Some are new 2.7 possibilities which must be coded using the iTop authentication API:
后续调研,基于最新 API 写一个 OIDC 登录的插件。 文档:https://www.itophub.io/wiki/page?id=2_7_0%3Acustomization%3Aauthentication |
OQL NOT IN SELECTSince: 2.7 举例,查询 Teams without members
文档:https://www.itophub.io/wiki/page?id=2_7_0%3Aoql%3Aoql_examples#oqlnew_in_27 |
基于上下文的提醒功能Since: 2.7 可根据引起触发的模块(CRON,REST,Console,Portal)来决定是否发送提醒。 文档:https://www.itophub.io/wiki/page?id=2_7_0%3Aadmin%3Anotifications#creating_a_trigger |
基于console界面的升降级操作Since: 2.7 With iTop 2.7.0 and above, iTop administrators can upgrade or downgrade their iTop, directly from iTop web interface (console), without having access to the iTop server. 文档: https://www.itophub.io/wiki/page?id=2_7_0%3Aadmin%3Acore-update |
在配置文件中使用环境变量Since: 2.7
可能能够方便在 Kubernetes 中部署。 |
插件兼容性Since: 2.7 由于从 Silex(一个PHP微框架,已停止维护)迁移到 Symphony,以下插件和 2.7 不兼容。
目前用到了第一个,会有影响 详见: https://www.itophub.io/wiki/page?id=2_7_0%3Ainstall%3A260_to_270_migration_notes |
从 2.5 升级到目前的最新版 2.7.x,调研自 2.5 以来的变化
关注以下几点:
2.6: https://www.itophub.io/wiki/page?id=2_6_0%3Arelease%3A2_6_whats_new
The text was updated successfully, but these errors were encountered: