
<div class="pageTitleWithTabs">
    <div class="modal-header no-border">
        <button type="button" class="close" data-dismiss="modal" ><i class="bi bi-x"></i> </button>
        <h2>Data for <?= htmlspecialchars($hostname) ?></h2>

        <p id="<?= htmlspecialchars($fetchData['id']) ?>"><?= htmlspecialchars($fetchData['id']) ?> <?= htmlspecialchars($fetchData['description'] ? "(" . $fetchData['description'] . ") " : ' ') ?>  <?= htmlspecialchars(($fetchData['units']) ? '[' . urldecode($fetchData['units']) . ']' : '') ?><br/>
        </p>
        <p>Last updated: <?= getDateStatus($fetchData['timestamp'], true) ?></p>

    </div>
</div>

 <div id="tabs-layout">
    <div id="graph-pulses-vital-sign" class="tabs tabWrapper" style="overflow-x:hidden;">
            <ul>
                <li><a href="<?php echo site_url(); ?>/graph/magnifiedView/obs/<?= htmlspecialchars($fetchData['id']) ?>/host/<?= htmlspecialchars($hostKey) ?>/units/<?= htmlspecialchars($fetchData['units']) ?>"><span>Past 4 hours</span></a></li>
                 <li><a href="<?php echo site_url(); ?>/graph/weekview/obs/<?= htmlspecialchars($fetchData['id']) ?>/host/<?php echo $hostKey; ?>/units/<?= htmlspecialchars($fetchData['units']) ?>"><span>Past Week</span></a></li>
                <li><a href="<?php echo site_url(); ?>/graph/yearview/obs/<?= htmlspecialchars($fetchData['id']) ?>/host/<?php echo $hostKey; ?>/units/<?= htmlspecialchars($fetchData['units']) ?>"><span>Year View</span></a></li>
	<?php /* <li><a href="<?php echo site_url(); ?>/graph/histogramView/obs/<?php echo $fetchData['id']; ?>/host/<?php echo $hostKey; ?>/units/<?php echo $fetchData['units']; ?>"><span>Statistical complete history</span></a></li> */ ?>
            </ul>
    </div>
</div>
<script type="text/javascript">

    // tabs
    $tabs = $( ".tabs" ).tabs({
        selected: null,
        cache: true,
        ajaxOptions: {
            error: function( xhr, status, index, anchor ) {
                $( anchor.hash ).html(
                "Couldn't load this tab." );
            }
        },
        spinner: 'Retrieving data...'
    });
</script>
