Skip to content

Commit

Permalink
Merge pull request #610 from wtsi-npg/devel
Browse files Browse the repository at this point in the history
pull from devel to master to create release 91.12.0
  • Loading branch information
mgcam authored Apr 12, 2021
2 parents 29fcb71 + 536a027 commit b90a5c2
Show file tree
Hide file tree
Showing 19 changed files with 113 additions and 553 deletions.
9 changes: 9 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
LIST OF CHANGES

release 91.12.0
- Change instrument and instrument format pages to only show current
instruments and instrument formats
- Remove superfluous columns in display tables for lists of instruments
and instrument formats
- Remove unused views (templates) for an instrument manufacturer
- Remove manufacturer model and view classes, create manufacturer_name
method in the instrument and instrument_format model classes

release 91.11.0
- a partial reimplementation of the serialization framework for components
and compositions in order to speed-up frequently used methods
Expand Down
7 changes: 0 additions & 7 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ data/templates/instrument_status_menu.tt2
data/templates/instrument_status_read_xml.tt2
data/templates/instrument_top.tt2
data/templates/instrument_update_statuses.tt2
data/templates/manufacturer_add.tt2
data/templates/manufacturer_create.tt2
data/templates/manufacturer_list.tt2
data/templates/manufacturer_read.tt2
data/templates/run_add.tt2
data/templates/run_annotation_add_ajax.tt2
data/templates/run_annotation_add_input_form.tt2
Expand Down Expand Up @@ -182,7 +178,6 @@ lib/npg/model/instrument_mod_dict.pm
lib/npg/model/instrument_status.pm
lib/npg/model/instrument_status_annotation.pm
lib/npg/model/instrument_status_dict.pm
lib/npg/model/manufacturer.pm
lib/npg/model/run.pm
lib/npg/model/run_annotation.pm
lib/npg/model/run_lane.pm
Expand Down Expand Up @@ -215,7 +210,6 @@ lib/npg/view/instrument_format.pm
lib/npg/view/instrument_mod.pm
lib/npg/view/instrument_status.pm
lib/npg/view/instrument_status_annotation.pm
lib/npg/view/manufacturer.pm
lib/npg/view/run.pm
lib/npg/view/run_annotation.pm
lib/npg/view/run_lane.pm
Expand Down Expand Up @@ -360,7 +354,6 @@ t/10-model-instrument_mod_dict.t
t/10-model-instrument_status.t
t/10-model-instrument_status_annotation.t
t/10-model-instrument_status_dict.t
t/10-model-manufacturer.t
t/10-model-run.t
t/10-model-run_annotation.t
t/10-model-run_lane.t
Expand Down
20 changes: 8 additions & 12 deletions data/templates/instrument_format_list.tt2
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
<!-- begin $Id: instrument_format_list.tt2 6141 2009-08-13 09:19:17Z dj3 $ -->

[% PROCESS instrument_formats_menu.tt2
%]


