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

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

    [% # 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">
		[% class = data.unreported ? 'badge badge-my-orange' : 'badge' %]
		<p>Unreported screened requests:</p>
		<p class="indent">more than [% c.cfg('settings').unreported_duration %]
			days old</span>:
		  <span class="[% class %]">[% data.unreported || 0 %]</span>
		</p>
		<p class="indent">with tests complete:
			[% class = data.tests_completed ? 'badge badge-my-orange' : 'badge' %]
			<span class="[% class %]">[% data.tests_completed || 0 %]</span>
		</p>
		<p>Unauthorised reported requests:
			[% class = data.unauthorised ? 'badge badge-info' : 'badge' %]
			<span class="[% class %]">[% data.unauthorised || 0 %]</span>
		</p>
		<p>Authorised incomplete requests:
			[% class = data.incomplete ? 'badge badge-my-purple' : 'badge' %]
			<span class="[% class %]">[% data.incomplete || 0 %]</span>
		</p>
		<p>All incomplete requests:
			<span class="badge">
				[% ( data.unauthorised || 0 ) + ( data.incomplete || 0 ) %]</span>
			[<span class="badge-info-text lighter">reported unauthorised</span>
			+ <span class="my-purple-text lighter">authorised incomplete</span>]
		</p>
	</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-plug"></i> Tests complete
        <span class="label label-[% data.tests_completed ? 'my-orange' : '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 %] -->