Skip to content

Commit

Permalink
Feature/nextflow block test params (#447)
Browse files Browse the repository at this point in the history
* hid test param path on info tab for nfl, also info alert about test params not existing for nfl on files tab

* alert for nextflow hosted workflow test param tab

* hide test param in version edit/view for nfl
  • Loading branch information
agduncan94 authored Sep 7, 2018
1 parent 068fc1a commit fe3b350
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/workflow/files/files.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</app-descriptors-workflow>
</tab>
<tab heading="Test Parameter Files">
<app-paramfiles-workflow [entrypath]="entrypath" [id]="id" [selectedVersion]="selectedVersion">
<app-paramfiles-workflow [entrypath]="entrypath" [id]="id" [selectedVersion]="selectedVersion" [descriptorType]="descriptorType">
</app-paramfiles-workflow>
</tab>
</tabset>
Expand Down
1 change: 1 addition & 0 deletions src/app/workflow/files/files.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { WorkflowVersion } from '../../shared/swagger/model/workflowVersion';
})
export class FilesWorkflowComponent extends Files implements OnInit, OnChanges {
@Input() selectedVersion: WorkflowVersion;
@Input() descriptorType: string;
versionsWithParamfiles: Array<any>;
previousEntryPath: string;
previousVersionName: string;
Expand Down
2 changes: 1 addition & 1 deletion src/app/workflow/info-tab/info-tab.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</button>
</div>
</form>
<form #editTestFilePathForm="ngForm" class="form-inline">
<form #editTestFilePathForm="ngForm" class="form-inline" *ngIf="workflow?.descriptorType !== 'nfl'">
<div class="form-group">
<strong matTooltip="Path in Git repository to main descriptor file">Test File Path: </strong>
<span *ngIf="!defaultTestFilePathEditing"> {{ workflow?.defaultTestParameterFilePath }} </span>
Expand Down
7 changes: 6 additions & 1 deletion src/app/workflow/paramfiles/paramfiles.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@
<span class="glyphicon glyphicon-warning-sign"></span>
&nbsp;This version of the workflow is invalid.
</alert>
<alert type="warning" *ngIf="!content">
<alert type="warning" *ngIf="!content && descriptorType !== 'nfl'">
<span class="glyphicon glyphicon-warning-sign"></span>
&nbsp; A Test Parameter File associated with this workflow could not be found.
</alert>
<alert type="info" *ngIf="descriptorType === 'nfl'">
<span class="glyphicon glyphicon-warning-sign"></span>
&nbsp;
Nextflow does not have the concept of a test parameter file.
</alert>
<div [hidden]="!content">
<mat-toolbar color="primary">
<mat-toolbar-row>
Expand Down
1 change: 1 addition & 0 deletions src/app/workflow/paramfiles/paramfiles.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { WorkflowService } from '../../shared/workflow.service';
export class ParamfilesWorkflowComponent extends EntryFileSelector {
@Input() id: number;
@Input() entrypath: string;
@Input() descriptorType: string;
@Input() set selectedVersion(value: WorkflowVersion) {
this.clearContent();
this.onVersionChange(value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ <h4 class="modal-title">{{isPublic || !canWrite ? 'View' : 'Edit'}} Version Tag<
<div *ngIf="formErrors.workflow_path" class="alert alert-danger"> {{ formErrors.workflow_path }} </div>
</div>
</div>
<div class="form-group form-group-sm">
<div class="form-group form-group-sm" *ngIf="workflow?.descriptorType !== 'nfl'">
<label class="col-sm-3 col-md-3 col-lg-3 control-label">
Test Parameter File(s):
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
<app-code-editor-list [sourcefiles]="descriptorFiles" [editing]="editing" [descriptorType]="descriptorType" [fileType]="'descriptor'" [selectedVersion]="_selectedVersion" [entryType]="'workflow'" [entrypath]="entrypath"></app-code-editor-list>
</tab>
<tab heading="Test Parameter Files" id="testParameterFilesTab">
<app-code-editor-list [sourcefiles]="testParameterFiles" [editing]="editing" [descriptorType]="descriptorType" [fileType]="'testParam'" [selectedVersion]="_selectedVersion" [entryType]="'workflow'" [entrypath]="entrypath"></app-code-editor-list>
<app-code-editor-list *ngIf="descriptorType !== 'nfl'" [sourcefiles]="testParameterFiles" [editing]="editing" [descriptorType]="descriptorType" [fileType]="'testParam'" [selectedVersion]="_selectedVersion" [entryType]="'workflow'" [entrypath]="entrypath"></app-code-editor-list>
<div class="alert alert-info" role="alert" *ngIf="descriptorType === 'nfl'">
<span class="glyphicon glyphicon-warning-sign"></span>
&nbsp;
Nextflow does not have the concept of a test parameter file.
</div>
</tab>
</tabset>
<div class="editor-button-container" *ngIf="!publicPage && canWrite">
Expand Down
2 changes: 1 addition & 1 deletion src/app/workflow/workflow.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ <h3>
</tab>
<tab id="fileTab" heading="Files" (select)="setEntryTab('files')">
<div *ngIf="validVersions && !isStub() && !isHosted()">
<app-files-workflow *ngIf="validVersions" [entrypath]="workflow.full_workflow_path" [id]="workflow?.id" [versions]="validVersions" [default]="defaultVersion" [selectedVersion]="selectedVersion" [canRead]="canRead" [canWrite]="canWrite" [isOwner]="isOwner">
<app-files-workflow *ngIf="validVersions" [entrypath]="workflow.full_workflow_path" [id]="workflow?.id" [versions]="validVersions" [default]="defaultVersion" [selectedVersion]="selectedVersion" [descriptorType]="workflow.descriptorType" [canRead]="canRead" [canWrite]="canWrite" [isOwner]="isOwner">
</app-files-workflow>
</div>
<div *ngIf="validVersions && isHosted()">
Expand Down

0 comments on commit fe3b350

Please sign in to comment.