Beispiel #1
0
 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 ** GNU General Public License for more details.
 **
 ** You should have received a copy of the GNU General Public License
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 **/
require_once dirname(__FILE__) . '/include/config.inc.php';
require_once dirname(__FILE__) . '/include/hosts.inc.php';
require_once dirname(__FILE__) . '/include/reports.inc.php';
$page['title'] = _('Zabbix zatree');
$page['file'] = 'zatree.php';
$page['hist_arg'] = array('mode', 'groupid', 'hostid', 'tpl_triggerid');
$page['scripts'] = array('class.calendar.js');
$page['type'] = detect_page_type(PAGE_TYPE_HTML);
require_once dirname(__FILE__) . '/include/page_header.php';
$zatree_widget = new CWidget(null, "zatree_iframe");
$zatree_widget->addPageHeader("Zatree", get_icon('fullscreen', array('fullscreen' => $_REQUEST['fullscreen'])));
$zatree_iframe_left = new CIFrame("zatree/left.php", "100%", "100%", "auto", "zatree_iframe_left");
$zatree_iframe_right = new CIFrame("zatree/graph.php", "100%", "100%", "auto", "zatree_iframe_right");
$zatree_iframe_left->setAttribute("name", "leftFrame");
$zatree_iframe_left->setAttribute("id", "leftFrame");
$zatree_iframe_right->setAttribute("name", "rightFrame");
$zatree_iframe_right->setAttribute("id", "rightFrame");
$zatree_widget->addItem(new CDiv($zatree_iframe_left, "iframe", "zatree_left"));
$zatree_widget->addItem(new CDiv(new CDiv(null, "line"), "iframe", "resizeDiv"));
$zatree_widget->addItem(new CDiv($zatree_iframe_right, "iframe", "zatree_right"));
$zatree_widget->show();
$resizeJs = "\n        var \$ = jQuery;\n        var \$gtree_widget = \$('#resizeDiv').parent();\n        var \$resizeDiv = \$('#resizeDiv'); //jQury 对象\n        var resizeDiv = \$('#resizeDiv')[0]; //dom 对象\n        var _drag = false;\n        \$resizeDiv.on('mousedown',function(e){\n            _drag = true;\n            var disX = e.clientX;\n            var glw = \$('#zatree_left').width();\n            var grw = \$('#zatree_right').width();\n            \$gtree_widget.on('mousemove',function(e1){\n                if(_drag){\n                    var iT = e1.clientX - disX;\n                    \$('#zatree_left').width(glw + iT);\n                    \$('#zatree_right').width(grw - iT);\n                }\n                return false;\n            });\n\n            \$gtree_widget.on('mouseup',function() {\n                \$gtree_widget.unbind('mousemove mouseup');\n                //\$gtree_widget.unbind('mouseup');\n                //resizeDiv.releaseCapture && resizeDiv.releaseCapture();\n                this.releaseCapture && this.releaseCapture();\n                _drag = false;\n                return false;\n            });\n\n            \$gtree_widget.on('mouseleave',function() {\n                \$gtree_widget.unbind('mousemove mouseup');\n                _drag = false;\n                //resizeDiv.releaseCapture && resizeDiv.releaseCapture();\n                this.releaseCapture && this.releaseCapture();\n                return false;\n            });\n\n            this.setCapture && this.setCapture();\n            return false;\n        });\n\n\n    ";
insert_js($resizeJs, true);
require_once dirname(__FILE__) . '/include/page_footer.php';
Beispiel #2
0
 ** the Free Software Foundation; either version 2 of the License, or
 ** (at your option) any later version.
 **
 ** This program is distributed in the hope that it will be useful,
 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 ** GNU General Public License for more details.
 **
 ** You should have received a copy of the GNU General Public License
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 **/
require_once dirname(__FILE__) . '/include/config.inc.php';
require_once dirname(__FILE__) . '/include/hosts.inc.php';
require_once dirname(__FILE__) . '/include/reports.inc.php';
$page['title'] = _('Zabbix zatree');
$page['file'] = 'zatree.php';
$page['hist_arg'] = array('mode', 'groupid', 'hostid', 'tpl_triggerid');
$page['scripts'] = array('class.calendar.js');
$page['type'] = detect_page_type(PAGE_TYPE_HTML);
require_once dirname(__FILE__) . '/include/page_header.php';
$zatree_widget = new CWidget(null, "zatree_iframe");
$zatree_widget->addPageHeader(_('Zatree'));
$zatree_iframe_left = new CIFrame("zatree/left.php", "20%", "100%", "yes", "zatree_iframe_left");
$zatree_iframe_right = new CIFrame("zatree/graph.php", "80%", "100%", "yes", "zatree_iframe_right");
$zatree_iframe_left->setAttribute("name", "leftFrame");
$zatree_iframe_right->setAttribute("name", "rightFrame");
$zatree_widget->addItem($zatree_iframe_left);
$zatree_widget->addItem($zatree_iframe_right);
$zatree_widget->show();
require_once dirname(__FILE__) . '/include/page_footer.php';