当前位置: 首页>>代码示例>>PHP>>正文


PHP Dashboard::hasGraphitePie方法代码示例

本文整理汇总了PHP中Dashboard::hasGraphitePie方法的典型用法代码示例。如果您正苦于以下问题:PHP Dashboard::hasGraphitePie方法的具体用法?PHP Dashboard::hasGraphitePie怎么用?PHP Dashboard::hasGraphitePie使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dashboard的用法示例。


在下文中一共展示了Dashboard::hasGraphitePie方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: isset

<?php

require_once 'Dashboard.php';
$times = isset($times) ? $times : Dashboard::getTimes();
if (!isset($time)) {
    $time = !empty($_GET['time']) ? $_GET['time'] : '1h';
}
if (!isset($hide_deploys)) {
    $hide_deploys = !empty($_GET['hide_deploys']) ? $_GET['hide_deploys'] : false;
}
$show_deploys = !$hide_deploys;
if (isset($graphs)) {
    if (Dashboard::hasGraphitePie($graphs)) {
        $page_js_imports = array_merge(isset($page_js_imports) ? $page_js_imports : array(), array("/assets/js/flot/jquery.flot.js", "/assets/js/flot/jquery.flot.pie.js", "/assets/js/flot.js", "/assets/js/graphite_percentage.js"));
    }
    if (Dashboard::hasGraphitePercentage($graphs)) {
        $page_js_imports = array_merge(isset($page_js_imports) ? $page_js_imports : array(), array("/assets/js/d3-2.9.1.min.js", "/assets/js/graphite_percentage.js", "/assets/js/graphite_bar_percentage.js"));
    }
    $has_graphite_with_html_legend = false;
    foreach ((array) $graphs as $section) {
        foreach ((array) $section as $graph) {
            if (isset($graph['type']) && $graph['type'] == 'graphite' && isset($graph['show_html_legend']) && $graph['show_html_legend'] == true) {
                $has_graphite_with_html_legend = true;
            }
        }
    }
    if ($has_graphite_with_html_legend) {
        $page_js_imports = array_merge(isset($page_js_imports) ? $page_js_imports : array(), array("/assets/js/zeroclipboard-0.7/ZeroClipboard.js", "/assets/js/copyurl.js"));
        $page_css_imports = array_merge(isset($page_css_imports) ? $page_css_imports : array(), array("/assets/css/copyurl.css"));
    }
}
开发者ID:igorette,项目名称:dashboard,代码行数:31,代码来源:template_init.inc.php


注:本文中的Dashboard::hasGraphitePie方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。