欧卡2中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

需要三步,才能开始

只需两步,慢速开始

欧卡2入门方向盘选莱仕达V9莱仕达折叠便携游戏方向盘支架欢迎地图Mod入驻
查看: 7709|回复: 0
收起左侧

itop添加tab(可用于集成zabbix等)

[复制链接]
oppo 发表于 2016-6-16 10:34 | 显示全部楼层 |阅读模式
来自 https://github.com/lndevnull/ito ... -mk_integration.xml

[tex=code]
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
  <constants>
  </constants>
  <classes>
    <class id="Server" _delta="must_exist">
      <methods>
        <method id="DisplayBareRelations" _delta="define">
          <static>false</static>
          <access>public</access>
          <type>Overload-cmdbAbstractObject</type>
          <code><![CDATA[      public function DisplayBareRelations(WebPage $oPage, $bEditMode = false)
        {
                parent::DisplayBareRelations($oPage, $bEditMode);
                if (!$bEditMode)
                {
                                $oPage->SetCurrentTab('Check-MK');
                                $oPage->add('<div id="checkmk" style="width:100%;height:500px;">');
                                $oPage->add('<iframe style="border:0;padding:0;margin:0;width:100%;height:500px;overflow:auto" ');
                                $oPage->add('src="https://yourcheckmkhost.example.com/prod/check_mk/view.py?view_name=host&site=prod&st0=on&st1=on&st2=on&st3=on&stp=on&host='.$this->Get('name').'">');
                                $oPage->add('</iframe></div>');
                }
        }  ]]></code>
        </method>
      </methods>
    </class>
  </classes>
  <menus>
  </menus>
  <user_rights>
    <groups>
    </groups>
    <profiles>
    </profiles>
  </user_rights>
</itop_design>[/tex]
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

联系我们|手机版|欧卡2中国 ( 湘ICP备11020288号-1 )

GMT+8, 2024-4-29 09:06 , Processed in 0.119727 second(s), 9 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表