<commit_before><!DOCTYPE html>
<html xmlns:e="http://software.in2p3.fr/lavoisier/entries.xsd"
      xmlns:tpl="http://software.in2p3.fr/lavoisier/template.xsd"
      tpl:extends="/lavoisier/_default_?accept=html">
<meta charset="UTF-8" />
<title>ARGO AR REPORTS</title>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport' />

<body>
<!-- Right side column. Contains the navbar and content of the page -->
<div id="wrapper">

    <aside class="main-sidebar sidebar-offcanvas" >

        <section class="sidebar">

            <ul class="sidebar-menu">
                <li class="hidden" style="display: block;height:100px;"><a href="#"><span> </span></a></li>
                <li class="hidden"><a href="#"><span> </span></a></li>
                <li class="hidden"><a href="#"><span> </span></a></li>
                <li  tpl:foreach="e:entries/e:entry" style="font-size: lighter;background-color: #C7d2e1">
                    <a  href="/lavoisier/site_reports?ngi={{@key}}&amp;report={{/e:entries/@report}}">  <span >-- {{@key}} --</span> </a>
                </li>
            </ul>
        </section>
    </aside>

<div class="content-wrapper">
<!-- Content Header (Page header) -->



<!-- Main content -->
<section class="content" id="content">



<section class="content-header" id="content-header">
    <h1>
        <img src="/resource/img/ELIXIR_logo.png" title="Elixir logo"/>
        <small>Availabilities and Status Reports</small>


        <button type="button" class="pull-right btn btn-primary" data-toggle="modal" data-target="#myHelp">
            <div class="fa fa-info"></div>
        </button>



    </h1>



    <div class="modal fade" id="myHelp" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"></span></button>
                    <h3 class="modal-title" id="myModalLabel">Help  <i class="ion ion-clipboard"></i></h3>
                </div>
                <div class="modal-body">
                    <p>
                    <ul>
                        <li>Availabilities and reliabilities figures for the last 3 months</li>
                        <li>NGI Reports : Click on the NGI name to access the sites report </li>
                        <li>Click on the figures of a specific month to access daily results</li>
                        <li>You can also access to the reports into formats : csv, xml and charts</li>
                        <li>
                            <span class="label label-success" style="margin:4px">Av &lt; 80%</span>
                            <span class="label label-danger" style="margin:4px"> Av &gt; 80%</span>
                            <span class="label label-success" style="margin:10px">Re &lt; 85%</span>
                            <span class="label label-danger" style="margin:4px"> Re &gt; 85%</span>
                        </li>
                        <li>For the site reports you have two additional figures : the downtime and unknown status percentage</li>
                    <br/>
                    <li><img src="/resource/img/percentages.png" alt="legend"/></li>
                    </ul>
                    </p>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>

                </div>
            </div>
        </div>
    </div>

</section>




