コード例 #1
0
ファイル: graph.php プロジェクト: DarneoStudio/bitrix
			<span class="adm-btn-wrap"><input type="submit" class="adm-btn" name="set_filter" value="<?php 
        echo Loc::getMessage("SCALE_GRAPH_SHOW");
        ?>
" title="<?php 
        echo Loc::getMessage("SCALE_GRAPH_SHOW");
        ?>
"></span>
			<?php 
        $oFilter->End();
        ?>
		</form>

		<div class="adm-scale-page-wrap" id="adm-scale-page-wrap">
			<div class="adm-scale-blocks-wrapper" id="adm-scale-blocks-wrapper">
				<?php 
        if (\Bitrix\Scale\Monitoring::isDatabaseCreated($serverHostname)) {
            ?>
					<div class="bx-scale-graph">
						<div class="bx-scale-graph-category"><?php 
            echo $graphs[$monitoringCategoryId]["NAME"];
            ?>
</div>
						<?php 
            if (isset($graphs[$monitoringCategoryId]["ITEMS"]) && is_array($graphs[$monitoringCategoryId]["ITEMS"])) {
                ?>
							<?php 
                foreach ($graphs[$monitoringCategoryId]["ITEMS"] as $param) {
                    ?>
								<div><img class="adm-scale-graph-img" src="scale_image.php?SERVER=<?php 
                    echo $serverHostname;
                    ?>
コード例 #2
0
ファイル: ajax.php プロジェクト: DarneoStudio/bitrix
     foreach ($servers as $hostname => $monitoringPartitions) {
         $arResult["MONITORING_DATA"][$hostname] = array();
         if (isset($monitoringPartitions["rolesIds"]) && is_array($monitoringPartitions["rolesIds"])) {
             foreach ($monitoringPartitions["rolesIds"] as $roleId) {
                 try {
                     $arResult["MONITORING_DATA"][$hostname]["ROLES_LOADBARS"][$roleId] = \Bitrix\Scale\Monitoring::getLoadBarValue($hostname, $roleId);
                 } catch (Exception $e) {
                     $arResult["ERROR"] .= "\n" . $e->getMessage();
                     continue;
                 }
             }
         }
         foreach ($monitoringPartitions["monitoringParams"] as $categoryId => $category) {
             foreach ($category as $paramId) {
                 try {
                     $arResult["MONITORING_DATA"][$hostname]["MONITORING_VALUES"][$categoryId][$paramId] = \Bitrix\Scale\Monitoring::getValue($hostname, $categoryId, $paramId);
                 } catch (Exception $e) {
                     $arResult["ERROR"] .= "\n" . $e->getMessage();
                     continue;
                 }
             }
         }
     }
     break;
 case "get_providers_list":
     $arResult["PROVIDERS_LIST"] = \Bitrix\Scale\Provider::getList(array("filter" => array("status" => "enabled")));
     $result = true;
     break;
 case "get_provider_configs":
     $providerId = isset($_REQUEST['params']['providerId']) ? $_REQUEST['params']['providerId'] : "";
     if (strlen($providerId) >= 0) {
コード例 #3
0
ファイル: panel.php プロジェクト: spas-viktor/books
;
			BX.Scale.monitoringEnabled = <?php 
    echo Bitrix\Scale\Monitoring::isEnabled() ? "true" : "false";
    ?>
;
			BX.Scale.monitoringCategories = {};
			BX.Scale.isMonitoringDbCreated = {};

			<?php 
    foreach ($serversList as $hostname => $server) {
        ?>
				BX.Scale.monitoringCategories["<?php 
        echo $hostname;
        ?>
"] = <?php 
        echo CUtil::PhpToJSObject(\Bitrix\Scale\Monitoring::getInfoTableCategoriesList($hostname));
        ?>
;
				BX.Scale.isMonitoringDbCreated["<?php 
        echo $hostname;
        ?>
"] = <?php 
        echo Bitrix\Scale\Monitoring::isDatabaseCreated($hostname) ? "true" : "false";
        ?>
;
			<?php 
    }
    ?>

			BX.Scale.serversCollection = new BX.Scale.Collection(BX.Scale.Server, <?php 
    echo CUtil::PhpToJSObject($serversList);