<table id="instrument_formats" class="sortable zebra">
<thead>
<tr>
<th>Instrument Manufacturer</th>
<th>Instrument Model</th>
<th>Is Current</th>
<th>Instrument Count</th>
<th>Current Instrument Count</th>
</tr>
</thead>
<tbody>
[% FOREACH instrument_format = model.instrument_formats %]
<tr>
<td><a href="[% SCRIPT_NAME %]/manufacturer/[% instrument_format.id_manufacturer %]">[% instrument_format.manufacturer.name %]</a></td>
<td><a href="[% SCRIPT_NAME %]/instrument_format/[% instrument_format.id_instrument_format %]">[% instrument_format.model %]</a></td>
<td>[% IF instrument_format.iscurrent %]<img src="/icons/silk/tick.png" alt="tick.png" title="yes" />[% ELSE %]<img src="/icons/silk/cross.png" alt="cross.png" title="no" />[% END %]</td>
<td>[% instrument_format.instrument_count %]</td>
</tr>
[% IF instrument_format.iscurrent %]
<tr>
<td>[% instrument_format.manufacturer_name %]</td>
<td><a href="[% SCRIPT_NAME %]/instrument_format/[% instrument_format.id_instrument_format %]">[% instrument_format.model %]</a></td>
<td>[% instrument_format.current_instruments_count %]</td>
</tr>
[% END %]
[% END %]
</tbody>
</table>
<!-- end $Id: instrument_format_list.tt2 6141 2009-08-13 09:19:17Z dj3 $ -->
12 changes: 3 additions & 9 deletions data/templates/instrument_format_read.tt2
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
<!-- begin $Id: instrument_format_read.tt2 2662 2008-08-06 12:23:37Z rmp $ -->
<table id="instruments" class="sortable zebra">
<caption>Instruments for format [% model.manufacturer.name %] [% model.model %]</caption>
<caption>Instruments for format [% model.manufacturer_name %] [% model.model %]</caption>
<thead>
<tr>
<th>Name</th>
<th>Model</th>
<th>External Name</th>
<th>Serial #</th>
<th>Is Current</th>
</tr>
</thead>
<tbody>[% FOREACH instrument = model.instruments %]
<tbody>[% FOREACH instrument = model.instruments; IF instrument.iscurrent %]
<tr>
<td><a href="[% SCRIPT_NAME %]/instrument/[% instrument.id_instrument %]">[% instrument.name %]</a></td>
<td>[% instrument.model %]</td>
<td>[% instrument.external_name %]</td>
<td>[% instrument.serial %]</td>
<td>[% IF instrument.iscurrent %]<img src="/icons/silk/tick.png" alt="tick.png" title="yes" />[% ELSE %]<img src="/icons/silk/cross.png" alt="cross.png" title="no" />[% END %]</td>
</tr>[% END %]
</tr>[% END; END %]
</tbody>
</table>
<!-- end $Id: instrument_format_read.tt2 2662 2008-08-06 12:23:37Z rmp $ -->
6 changes: 1 addition & 5 deletions data/templates/instrument_list_textual.tt2
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
<th>Model</th>
<th>External Name</th>
<th>Designation</th>
<th>Serial #</th>
<th>Is Current</th>
<th>Current Run</th>
<th>Current Status</th>
<th>Status Comment</th>
Expand All @@ -23,8 +21,6 @@
<td>[% instrument.model %]</td>
<td>[% instrument.external_name %]</td>
<td>[% IF instrument.designations %][% FOREACH designation = instrument.designations %][% designation.description | html %]&nbsp;[% END %][% ELSE %]&nbsp;[% END %]</td>
<td>[% instrument.serial %]</td>
<td>[% IF instrument.iscurrent %]<img src="/icons/silk/tick.png" alt="tick.png" title="yes" />[% ELSE %]<img src="/icons/silk/cross.png" alt="cross.png" title="no" />[% END %]</td>
<td>[% PROCESS current_runs_info %]</td>
<td>[% instrument.current_instrument_status.instrument_status_dict.description %]</td>
<td>[% instrument.current_instrument_status.comment %]</td>
Expand Down Expand Up @@ -65,4 +61,4 @@
[%- BLOCK run_info -%]
[%- status = current_run.current_run_status.description -%]
[%- IF status %]<a href="[% SCRIPT_NAME %]/run/[% current_run.id_run %]">[% current_run.name %]</a> [% status %][% ELSE; idle; END -%]
[%- END -%]
[%- END -%]
2 changes: 1 addition & 1 deletion data/templates/instrument_read.tt2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="page_title">[% title %]</div>
<table id="instrument_info_table">
<tr><th>Model</th><td><a href="[% SCRIPT_NAME %]/instrument_format/[% model.id_instrument_format %]">[% model.instrument_format.model %]</a>&nbsp;</td></tr>
<tr><th>Manufacturer</th><td>[% mname = model.manufacturer.name; mname = mname ? mname : '&nbsp;'; mname; %]</td></tr>
<tr><th>Manufacturer</th><td>[% mname = model.manufacturer_name; mname = mname ? mname : '&nbsp;'; mname; %]</td></tr>
[% IF model.serial %]<tr><th>Serial Number</th><td>[% model.serial %]&nbsp;</td></tr>[% END %]
[% IF model.designations %]<tr><th>Designations</th><td>[% FOREACH designation = model.designations %][% designation.description | html %]&nbsp;[% END %]</td></tr>[% END %]