<div>
    <div class="box box-primary">




                <h3 class="box-header box-title">

                    ELIXIR > AVAILABILITIES/RELIABILITIES > LAST 3 MONTHS
                </h3>


        <div class="box-body table-responsive">

                <a href="/lavoisier/render_chart_n?view={{/e:entries/@view}}&amp;report={{/e:entries/@report}}&amp;type=availability&amp;ngi={{@key}}&amp;accept=html"
                   title="Chart">
                    <span style="margin:15px" class="btn btn-primary"><i
                            class="fa fa-bar-chart-o"> </i> AVAILABILITY</span>
                </a>
                <a href="/lavoisier/render_chart_n?view={{/e:entries/@view}}&amp;report={{/e:entries/@report}}&amp;type=reliability&amp;ngi={{@key}}&amp;accept=html"
                   title="Chart">
                    <span style="margin:15px" class="btn btn-primary"><i
                            class="fa fa-bar-chart-o"> </i>  RELIABILITY</span>
                </a>

            <a href="?accept=csv" target="_blank" title="CSV report"><span style="margin:10px;" class="btn btn-primary">CSV</span> </a>
            <a href="?accept=xml" target="_blank" title="XML report"><span style="margin:10px" class="btn btn-primary">XML</span></a>
            <br/>
            <table class="table table-bordered table-hover table-striped">
                <thead>
                <tr>
                    <th class="col-md-4">Site</th>

                    <th>
                        {{/e:entries/@month1}}
                    </th>
                    <th>
                        {{/e:entries/@month2}}
                    </th>
                    <th>
                        {{/e:entries/@month3}}
                    </th>

                </tr>
                </thead>


                <tbody>
                <tr tpl:foreach="e:entries/e:entry/Site">
                    <td class="col-md-4">{{@site}}</td>

                    <td tpl:if="Availability[@timestamp=ancestor::e:entries/@month1]">
                        <a href="/lavoisier/{{/e:entries/@related_view}}?granularity=DAILY&amp;report={{/e:entries/@report}}&amp;start_date={{/e:entries/@month1}}-01&amp;end_date={{/e:entries/@month2}}-01&amp;site={{@site}}">
                            <span class="avCheck label"
                                  title="{{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@availability,'#.00')}}">{{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@availability,'#.00')}}</span>
                            <span class="reCheck label" style="margin-left:10px"
                                  title="{{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@reliability,'#.00')}}">{{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@reliability,'#.00')}}</span>
                        </a>
                        <span  class="pull-right" style="font-size: small;" >
                            <span  tpl:if="Availability[@timestamp=ancestor::e:entries/@month1]/@downtime&gt;10" class="minilabel label label-warning" title="Downtime : {{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@downtime*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@downtime*100,'#.00')}}
                            </span>
                              <span  tpl:else="" class="minilabel label label-success" title="Downtime : {{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@downtime*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@downtime*100,'#.00')}}
                            </span>
                           <br/>
                             <span  tpl:if="Availability[@timestamp=ancestor::e:entries/@month1]/@unknown&gt;10" class="minilabel label label-warning" title="unknown : {{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@unknown*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@unknown*100,'#.00')}}
                            </span>
                              <span  tpl:else="" class="minilabel label label-success" title="unknown : {{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@unknown*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@unknown*100,'#.00')}}
                            </span>
                        </span>

                    </td>
                    <td tpl:else="">
                        <span class="avCheck label label-default">N.A</span>
                        <span style="margin-left:10px" class="reCheck label label-default">N.A</span>

                    </td>

                    <td tpl:if="Availability[@timestamp=ancestor::e:entries/@month2]">
                        <a href="/lavoisier/{{/e:entries/@related_view}}?granularity=DAILY&amp;report={{/e:entries/@report}}&amp;start_date={{/e:entries/@month2}}-01&amp;end_date={{/e:entries/@month3}}-01&amp;site={{@site}}">
                            <span class="avCheck label"
                                  title="{{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@availability,'#.00')}}">{{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@availability,'#.00')}}</span>
                            <span class="reCheck label" style="margin-left:10px"
                                  title="{{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@reliability,'#.00')}}">{{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@reliability,'#.00')}}</span>
                        </a>

                         <span  class="pull-right" style="font-size: small;" >
                            <span  tpl:if="Availability[@timestamp=ancestor::e:entries/@month2]/@downtime&gt;10" class="minilabel label label-warning" title="Downtime : {{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@downtime*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@downtime*100,'#.00')}}
                            </span>
                              <span  tpl:else="" class="minilabel label label-success" title="Downtime : {{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@downtime*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@downtime*100,'#.00')}}
                            </span>
                           <br/>
                             <span  tpl:if="Availability[@timestamp=ancestor::e:entries/@month2]/@unknown&gt;10" class="minilabel label label-warning" title="unknown : {{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@unknown*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@unknown*100,'#.00')}}
                            </span>
                              <span  tpl:else="" class="minilabel label label-success" title="unknown : {{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@unknown*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@unknown*100,'#.00')}}
                            </span>
                        </span>
                    </td>
                    <td tpl:else="">
                        <span class="avCheck label label-default">N.A</span>
                        <span style="margin-left:10px" class="reCheck label label-default">N.A</span>

                    </td>

                    <td tpl:if="Availability[@timestamp=ancestor::e:entries/@month3]">
                        <a href="/lavoisier/{{/e:entries/@related_view}}?granularity=DAILY&amp;report={{/e:entries/@report}}&amp;start_date={{/e:entries/@month3}}-01&amp;end_date={{/e:entries/@month4}}-01&amp;site={{@site}}">
                            <span class="avCheck label"
                                  title="{{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@availability,'#.00')}}">{{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@availability,'#.00')}}</span>
                            <span class="reCheck label" style="margin-left:10px"
                                  title="{{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@reliability,'#.00')}}">{{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@reliability,'#.00')}}</span>
                        </a>
                            <span  class="pull-right" style="font-size: small;" >
                            <span  tpl:if="Availability[@timestamp=ancestor::e:entries/@month3]/@downtime&gt;10" class="minilabel label label-warning" title="Downtime : {{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@downtime*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@downtime*100,'#.00')}}
                            </span>
                              <span  tpl:else="" class="minilabel label label-success" title="Downtime : {{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@downtime*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@downtime*100,'#.00')}}
                            </span>
                           <br/>
                             <span  tpl:if="Availability[@timestamp=ancestor::e:entries/@month3]/@unknown&gt;10" class="minilabel label label-warning" title="unknown : {{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@unknown*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@unknown*100,'#.00')}}
                            </span>
                              <span  tpl:else="" class="minilabel label label-success" title="unknown : {{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@unknown*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@unknown*100,'#.00')}}
                            </span>
                        </span>
                           
                    </td>
                    <td tpl:else="">
                        <span class="avCheck label label-default">N.A</span>
                        <span style="margin-left:10px" class="reCheck label label-default">N.A</span>

                    </td>


                </tr>
                </tbody>


            </table>
        </div>


