<commit_before><?if(!uwa()) {?>
<style>
.time-tooltip
{
    position: absolute;
    padding-bottom: 8px;
    background: transparent url(<?=fullbase();?>/images/tooltip_arrow.gif) no-repeat 0px 20px;
}
.graph
{
    cursor: pointer;
}
div.resource
{
    background-color: white;
    border: none;
}
.time-tooltip-content
{
    background-color: #ccc;
    padding: 5px;
}
.mark
{
    position: absolute;
    height: 16px;
    width: 16px;
    background: transparent url(<?=fullbase();?>/images/downarrow.png) no-repeat 0px 0px;
}
</style>
<?}?>

<script language='javascript' src='<?=base()?>/lib/jquery-1.3.1/plugins/jquery.dimensions.min.js'></script>
<script language='javascript' src='<?=base()?>/lib/jquery-1.3.1/plugins/jquery.lazyload.mini.js'></script>

<script type="text/javascript">
function convertXtoUnixTime(graph, x)
{
    //convert posititon to unixtimestamp
    var start_time = <?=$this->start_time?>;
    var end_time = <?=$this->end_time?>;
    var time_width = end_time - start_time;
    var width = $(graph).width();
    var time = (time_width / width) * x + start_time;
    return parseInt(time);
}
function convertUnixTimeToX(graph, time)
{
    var start_time = <?=$this->start_time?>;
    var end_time = <?=$this->end_time?>;
    var time_width = end_time - start_time;
    var width = $(graph).width();
    var x = (time - start_time)*(width / time_width);
    return x;
}


function mark(rid, sid,time) {
    var graph = $("#resource_"+rid).find("img[sid="+sid+"]");
    var pos = graph.position();
    var x = pos.left + convertUnixTimeToX(graph, time)-8;
    var y = pos.top-16;

    var mark = $("#mark");
    mark.css("left", x);
    mark.css("top", y);
    mark.show();
}

$(document).ready(function() {
    //load currently selected history detail
    currentAnchor = document.location.hash;
    if(currentAnchor)
    {
        var anchor = unescape(currentAnchor.substring(1));
        var splits = anchor.split('&');

        //store current mark info
        rid = splits[0].split('=')[1];
        sid = splits[1].split('=')[1];
        time = splits[2].split('=')[1];

        //load detail content
        $("#history_detail_"+rid+"_"+sid).html("<img src='<?=fullbase()?>/images/loading_animation_small.gif'/> Loading...").load("<?=fullbase()."/".pagename()?>/"+anchor, 
            function() {
                mark(rid,sid,time);
                window.scroll(0, $(this).parent().position().top);
            }
        );
    }

    $(".graph").click(function(event) {
        rid = $(this).attr("rid");
        sid = $(this).attr("sid");
        var imgpos = $(this).position();
        var x = event.pageX - imgpos.left;
        time = convertXtoUnixTime(this, x);

        //update anchor
        var anchor = "detail?resource_id="+rid+"&service_id="+sid+"&time="+time;
        document.location = "#"+anchor;
    
        //hide all previously opened detail (we have only one mark..)
        $(".history_detail").hide();

        //load detail content
        mark(rid, sid, time);
        $("#history_detail_"+rid+"_"+sid).html("<img src='<?=fullbase()?>/images/loading_animation_small.gif'/> Loading...").load("<?=fullbase()."/".pagename()?>/"+anchor, 
            function() {
                $(this).slideDown();
            }
        );
    });

    $(".graph").mousemove(function(event) {
        var imgpos = $(this).position();
        var x = event.pageX - imgpos.left;
        var y = event.pageY - imgpos.top;

        var tool = $("#time-tooltip");
        tool.css("left", imgpos.left + x);
        tool.css("top", imgpos.top - 28 );

        //convert timestamp to human readable time
        var d = new Date(convertXtoUnixTime(this, x)* 1000);
        $(tool).children("span").html(d.toGMTString());
        tool.show();
    });
    $(".graph").mouseout(function(event) {
        var tool = $("#time-tooltip");
        tool.hide();
    });
    //$(window).resize(mark);

    $("img").lazyload({placeholder:"<?=fullbase()?>/images/graph_holder.gif", effect: "fadeIn"});
});
</script>