Expand Down
2 changes: 1 addition & 1 deletion data/templates/instrument_top.tt2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[% labels = ['current status', 'formats'] -%]
[% labels = ['current status', 'current formats'] -%]
[% addresses = ['instrument/graphical', 'instrument_format'] -%]
[% counts = [0, 2] -%]
<p class="npgmenu1">
Expand Down
8 changes: 0 additions & 8 deletions data/templates/manufacturer_add.tt2

This file was deleted.

9 changes: 0 additions & 9 deletions data/templates/manufacturer_create.tt2

This file was deleted.

19 changes: 0 additions & 19 deletions data/templates/manufacturer_list.tt2

This file was deleted.

52 changes: 0 additions & 52 deletions data/templates/manufacturer_read.tt2

This file was deleted.

12 changes: 8 additions & 4 deletions lib/npg/controller.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use base qw(ClearPress::controller);
use npg::decorator;

use npg::model::instrument_format;
use npg::model::manufacturer;
use npg::model::instrument;
use npg::model::instrument_annotation;
use npg::model::instrument_status;
Expand All @@ -24,7 +23,6 @@ use npg::model::run_lane_annotation;
use npg::model::instrument_status_annotation;

use npg::view::annotation;
use npg::view::manufacturer;
use npg::view::instrument_format;
use npg::view::instrument_status;
use npg::view::instrument_annotation;
Expand Down Expand Up @@ -111,11 +109,17 @@ npg::controller - NPG tracking controller
=head1 AUTHOR
Roger M Pettett
=over
=item Roger M Pettett
=item Marina Gourtovaia
=back
=head1 LICENSE AND COPYRIGHT
Copyright (C) 2016 GRL
Copyright (C) 2006,2014,2016,2020,2021 Genome Research Ltd.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
32 changes: 13 additions & 19 deletions lib/npg/model/instrument.pm
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#########
# Author: rmp
# Created: 2006-10-31
#
package npg::model::instrument;

use strict;
use warnings;
use base qw(npg::model);
Expand Down Expand Up @@ -178,14 +175,9 @@ sub model {
return $self->instrument_format->model();
}

sub id_manufacturer {
my $self = shift;
return $self->instrument_format->id_manufacturer();
}

sub manufacturer {
sub manufacturer_name {
my $self = shift;
return $self->instrument_format->manufacturer();
return $self->instrument_format->manufacturer_name();
}

sub runs {
Expand Down Expand Up @@ -666,13 +658,9 @@ Has a side-effect of updating an instrument's current instrument_status to 'wash
my $sModel = $oInstrument->model();
=head2 id_manufacturer - id_manufacturer of this machine, via its instrument_format
my $iIdManufacturer = $oInstrument->id_manufacturer();
=head2 manufacturer - npg::model::manufacturer of this machine, via its instrument_format
=head2 manufacturer_name - the name of the manufacturer of this instrument
my $oManufacturer = $oInstrument->manufacturer();
my $oManufacturer = $oInstrument->manufacturer_name();
=head2 instrument_statuses - arrayref of npg::model::instrument_statuses for this instrument
Expand Down Expand Up @@ -776,11 +764,17 @@ returns true if the instrument is a MiSeq, false otherwise
=head1 AUTHOR
Roger Pettett, E<lt>[email protected]E<gt>
=over
=item Roger Pettett, E<lt>[email protected]E<gt>
=item Marina Gourtovaia
=back
=head1 LICENSE AND COPYRIGHT
Copyright (C) 2008 GRL, by Roger Pettett
Copyright (C) 2006,2008,2013,2014,2016,2018,2021 Genome Research Ltd.
This file is part of NPG.
Expand Down
Loading

0 comments on commit b90a5c2

Please sign in to comment.