<br/>


        <h3 class="box-header box-title">
            ELIXIR > STATUS > LAST 4 DAYS
        </h3>


    <br/>

        <div class="box-body">

            <div style="display: none"   id="local_groups" >
                <div  tpl:foreach="/e:entries/status/group/status" > {{ancestor::group/@name}} ,{{@value}}_{{position()}},{{@timestamp}},{{@end_time}},{{@color}}</div>
            </div>



            <div  id="local_links">
                <div style="display: none" tpl:foreach="/e:entries/status/group/status" >/lavoisier/{{ancestor::status/@view}}?site={{ancestor::group/@name}}&amp;start_date={{ancestor::e:entries/status/@start_time}}&amp;end_date={{ancestor::e:entries/status/@end_time}}&amp;report={{ancestor::e:entries/status/@report}}&amp;accept=html</div>
            </div>


            <div id="div_timeline" style="width:100%;height:1000px"></div>

    </div>


</div>
</div></section>
<!-- /.content -->

</div>

<script src="/resource/js/jquery.dataTables.js"></script>
<script src="/resource/js/dataTables.bootstrap.js"></script>
<link href="/resource/css/dataTables.bootstrap.css" rel="stylesheet" type="text/css"/>
<link href="/resource/css/jquery.dataTables.css" rel="stylesheet" type="text/css"/>

    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script src="/resource/js/jsapitimeline.js"></script>






    <script>
        <!--



        $(document).ready(function() {

            $(function () {
                // set the first colors
                $('td').find('span.avCheck.label').each(function () {
                    $(this).addClass(getColorClass($(this).attr('title'), 80));
                });

                $('td').find('span.reCheck.label').each(function () {
                    $(this).addClass(getColorClass($(this).attr('title'), 85));
                });





                // set the first colors
                $('td').find('span.badge').each(function () {
                    $(this).addClass(getColorClass2($(this).attr('title')));
                });


                $('#dataTable').dataTable({
                    "paging":   false
                });


            });

            google.load('visualization', '1', {'packages':['timeline'], 'language': 'en'});

            var newgroup = [];
            var colorsgroup = [];
            var links = [];


            var local_groups = document.getElementById('local_groups').getElementsByTagName('div');
            var local_links = document.getElementById('local_links').getElementsByTagName('div');


            for (j = 0; j < local_groups.length; j++) {



                var tempArray = local_groups[j].textContent.split(",");
                var color = tempArray.pop();

                tempArray[4]= '<div class="panel panel-default">' +
                        '<div class="panel-heading"><div class="panel-title"><h3>'+ tempArray[0] +'</h3></div></div>'
                        + '<div class="panel-body">' +
                        '<label> Status: &nbsp;<span class="badge badge-'+tempArray[1].split("_")[0] +'">'+tempArray[1].split("_")[0] + '</span></label><hr/>' +
                        '<label>Start Time : &nbsp;</label>' + tempArray[2] + '<hr/>' +
                        '<label>End Time : &nbsp;</label>' + tempArray[3] + '</div><div class="panel-footer"><em>Click on the bar to access the next granularity level</em></div></div>';



                tempArray[2] = new Date(tempArray[2].substr(0,19));
                tempArray[3] = new Date(tempArray[3].substr(0,19));


                if (tempArray[2] < tempArray[3]) {
                    newgroup.push(tempArray);
                    colorsgroup.push(color);
                }
            }


            for (m = 0; m < local_links.length; m++) {
                links.push(local_links[m].textContent);
            }

            google.setOnLoadCallback(drawChart);

            function drawChart() {
                var container = document.getElementById('div_timeline');
                var chart = new google.visualization.Timeline(container);

                google.visualization.events.addListener(chart, 'select', function () {
                    var selectedItem = chart.getSelection()[0].row;
                    window.location = links[selectedItem];

                });





                var dataTable = new google.visualization.DataTable();
                dataTable.addColumn({type: 'string', id: 'Service Flavour'});
                dataTable.addColumn({type: 'string', id: 'Status'});
                dataTable.addColumn({type: 'date', id: 'Start'});
                dataTable.addColumn({type: 'date', id: 'End'});
                dataTable.addColumn({'type': 'string', 'role': 'tooltip', 'p': {'html': true}});

                dataTable.addRows(newgroup);

                var options = {
                    title: 'Status report',
                    backgroundColor: '#fff',
                    colors : colorsgroup,
                    timeline: {
                        groupByRowLabel: true,
                        showBarLabels : false

                    }

                };


                function myHandler(e){
                    if(e.row != null){
                        $(".google-visualization-tooltip").html(dataTable.getValue(e.row,4)).css({width:"auto",height:"auto"});
                    }
                }

                google.visualization.events.addListener(chart, 'onmouseover', myHandler);

                chart.draw(dataTable, options);
            }





        })




        -->
    </script>

