本文整理匯總了PHP中Dashboard::addRow方法的典型用法代碼示例。如果您正苦於以下問題:PHP Dashboard::addRow方法的具體用法?PHP Dashboard::addRow怎麽用?PHP Dashboard::addRow使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Dashboard
的用法示例。
在下文中一共展示了Dashboard::addRow方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: errorMarkdownDashboard
/**
Creates a new Markdown dashboard.
@param string $message contains the body.
@return object
**/
public static function errorMarkdownDashboard($message)
{
$dashboard = new Dashboard('Error');
$dashboard->addRow(static::genMarkdownRow($message, 'ERROR'));
return $dashboard;
}
示例2: Rule
/**
Load Check Template File.
PHP version 5
@category Template_File
@package Histou/templates/default
@author Philip Griesbacher <griesbacher@consol.de>
@license http://opensource.org/licenses/gpl-license.php GNU Public License
@link https://github.com/Griesbacher/histou
**/
$rule = new Rule($host = '*', $service = '*', $command = '*', $perfLabel = array('load1', 'load5', 'load15'));
$genTemplate = function ($perfData) {
$perfKeys = array_keys($perfData['perfLabel']);
$dashboard = new Dashboard($perfData['host'] . '-' . $perfData['service']);
$row = new Row($perfData['service'] . ' ' . $perfData['command']);
$panel = new GraphPanel($perfData['host'] . ' ' . $perfData['service'] . ' ' . $perfData['command']);
$colors = array('#085DFF', '#07ff78', '#4707ff');
for ($i = 0; $i < sizeof($perfData['perfLabel']); $i++) {
$target = sprintf('%s%s%s%s%s%s%s%s%s', $perfData['host'], INFLUX_FIELDSEPERATOR, $perfData['service'], INFLUX_FIELDSEPERATOR, $perfData['command'], INFLUX_FIELDSEPERATOR, $perfKeys[$i], INFLUX_FIELDSEPERATOR, "value");
$alias = $perfKeys[$i];
$panel->addAliasColor($alias, $colors[$i]);
$panel->addTargetSimple($target, $alias);
$panel->fillBelowLine($alias, 2);
$panel->addDowntime($perfData['host'], $perfData['service'], $perfData['command'], $perfKeys[$i]);
}
$panel->addWarning($perfData['host'], $perfData['service'], $perfData['command'], $perfKeys['load1']);
$panel->addCritical($perfData['host'], $perfData['service'], $perfData['command'], $perfKeys['load1']);
$row->addPanel($panel);
$dashboard->addRow($row);
$dashboard->addDefaultAnnotations($perfData['host'], $perfData['service']);
return $dashboard;
};