<div id="mark" class="hidden mark">&nbsp;</div>
<div id="time-tooltip" class="hidden time-tooltip">
<span class="time-tooltip-content">to be loaded..</span>
</div>
<?
echo "Between ".date(config()->date_format, $this->start_time);<commit_msg>fixed lazyload issue on rgstatushistory page<commit_after><?if(!uwa()) {?>
<style>
.time-tooltip
{
    position: absolute;
    padding-bottom: 8px;
    background: transparent url(<?=fullbase();?>/images/tooltip_arrow.gif) no-repeat 0px 20px;
}
.graph
{
    cursor: pointer;
}
div.resource
{
    background-color: white;
    border: none;
}
.time-tooltip-content
{
    background-color: #ccc;
    padding: 5px;
}
.mark
{
    position: absolute;
    height: 16px;
    width: 16px;
    background: transparent url(<?=fullbase();?>/images/downarrow.png) no-repeat 0px 0px;
}
</style>
<?}?>

<script language='javascript' src='<?=base()?>/lib/jquery-1.3.1/plugins/jquery.dimensions.min.js'></script>
<script language='javascript' src='<?=base()?>/lib/jquery-1.3.1/plugins/jquery.lazyload.mini.js'></script>

<script type="text/javascript">
function convertXtoUnixTime(graph, x)
{
    //convert posititon to unixtimestamp
    var start_time = <?=$this->start_time?>;
    var end_time = <?=$this->end_time?>;
    var time_width = end_time - start_time;
    var width = $(graph).width();
    var time = (time_width / width) * x + start_time;
    return parseInt(time);
}
function convertUnixTimeToX(graph, time)
{
    var start_time = <?=$this->start_time?>;
    var end_time = <?=$this->end_time?>;
    var time_width = end_time - start_time;
    var width = $(graph).width();
    var x = (time - start_time)*(width / time_width);
    return x;
}


function mark(rid, sid,time) {
    var graph = $("#resource_"+rid).find("img[sid="+sid+"]");
    var pos = graph.position();
    var x = pos.left + convertUnixTimeToX(graph, time)-8;
    var y = pos.top-16;

    var mark = $("#mark");
    mark.css("left", x);
    mark.css("top", y);
    mark.show();
}

$(document).ready(function() {
    //load currently selected history detail
    currentAnchor = document.location.hash;
    if(currentAnchor)
    {
        var anchor = unescape(currentAnchor.substring(1));
        var splits = anchor.split('&');

        //store current mark info
        rid = splits[0].split('=')[1];
        sid = splits[1].split('=')[1];
        time = splits[2].split('=')[1];

        //load detail content
        $("#history_detail_"+rid+"_"+sid).html("<img src='<?=fullbase()?>/images/loading_animation_small.gif'/> Loading...").load("<?=fullbase()."/".pagename()?>/"+anchor, 
            function() {
                mark(rid,sid,time);
                window.scroll(0, $(this).parent().position().top);
            }
        );
    }

    $(".graph").click(function(event) {
        rid = $(this).attr("rid");
        sid = $(this).attr("sid");
        var imgpos = $(this).position();
        var x = event.pageX - imgpos.left;
        time = convertXtoUnixTime(this, x);

        //update anchor
        var anchor = "detail?resource_id="+rid+"&service_id="+sid+"&time="+time;
        document.location = "#"+anchor;
    
        //hide all previously opened detail (we have only one mark..)
        $(".history_detail").hide();

        //load detail content
        mark(rid, sid, time);
        $("#history_detail_"+rid+"_"+sid).html("<img src='<?=fullbase()?>/images/loading_animation_small.gif'/> Loading...").load("<?=fullbase()."/".pagename()?>/"+anchor, 
            function() {
                $(this).slideDown();
            }
        );
    });

    $(".graph").mousemove(function(event) {
        var imgpos = $(this).position();
        var x = event.pageX - imgpos.left;
        var y = event.pageY - imgpos.top;

        var tool = $("#time-tooltip");
        tool.css("left", imgpos.left + x);
        tool.css("top", imgpos.top - 28 );

        //convert timestamp to human readable time
        var d = new Date(convertXtoUnixTime(this, x)* 1000);
        $(tool).children("span").html(d.toGMTString());
        tool.show();
    });
    $(".graph").mouseout(function(event) {
        var tool = $("#time-tooltip");
        tool.hide();
    });
    //$(window).resize(mark);

    $("img.graph").lazyload({placeholder:"<?=fullbase()?>/images/graph_holder.gif", effect: "fadeIn"});
});
</script>

<div id="mark" class="hidden mark">&nbsp;</div>
<div id="time-tooltip" class="hidden time-tooltip">
<span class="time-tooltip-content">to be loaded..</span>
</div>
<?
echo "Between ".date(config()->date_format, $this->start_time);
{'fraction_non_alphanumeric': 0.20041826420355524, 'fraction_numerical': 0.00790054606715464, 'mean_word_length': 2.886230248306998, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 77, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4247239', 'n_tokens_mistral': 2876, 'n_tokens_neox': 2795, 'n_words': 534}