<style>
    span.minilabel
    {
        padding:0 2px 0 2px; ;

        font-size: smaller;
        margin:10px;
       

    }


    .badge-OK {
        background-color: green;

    }
    .badge-UNKNOWN {
        background-color: #d3d3d3;

    }

    .badge-MISSING {
        background-color: #53424a;

    }

    .badge-WARNING {
        background-color: orange

    }

    .badge-CRITICAL{
        background-color:red;

    }






</style>


</div>
</body>
</html><commit_msg>saml medatada<commit_after><!DOCTYPE html>
<html xmlns:e="http://software.in2p3.fr/lavoisier/entries.xsd"
      xmlns:tpl="http://software.in2p3.fr/lavoisier/template.xsd"
      tpl:extends="/lavoisier/_default_?accept=html">
<meta charset="UTF-8" />
<title>ARGO AR REPORTS</title>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport' />

<body>
<!-- Right side column. Contains the navbar and content of the page -->
<div id="wrapper">



<div class="content-wrapper">
<!-- Content Header (Page header) -->



<!-- Main content -->
<section class="content" id="content">



<section class="content-header" id="content-header">
    <h1>
        <img src="/resource/img/ELIXIR_logo.png" title="Elixir logo"/>
        <small>Availabilities and Status Reports</small>


        <button type="button" class="pull-right btn btn-primary" data-toggle="modal" data-target="#myHelp">
            <div class="fa fa-info"></div>
        </button>



    </h1>



    <div class="modal fade" id="myHelp" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"></span></button>
                    <h3 class="modal-title" id="myModalLabel">Help  <i class="ion ion-clipboard"></i></h3>
                </div>
                <div class="modal-body">
                    <p>
                    <ul>
                        <li>Availabilities and reliabilities figures for the last 3 months</li>
                        <li>NGI Reports : Click on the NGI name to access the sites report </li>
                        <li>Click on the figures of a specific month to access daily results</li>
                        <li>You can also access to the reports into formats : csv, xml and charts</li>
                        <li>
                            <span class="label label-success" style="margin:4px">Av &lt; 80%</span>
                            <span class="label label-danger" style="margin:4px"> Av &gt; 80%</span>
                            <span class="label label-success" style="margin:10px">Re &lt; 85%</span>
                            <span class="label label-danger" style="margin:4px"> Re &gt; 85%</span>
                        </li>
                        <li>For the site reports you have two additional figures : the downtime and unknown status percentage</li>
                    <br/>
                    <li><img src="/resource/img/percentages.png" alt="legend"/></li>
                    </ul>
                    </p>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>

                </div>
            </div>
        </div>
    </div>

