RSS Git Download  Clone
Raw Blame History
  [% META title = 'Resources » Dashboard View' -%]

<!-- BEGIN [% template.name %] -->
	[% addcss =	[ 'dashboard.css?v1.3' ] %]

    [% # INCLUDE dumper.tt dump = data %]
    [% # INCLUDE dumper.tt dump = data.incomplete_section_tests %]

    <script src="/js/highcharts.js"></script>
    <script src="/js/jquery.timeago.js"></script>

    <script type="text/javascript">
        jQuery(document).ready(function() {
            jQuery("abbr.timeago").timeago();
        });
    </script>

    <form action="[% c.query.self_url %]">
        <div align="right">Last updated:
            <abbr class="timeago" title="[% USE date; date.format %]">
		    <!--[if IE]>[% date.format %]<![endif]-->
			</abbr>
            <input type='submit' value='Refresh' />
        </div>
    </form>

    <h3 class="header">Request status:</h3>

	<div class="indent" id="nav-header">
	  <div>Unreported screened requests:</div>
	  <ul>
	    <li>&gt; [% c.cfg('settings').unreported_duration %] days old
		  [%
			width = data.unreported * 2;
			class = data.unreported ? 'badge badge-my-orange' : 'badge';
		  %]
		  <span class="[% class %]" style="width: [% width %]px;
			min-width: 25px; position: absolute; left: 240px">
			[% data.unreported || 0 %]</span>
		</li>
		<li>tests complete
		  [%
			width = data.tests_completed * 2;
			class = data.tests_completed ? 'badge badge-my-pink' : 'badge';
		  %]
		  <span class="[% class %]" style="width: [% width %]px;
			min-width: 25px; position: absolute; left: 240px">
			[% data.tests_completed || 0 %]</span>
		</li>
	  </ul>

	  [% width = 0; # ( data.unauthorised + data.incomplete ) * 2 # too wide %]
	  <div>Incomplete reported requests:
		<span class="badge" style="width: [% width %]px; min-width: 25px">
		  [% ( data.unauthorised || 0 ) + ( data.incomplete || 0 ) %]</span>
	  </div>
	  <ul>
	    <li>unauthorised
		  [%
			width = data.unauthorised * 2;
			class = data.unauthorised ? 'badge badge-info' : 'badge';
		  %]
		  <span class="[% class %]" style="width: [% width %]px; min-width: 25px;
			position: absolute; left: 240px">[% data.unauthorised || 0 %]</span>
		</li>
		<li>authorised &nbsp;&nbsp;&nbsp;
		  [%
			width = data.incomplete * 2;
			class = data.incomplete ? 'badge badge-my-purple' : 'badge';
		  %]
		  <span class="[% class %]" style="width: [% width %]px; min-width: 25px;
			position: absolute; left: 240px">[% data.incomplete || 0 %]</span>
		</li>
	  </ul>
	</div>

    <!-- Buttons -->
    <ul class="nav nav-pills">

	[% BLOCK urgent %]
        <i class="fa fa-taxi"></i> Urgent
        <span class="label label-[% data.urgent ? 'my-red' : 'inverse' %]">
			[% data.urgent || 0 %]</span>
	[% END; BLOCK unscreened %]
        <i class="fa fa-th-list"></i> Unscreened
        <span class="label label-[% data.unscreened ? 'my-green' : 'inverse' %]">
			[% data.unscreened || 0 %]</span>
	[% END; BLOCK unreported %]
        <i class="fa fa-plug"></i> Unreported
			&gt;[% c.cfg('settings').unreported_duration %]d
        <span class="label label-[% data.unreported ? 'my-orange' : 'inverse' %]">
			[% data.unreported || 0 %]</span>
	[% END; BLOCK tests_completed %]
	    <i class="fa fa-chain"></i> Tests complete
        <span class="label label-[% data.tests_completed ? 'my-pink' : 'inverse' %]">
			[% data.tests_completed || 0 %]</span>
	[% END; BLOCK unauthorised %]
        <i class="fa fa-tags"></i> Unauthorised
        <span class="label label-[% data.unauthorised ? 'info' : 'inverse' %]">
			[% data.unauthorised || 0 %]</span>
	[% END; BLOCK incomplete %]
	    <i class="fa fa-fax"></i> Incomplete
        <span class="label label-[% data.incomplete ? 'my-purple' : 'inverse' %]">
			[% data.incomplete || 0 %]</span>
	[% END %]

    <!-- Comment button with number of latest comments count -->
        <li class="indent">
		  [% IF data.urgent %]
            <a href="[% app_url %]/worklist/request_status?status_query=urgent">
				[% INCLUDE urgent %]
            </a>
		  [% ELSE %]<div>[% INCLUDE urgent %]</div>[% END %]
        </li>
        <li>
		  [% IF data.unscreened %]
            <a href="[% app_url %]/worklist/request_status?status_query=unscreened">
				[% INCLUDE unscreened %]
            </a>
		  [% ELSE %]<div>[% INCLUDE unscreened %]</div>[% END %]
        </li>
        <li>
		  [% IF data.unreported %]
            <a href="[% app_url %]/worklist/request_status?status_query=unreported">
				[% INCLUDE unreported %]
            </a>
		  [% ELSE %]<div>[% INCLUDE unreported %]</div>[% END %]
        </li>
        <li>
		  [% IF data.tests_completed %]
            <a href="[% app_url %]/worklist/request_status?status_query=tests_completed">
				[% INCLUDE tests_completed %]
            </a>
		  [% ELSE %]<div>[% INCLUDE tests_completed %]</div>[% END %]
        </li>
        <li>
		  [% IF data.unauthorised %]
            <a href="[% app_url %]/worklist/request_status?status_query=unauthorised">
				[% INCLUDE unauthorised %]
            </a>
		  [% ELSE %]<div>[% INCLUDE unauthorised %]</div>[% END %]
        </li>
        <li>
		  [% IF data.incomplete %]
            <a href="[% app_url %]/worklist/request_status?status_query=incomplete">
				[% INCLUDE incomplete %]
            </a>
		  [% ELSE %]<div>[% INCLUDE incomplete %]</div>[% END %]
        </li>
    </ul>

    <h3 class="header">Incomplete lab-tests:</h3>

	[% INCLUDE resources/dashboard/drilldown.tt %]

    <p class="title indent">All lab sections:
      [% div_name = 'highcharts'; INCLUDE site/snippets/toggleview.tt %]
    </p>

    <div id="[% div_name %]" class="indent itemhidden">
		[% INCLUDE resources/dashboard/highcharts.tt %]
	</div>
<!-- END [% template.name %] -->