當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。