echo "</div><br>\n"; } echo "<div class=\"ui-widget-header ui-corner-top\">"; echo "<table border=0 width=100%><tr>\n"; echo "<td width=100% align=left>"; echo Kohana::lang('common.datasource', $value['ds_name']) . "</td>\n"; echo "<td align=right>"; echo nagios::SummaryLink($value['MACRO']['DISP_HOSTNAME'], $value['TIMERANGE']['start'], $value['TIMERANGE']['end']) . "</td>\n"; echo "<td align=right>"; echo nagios::AvailLink($value['MACRO']['DISP_HOSTNAME'], $value['MACRO']['DISP_SERVICEDESC'], $value['TIMERANGE']['start'], $value['TIMERANGE']['end']) . "</td>\n"; echo "<td align=right>"; echo pnp::add_to_basket_icon($value['MACRO']['HOSTNAME'], $value['MACRO']['SERVICEDESC'], $value['SOURCE']); echo "</td>\n"; echo "<td align=right>"; echo pnp::zoom_icon($value['MACRO']['HOSTNAME'], $value['MACRO']['SERVICEDESC'], $value['TIMERANGE']['start'], $value['TIMERANGE']['end'], $value['SOURCE'], $value['VIEW'], $value['GRAPH_WIDTH'], $value['GRAPH_HEIGHT']) . "</td>\n"; echo "</tr></table>\n"; echo "</div>\n"; echo "<div class=\"p4 gh ui-widget-content ui-corner-bottom\">\n"; echo "<div style=\"position:relative;\">\n"; $path = pnp::addToUri(array('host' => $value['MACRO']['HOSTNAME'], 'srv' => $value['MACRO']['SERVICEDESC']), FALSE); echo "<a href=\"" . url::base(TRUE) . "graph" . $path . "\" title=\"" . Kohana::lang('common.host', $value['MACRO']['DISP_HOSTNAME']) . " " . Kohana::lang('common.service', $value['MACRO']['DISP_SERVICEDESC']) . " " . Kohana::lang('common.datasource', $value['ds_name']) . " " . "\">\n"; echo "<div start=" . $value['TIMERANGE']['start'] . " end=" . $value['TIMERANGE']['end'] . " style=\"width:" . $value['GRAPH_WIDTH'] . "px; height:" . $value['GRAPH_HEIGHT'] . "px; position:absolute; top:33px\" class=\"graph\" id=\"" . $this->url . "\" ></div>"; $path = pnp::addToUri(array('host' => $value['MACRO']['HOSTNAME'], 'srv' => $value['MACRO']['SERVICEDESC'], 'view' => $value['VIEW'], 'source' => $value['SOURCE'], 'start' => $value['TIMERANGE']['start'], 'end' => $value['TIMERANGE']['end']), FALSE); echo "<img class=\"graph\" src=\"" . url::base(TRUE) . "image" . $path . "\"></a>\n"; echo "</div>\n"; echo "</div><p>\n"; } echo "</div>\n"; ?> <!-- Graph Content End-->
</h3> <div style="position:relative;"> <?php echo "<div start={$start} end={$end} style=\"width:" . $graph_width . "px; height:" . $graph_height . "px; position:absolute; top:33px\" class=\"graph\" id=\"" . $this->url . "\" ></div>"; if (!empty($tpl)) { echo "<img class=\"graph\" src=\"image?source={$source}" . "&tpl={$tpl}" . "&view={$view}" . "&start={$start}" . "&end={$end}" . "&graph_height={$graph_height}" . "&graph_width={$graph_width}\">"; } else { echo "<img src=\"image?source={$source}" . "&host={$host}" . "&srv={$srv}" . "&view={$view}" . "&start={$start}" . "&end={$end}" . "&graph_height={$graph_height}" . "&graph_width={$graph_width}\">"; } $start_down = $this->data->TIMERANGE['start'] - intval(($this->data->TIMERANGE['end'] - $this->data->TIMERANGE['start']) / 2); $path = pnp::addToUri(array('start' => $start_down)); printf("<a href=\"%s\" title=\"%s\"><img class=\"goto\" src=\"%s\" style=\"visibility: hidden; position:absolute; left:%dpx; bottom:-28px\"></a>\n", $path, "Move Start to " . date($this->config->conf['date_fmt'], $start_down), url::base() . "media/images/go-left.png", 10); $start_up = $this->data->TIMERANGE['start'] + intval(($this->data->TIMERANGE['end'] - $this->data->TIMERANGE['start']) / 2); $path = pnp::addToUri(array('start' => $start_up)); printf("<a href=\"%s\" title=\"%s\"><img class=\"goto\" src=\"%s\" style=\"visibility: hidden; position:absolute; left:%dpx; bottom:-28px\"></a>\n", $path, "Move Start to " . date($this->config->conf['date_fmt'], $start_up), url::base() . "media/images/go-right.png", 60); $path = pnp::addToUri(array('end' => time())); printf("<a href=\"%s\" title=\"%s\"><img class=\"goto\" src=\"%s\" style=\"visibility: hidden; position:absolute; right:%dpx; bottom:-28px\"></a>\n", $path, "Move End to " . date($this->config->conf['date_fmt'], time()), url::base() . "media/images/go-now.png", 10); $end_up = $this->data->TIMERANGE['end'] + intval(($this->data->TIMERANGE['end'] - $this->data->TIMERANGE['start']) / 2); $path = pnp::addToUri(array('end' => $end_up)); printf("<a href=\"%s\" title=\"%s\"><img class=\"goto\" src=\"%s\" style=\"visibility: hidden; position:absolute; right:%dpx; bottom:-28px\"></a>\n", $path, "Move End to " . date($this->config->conf['date_fmt'], $end_up), url::base() . "media/images/go-right.png", 60); $end_down = $this->data->TIMERANGE['end'] - intval(($this->data->TIMERANGE['end'] - $this->data->TIMERANGE['start']) / 2); $path = pnp::addToUri(array('end' => $end_down)); printf("<a href=\"%s\" title=\"%s\"><img class=\"goto\" src=\"%s\" style=\"visibility: hidden; position:absolute; right:%dpx; bottom:-28px\"></a>\n", $path, "Move End to " . date($this->config->conf['date_fmt'], $end_down), url::base() . "media/images/go-left.png", 110); ?> </div> </div> </div> </body> </html>
<?php if (!empty($this->templates) && $this->isAuthorizedFor('service_links')) { ?> <div class="ui-widget"> <div class="p2 ui-widget-header ui-corner-top"> <?php echo Kohana::lang('common.special-templates-box-header'); ?> </div> <div class="p4 ui-widget-content ui-corner-bottom"> <?php foreach ($this->templates as $template) { $path = pnp::addToUri(array('tpl' => $template)); echo "<a href=\"" . $path . "\" class=\"multi0\">" . pnp::shorten($template) . "</a><br>\n"; } ?> </div> </div> <p> <?php }
} if ($this->data->MACRO['COMMENT']) { echo $this->data->MACRO['COMMENT'] . "<p>\n"; } foreach ($this->data->STRUCT as $key => $value) { if ($value['LEVEL'] == 0) { echo "<strong>" . $value['TIMERANGE']['title'] . "</strong> " . $value['TIMERANGE']['f_start'] . " - " . $value['TIMERANGE']['f_end'] . "\n"; $count = 0; } echo "<div class=\"ui-widget-header ui-corner-top\">"; echo "<table border=0 width=100%><tr>\n"; echo "<td width=100% align=left>"; echo Kohana::lang('common.datasource', $value['ds_name']) . "</td>\n"; echo "<td align=right>"; echo pnp::zoom_icon_special($this->tpl, $value['TIMERANGE']['start'], $value['TIMERANGE']['end'], $value['SOURCE'], $value['VIEW'], $value['GRAPH_WIDTH'], $value['GRAPH_HEIGHT']) . "</td>\n"; echo "</tr></table>\n"; echo "</div>\n"; echo "<div class=\"p4 gh ui-widget-content ui-corner-bottom\">\n"; echo "<div style=\"position:relative;\">\n"; $path = pnp::addToUri(array('tpl' => $this->tpl, 'view' => NULL)); echo "<a href=\"" . $path . "\">\n"; echo "<div start=" . $value['TIMERANGE']['start'] . " end=" . $value['TIMERANGE']['end'] . " style=\"width:" . $value['GRAPH_WIDTH'] . "px; height:" . $value['GRAPH_HEIGHT'] . "px; position:absolute; top:33px;\" class=\"graph\" id=\"" . $this->url . "\"></div>\n"; $path = pnp::addToUri(array('tpl' => $this->tpl, 'view' => $value['VIEW'], 'source' => $value['SOURCE'], 'start' => $value['TIMERANGE']['start'], 'end' => $value['TIMERANGE']['end']), FALSE); echo "<img class=\"graph\" src=\"" . url::base(TRUE) . "image" . $path . "\">\n"; echo "</div>\n"; echo "</a></div><p>\n"; } echo "</div>\n"; ?> <!-- Graph Content End-->
echo Kohana::lang('common.service-box-header'); ?> </div> <?php $filter = $this->session->get('sfilter'); ?> <div class="p4 ui-widget-content"> <?php echo "<input type=\"text\" name=\"service-filter\" id=\"service-filter\" value=\"" . $filter . "\" class=\"textbox\" />"; ?> </div> <div class="p4 ui-widget-content ui-corner-bottom" id="services"> <?php foreach ($services as $service) { echo "<span id=\"service-" . $service['servicedesc'] . "\">\n"; $path = pnp::addToUri(array('host' => $host, 'srv' => $service['name'])); echo pnp::add_to_basket_icon($host, $service['name']); echo "<a href=\"" . $path . "\" class=\"multi" . $service['is_multi'] . " " . $service['state'] . "\" title=\"" . $service['servicedesc'] . "\">"; echo pnp::shorten($service['servicedesc']) . "</a><br>\n"; echo "</span>\n"; } ?> </div> </div> <p> <?php }
<?php $qsa = pnp::addToUri(array('start' => $this->start, 'end' => $this->end, 'view' => $this->view), False); if ($this->config->conf['use_calendar']) { echo "<a title=\"" . Kohana::lang('common.title-calendar-link') . "\" href=\"#\" id=\"button\"><img class=\"icon\" src=\"" . url::base() . "media/images/calendar.png\"></a>"; } if ($this->config->conf['use_fpdf'] == 1 && ($position == "graph" || $position == "special")) { echo "<a title=\"" . Kohana::lang('common.title-pdf-link') . "\" href=\"" . url::base(TRUE) . "pdf" . $qsa . "\"><img class=\"icon\" src=\"" . url::base() . "media/images/pdf.png\"></a>\n"; } if ($this->config->conf['use_fpdf'] == 1 && $position == "basket") { echo "<a title=\"" . Kohana::lang('common.title-pdf-link') . "\" href=\"" . url::base(TRUE) . "pdf/basket/" . $qsa . "\"><img class=\"icon\" src=\"" . url::base() . "media/images/pdf.png\"></a>\n"; } if ($this->config->conf['use_fpdf'] == 1 && $position == "page") { echo "<a title=\"" . Kohana::lang('common.title-pdf-link') . "\" href=\"" . url::base(TRUE) . "pdf/page/" . $this->page . $qsa . "\"><img class=\"icon\" src=\"" . url::base() . "media/images/pdf.png\"></a>\n"; } if ($this->config->conf['show_xml_icon'] == 1 && $position == "graph") { $qsa = pnp::addToUri(array(), False); echo "<a title=\"" . Kohana::lang('common.title-xml-link') . "\" href=\"" . url::base(TRUE) . "xml" . $qsa . "\"><img class=\"icon\" src=\"" . url::base() . "media/images/xml.png\"></a>\n"; } if ($this->data->getFirstPage() && $this->isAuthorizedFor('pages')) { echo "<a title=\"" . Kohana::lang('common.title-pages-link') . "\" href=\"" . url::base(TRUE) . "page\"><img class=\"icon\" src=\"" . url::base() . "media/images/pages.png\"></a>\n"; } echo "<a title=\"" . Kohana::lang('common.title-statistics-link') . "\" href=\"" . url::base(TRUE) . "graph?host=.pnp-internal&srv=runtime\"><img class=\"icon\" src=\"" . url::base() . "media/images/stats.png\"></a>\n"; if ($this->data->getFirstSpecialTemplate()) { echo "<a title=\"" . Kohana::lang('common.title-special-templates-link') . "\" href=\"" . url::base(TRUE) . "special\"><img class=\"icon\" src=\"" . url::base() . "media/images/special.png\"></a>\n"; } echo "<a title=\"" . Kohana::lang('common.title-docs-link') . "\" href=\"" . url::base(TRUE) . "docs\"><img class=\"icon\" src=\"" . url::base() . "media/images/docs.png\"></a>\n"; ?> </div> </div><p> <!-- Icon Box End -->
<?php echo "<div class=\"ui-widget\">\n"; echo "<div class=\"p2 ui-widget-header ui-corner-top\">\n"; echo Kohana::lang('common.timerange-box-header') . "\n"; echo "</div>\n"; echo "<div class=\"p4 ui-widget-content ui-corner-bottom\">\n"; $start = $this->session->get('start', ''); $end = $this->session->get('end', ''); $path = pnp::addToUri(array('start' => $start, 'end' => $end)); if ($start && $end) { echo "<a class=\"multi0\" href=\"" . $path . "\">" . Kohana::lang('common.timerange-selector-link') . "</a><br>\n"; } if ($start && !$end) { echo "<a class=\"multi0\" href=\"" . $path . "\">" . Kohana::lang('common.timerange-selector-link') . "</a><br>\n"; } foreach ($this->config->views as $key => $view) { $path = pnp::addToUri(array('view' => $key, 'start' => '', 'end' => '')); echo "<a class=\"multi0\" href=\"" . $path . "\">" . $view['title'] . "</a><br>\n"; } echo "</div>\n"; echo "</div><p>\n";