Skip to content

Commit

Permalink
Merge pull request #1921 from 4dn-dcic/utk_qc_html_reports
Browse files Browse the repository at this point in the history
QC Report Links Updates
  • Loading branch information
utku-ozturk authored Feb 11, 2025
2 parents a009a56 + 5c6927f commit 731a271
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 15 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ fourfront
Change Log
----------

8.5.1
=====

`PR 1921: QC report links updates <https://github.com/4dn-dcic/fourfront/pull/1921>`_

* Bug fix: Hide QC HTML Report Links of WFR node details upon removal of bulk html reports already generated


8.5.0
=====

Expand All @@ -18,7 +26,7 @@ Change Log
* Enhanced table-full-size toggles for usage statistics
* New histogram interval options for submission statistics
* Chart section header styles updated
* Hide QC HTML Report Links after removal of bulk html reports already generated
* Hide QC HTML Report Links upon removal of bulk html reports already generated


8.4.6
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
# Note: Various modules refer to this system as "encoded", not "fourfront".
name = "encoded"
version = "8.5.0"
version = "8.5.1"
description = "4DN-DCIC Fourfront"
authors = ["4DN-DCIC Team <[email protected]>"]
license = "MIT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,7 @@ export class QCMetricsTable extends React.PureComponent {
/**
* Generates column headers for QCMetricsTable including render functions for each column
* @param {*} fileGroups file groups
* @param {*} canShowMetricURL 2025-01-22: added to hide QC HTML Report Links after removal of bulk html reports already generated
* @param {*} canShowMetricURL 2025-01-22: hide QC HTML Report Links upon removal of bulk html reports already generated
* @returns columnHeaders for QCMetricsTable including render functions for each column
*/
static generateAlignedColumnHeaders(fileGroups, canShowMetricURL = false) {
Expand Down Expand Up @@ -1243,7 +1243,7 @@ export function QCMetricFromSummary(props){
const { title, field } = props;
const { value, tooltip } = QCMetricFromSummary.formatByNumberType(props);

// 2025-01-22: added to hide QC HTML Report Links after removal of bulk html reports already generated
// 2025-01-22: hide QC HTML Report Links upon removal of bulk html reports already generated
if (field === 'url') { return null; }

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class QCMetricFromEmbed extends React.PureComponent {
const { metric, qcProperty, schemaItem, schemas, fallbackTitle, tips, percent } = this.props;
const { open, closing } = this.state;

// 2025-01-22: added to hide QC HTML Report Links after removal of bulk html reports already generated
// 2025-01-22: hide QC HTML Report Links upon removal of bulk html reports already generated
if (qcProperty === "url") return null;

const { qc_order = null, title = null, description: tip = null } = schemaItem || {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export class FileDetailBody extends React.PureComponent {
'session' : PropTypes.bool.isRequired,
'minHeight' : PropTypes.number,
'keyTitleDescriptionMap' : PropTypes.object,
'windowWidth' : PropTypes.number.isRequired
'windowWidth' : PropTypes.number.isRequired,
'canShowMetricURL' : PropTypes.bool
};

doesDescriptionOrNotesExist(){
Expand Down Expand Up @@ -81,10 +82,13 @@ export class FileDetailBody extends React.PureComponent {
}

downloadLinkBox(){
var { node, file, session } = this.props, content;
var { node, file, session, canShowMetricURL = false } = this.props, content;

if (WorkflowNodeElement.isNodeQCMetric(node)){
content = <ViewMetricButton {...{ node, file }}/>;
if (WorkflowNodeElement.isNodeQCMetric(node)) {
if (canShowMetricURL !== true) {
return null;
}
content = <ViewMetricButton {...{ node, file }} />;
} else {
content = <fileUtil.FileDownloadButtonAuto result={file} session={session} />;
}
Expand Down Expand Up @@ -121,8 +125,8 @@ export class FileDetailBody extends React.PureComponent {
}

qcBox(){
var { file, node } = this.props,
qc, qcLink;
const { file, node, canShowMetricURL = false } = this.props;
let qc = null, qcLink = null;

if (!file || Array.isArray(file)){
return null;
Expand All @@ -131,7 +135,7 @@ export class FileDetailBody extends React.PureComponent {
qc = file && file.quality_metric;
qcLink = qc && (qc.url || object.itemUtil.atId(qc));

if (!qcLink) return null;
if (!qcLink || !canShowMetricURL) return null;

return (
<div className="col-sm-6 col-lg-4 right box buttons-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export class WorkflowNodeElement extends React.PureComponent {
'disabled' : PropTypes.bool,
'selected' : PropTypes.bool,
'related' : PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
'columnWidth' : PropTypes.number
'columnWidth' : PropTypes.number,
'canShowMetricURL' : PropTypes.bool // If true, will show a clickable link to QC metric URL.
};

static ioFileTypes = new Set(['data file', 'QC', 'reference file', 'report']);
Expand Down Expand Up @@ -405,7 +406,7 @@ export class WorkflowNodeElement extends React.PureComponent {
* seems having a link on node would be bit unexpected if clicked accidentally.
*/
qcMarker(){
const { node, selected } = this.props;
const { node, selected, canShowMetricURL = false } = this.props;

if (!WorkflowNodeElement.isNodeFile(node) || !WorkflowNodeElement.doesRunDataExist(node)){
return null;
Expand All @@ -432,7 +433,7 @@ export class WorkflowNodeElement extends React.PureComponent {
else if (qcStatus === 'error') markerProps.className += ' status-error';
}

if (selected && qc.url){
if (selected && qc.url && canShowMetricURL === true){
markerProps.className += ' clickable';
return <a href={qc.url} target="_blank" rel="noreferrer noopener" {...markerProps} onClick={function(e){
e.preventDefault();
Expand Down

0 comments on commit 731a271

Please sign in to comment.