</section>




<div>
    <div class="box box-primary">




                <h3 class="box-header box-title">

                    ELIXIR > AVAILABILITIES/RELIABILITIES > LAST 3 MONTHS
                </h3>


        <div class="box-body table-responsive">



            <a href="?accept=csv" target="_blank" title="CSV report"><span style="margin:10px;" class="btn btn-primary">CSV</span> </a>
            <a href="?accept=xml" target="_blank" title="XML report"><span style="margin:10px" class="btn btn-primary">XML</span></a>
            <br/>
            <table class="table table-bordered table-hover table-striped">
                <thead>
                <tr>
                    <th class="col-md-4">Site</th>

                    <th>
                        {{/e:entries/@month1}}
                    </th>
                    <th>
                        {{/e:entries/@month2}}
                    </th>
                    <th>
                        {{/e:entries/@month3}}
                    </th>

                </tr>
                </thead>


                <tbody>
                <tr tpl:foreach="e:entries/e:entry/Site">
                    <td class="col-md-4">{{@site}}</td>

                    <td tpl:if="Availability[@timestamp=ancestor::e:entries/@month1]">
                        <a href="/lavoisier/{{/e:entries/@related_view}}?granularity=DAILY&amp;report={{/e:entries/@report}}&amp;start_date={{/e:entries/@month1}}-01&amp;end_date={{/e:entries/@month2}}-01&amp;site={{@site}}">
                            <span class="avCheck label"
                                  title="{{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@availability,'#.00')}}">{{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@availability,'#.00')}}</span>
                            <span class="reCheck label" style="margin-left:10px"
                                  title="{{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@reliability,'#.00')}}">{{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@reliability,'#.00')}}</span>
                        </a>
                        <span  class="pull-right" style="font-size: small;" >
                            <span  tpl:if="Availability[@timestamp=ancestor::e:entries/@month1]/@downtime&gt;10" class="minilabel label label-warning" title="Downtime : {{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@downtime*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@downtime*100,'#.00')}}
                            </span>
                              <span  tpl:else="" class="minilabel label label-success" title="Downtime : {{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@downtime*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@downtime*100,'#.00')}}
                            </span>
                           <br/>
                             <span  tpl:if="Availability[@timestamp=ancestor::e:entries/@month1]/@unknown&gt;10" class="minilabel label label-warning" title="unknown : {{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@unknown*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@unknown*100,'#.00')}}
                            </span>
                              <span  tpl:else="" class="minilabel label label-success" title="unknown : {{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@unknown*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month1]/@unknown*100,'#.00')}}
                            </span>
                        </span>

                    </td>
                    <td tpl:else="">
                        <span class="avCheck label label-default">N.A</span>
                        <span style="margin-left:10px" class="reCheck label label-default">N.A</span>

                    </td>

                    <td tpl:if="Availability[@timestamp=ancestor::e:entries/@month2]">
                        <a href="/lavoisier/{{/e:entries/@related_view}}?granularity=DAILY&amp;report={{/e:entries/@report}}&amp;start_date={{/e:entries/@month2}}-01&amp;end_date={{/e:entries/@month3}}-01&amp;site={{@site}}">
                            <span class="avCheck label"
                                  title="{{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@availability,'#.00')}}">{{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@availability,'#.00')}}</span>
                            <span class="reCheck label" style="margin-left:10px"
                                  title="{{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@reliability,'#.00')}}">{{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@reliability,'#.00')}}</span>
                        </a>

                         <span  class="pull-right" style="font-size: small;" >
                            <span  tpl:if="Availability[@timestamp=ancestor::e:entries/@month2]/@downtime&gt;10" class="minilabel label label-warning" title="Downtime : {{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@downtime*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@downtime*100,'#.00')}}
                            </span>
                              <span  tpl:else="" class="minilabel label label-success" title="Downtime : {{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@downtime*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@downtime*100,'#.00')}}
                            </span>
                           <br/>
                             <span  tpl:if="Availability[@timestamp=ancestor::e:entries/@month2]/@unknown&gt;10" class="minilabel label label-warning" title="unknown : {{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@unknown*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@unknown*100,'#.00')}}
                            </span>
                              <span  tpl:else="" class="minilabel label label-success" title="unknown : {{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@unknown*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month2]/@unknown*100,'#.00')}}
                            </span>
                        </span>
                    </td>
                    <td tpl:else="">
                        <span class="avCheck label label-default">N.A</span>
                        <span style="margin-left:10px" class="reCheck label label-default">N.A</span>

                    </td>

                    <td tpl:if="Availability[@timestamp=ancestor::e:entries/@month3]">
                        <a href="/lavoisier/{{/e:entries/@related_view}}?granularity=DAILY&amp;report={{/e:entries/@report}}&amp;start_date={{/e:entries/@month3}}-01&amp;end_date={{/e:entries/@month4}}-01&amp;site={{@site}}">
                            <span class="avCheck label"
                                  title="{{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@availability,'#.00')}}">{{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@availability,'#.00')}}</span>
                            <span class="reCheck label" style="margin-left:10px"
                                  title="{{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@reliability,'#.00')}}">{{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@reliability,'#.00')}}</span>
                        </a>
                            <span  class="pull-right" style="font-size: small;" >
                            <span  tpl:if="Availability[@timestamp=ancestor::e:entries/@month3]/@downtime&gt;10" class="minilabel label label-warning" title="Downtime : {{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@downtime*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@downtime*100,'#.00')}}
                            </span>
                              <span  tpl:else="" class="minilabel label label-success" title="Downtime : {{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@downtime*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@downtime*100,'#.00')}}
                            </span>
                           <br/>
                             <span  tpl:if="Availability[@timestamp=ancestor::e:entries/@month3]/@unknown&gt;10" class="minilabel label label-warning" title="unknown : {{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@unknown*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@unknown*100,'#.00')}}
                            </span>
                              <span  tpl:else="" class="minilabel label label-success" title="unknown : {{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@unknown*100,'#.00')}} % ">
                                {{format-number(Availability[@timestamp=ancestor::e:entries/@month3]/@unknown*100,'#.00')}}
                            </span>
                        </span>
                           
                    </td>
                    <td tpl:else="">
                        <span class="avCheck label label-default">N.A</span>
                        <span style="margin-left:10px" class="reCheck label label-default">N.A</span>

                    </td>


                </tr>
                </tbody>


            </table>
        </div>


<br/>


        <h3 class="box-header box-title">
            ELIXIR > STATUS > LAST 4 DAYS
        </h3>


    <br/>

        <div class="box-body">

            <div style="display: none"   id="local_groups" >
                <div  tpl:foreach="/e:entries/status/group/status" > {{ancestor::group/@name}} ,{{@value}}_{{position()}},{{@timestamp}},{{@end_time}},{{@color}}</div>
            </div>



            <div  id="local_links">
                <div style="display: none" tpl:foreach="/e:entries/status/group/status" >/lavoisier/{{ancestor::status/@view}}?site={{ancestor::group/@name}}&amp;start_date={{ancestor::e:entries/status/@start_time}}&amp;end_date={{ancestor::e:entries/status/@end_time}}&amp;report={{ancestor::e:entries/status/@report}}&amp;accept=html</div>
            </div>


            <div id="div_timeline" style="width:100%;height:1000px"></div>

    </div>


</div>
</div></section>
<!-- /.content -->

</div>

<script src="/resource/js/jquery.dataTables.js"></script>
<script src="/resource/js/dataTables.bootstrap.js"></script>
<link href="/resource/css/dataTables.bootstrap.css" rel="stylesheet" type="text/css"/>
<link href="/resource/css/jquery.dataTables.css" rel="stylesheet" type="text/css"/>

    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script src="/resource/js/jsapitimeline.js"></script>






    <script>
        <!--



        $(document).ready(function() {

            $(function () {
                // set the first colors
                $('td').find('span.avCheck.label').each(function () {
                    $(this).addClass(getColorClass($(this).attr('title'), 80));
                });

                $('td').find('span.reCheck.label').each(function () {
                    $(this).addClass(getColorClass($(this).attr('title'), 85));
                });





                // set the first colors
                $('td').find('span.badge').each(function () {
                    $(this).addClass(getColorClass2($(this).attr('title')));
                });


                $('#dataTable').dataTable({
                    "paging":   false
                });


            });

            google.load('visualization', '1', {'packages':['timeline'], 'language': 'en'});

            var newgroup = [];
            var colorsgroup = [];
            var links = [];


            var local_groups = document.getElementById('local_groups').getElementsByTagName('div');
            var local_links = document.getElementById('local_links').getElementsByTagName('div');


            for (j = 0; j < local_groups.length; j++) {



                var tempArray = local_groups[j].textContent.split(",");
                var color = tempArray.pop();

                tempArray[4]= '<div class="panel panel-default">' +
                        '<div class="panel-heading"><div class="panel-title"><h3>'+ tempArray[0] +'</h3></div></div>'
                        + '<div class="panel-body">' +
                        '<label> Status: &nbsp;<span class="badge badge-'+tempArray[1].split("_")[0] +'">'+tempArray[1].split("_")[0] + '</span></label><hr/>' +
                        '<label>Start Time : &nbsp;</label>' + tempArray[2] + '<hr/>' +
                        '<label>End Time : &nbsp;</label>' + tempArray[3] + '</div><div class="panel-footer"><em>Click on the bar to access the next granularity level</em></div></div>';



                tempArray[2] = new Date(tempArray[2].substr(0,19));
                tempArray[3] = new Date(tempArray[3].substr(0,19));


                if (tempArray[2] < tempArray[3]) {
                    newgroup.push(tempArray);
                    colorsgroup.push(color);
                }
            }


            for (m = 0; m < local_links.length; m++) {
                links.push(local_links[m].textContent);
            }

            google.setOnLoadCallback(drawChart);

            function drawChart() {
                var container = document.getElementById('div_timeline');
                var chart = new google.visualization.Timeline(container);

                google.visualization.events.addListener(chart, 'select', function () {
                    var selectedItem = chart.getSelection()[0].row;
                    window.location = links[selectedItem];

                });





                var dataTable = new google.visualization.DataTable();
                dataTable.addColumn({type: 'string', id: 'Service Flavour'});
                dataTable.addColumn({type: 'string', id: 'Status'});
                dataTable.addColumn({type: 'date', id: 'Start'});
                dataTable.addColumn({type: 'date', id: 'End'});
                dataTable.addColumn({'type': 'string', 'role': 'tooltip', 'p': {'html': true}});

                dataTable.addRows(newgroup);

                var options = {
                    title: 'Status report',
                    backgroundColor: '#fff',
                    colors : colorsgroup,
                    timeline: {
                        groupByRowLabel: true,
                        showBarLabels : false

                    }

                };


                function myHandler(e){
                    if(e.row != null){
                        $(".google-visualization-tooltip").html(dataTable.getValue(e.row,4)).css({width:"auto",height:"auto"});
                    }
                }

                google.visualization.events.addListener(chart, 'onmouseover', myHandler);

                chart.draw(dataTable, options);
            }





        })




        -->
    </script>

<style>
    span.minilabel
    {
        padding:0 2px 0 2px; ;

        font-size: smaller;
        margin:10px;
       

    }


    .badge-OK {
        background-color: green;

    }
    .badge-UNKNOWN {
        background-color: #d3d3d3;

    }

    .badge-MISSING {
        background-color: #53424a;

    }

    .badge-WARNING {
        background-color: orange

    }

    .badge-CRITICAL{
        background-color:red;

    }






</style>


</div>
</body>
</html>
{'fraction_non_alphanumeric': 0.17421961256649604, 'fraction_numerical': 0.01656127672387835, 'mean_word_length': 1.918137219008567, 'pattern_counts': {'":': 2, '<': 545, '<?xml version=': 0, '>': 547, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3193314', 'n_tokens_mistral': 12276, 'n_tokens_neox': 10908, 'n_words': 1534}