Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap position of Metrics and Tool tabs #1926

Merged
merged 6 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cypress/e2e/group2/myworkflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,10 @@ describe('Dockstore my workflows part 3', () => {
cy.visit('/my-workflows/github.com/A/l');
isActiveTab('Info');
tabs.forEach((tab) => {
if (tab === 'Tools') {
// Ugh, got to scroll to click this.
cy.get('#workflow_tabs').find('.mat-tab-header-pagination-after').first().click();
}
goToTab(tab);
isActiveTab(tab);
if (tab === 'Versions') {
Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/immutableDatabaseTests/workflowDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ describe('Dockstore Workflow Details', () => {
});

it('Change tab to tools', () => {
cy.get('.mat-tab-header-pagination-after').click();
goToTab('Tools');
cy.url().should('eq', Cypress.config().baseUrl + '/workflows/github.com/A/l:master?tab=tools');
});
Expand Down
28 changes: 14 additions & 14 deletions src/app/workflow/workflow.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -374,18 +374,10 @@ <h3>
</ng-template>
</ng-template>
</mat-tab>
<mat-tab id="metricsTab" label="Metrics">
<app-executions-tab [entry]="workflow" [version]="selectedVersion"></app-executions-tab>
</mat-tab>
<div *ngIf="entryType === EntryType.BioWorkflow">
<mat-tab id="toolsTab" label="Tools">
<div *ngIf="!isStub()">
<app-tool-tab [selectedVersion]="selectedVersion" [canRead]="canRead" [canWrite]="canWrite" [isOwner]="isOwner">
</app-tool-tab>
</div>
<div *ngIf="isStub()" class="p-3">
<mat-card class="alert alert-warning mat-elevation-z" role="alert">
<mat-icon class="alert-warning-icon">warning</mat-icon> To see tools, please refresh the workflow.
</mat-card>
</div>
</mat-tab>
<mat-tab id="dagTab" label="DAG">
<ng-template matTabContent>
<app-dag
Expand All @@ -409,10 +401,18 @@ <h3>
</div>
</ng-template>
</mat-tab>
<mat-tab id="toolsTab" label="Tools">
<div *ngIf="!isStub()">
<app-tool-tab [selectedVersion]="selectedVersion" [canRead]="canRead" [canWrite]="canWrite" [isOwner]="isOwner">
</app-tool-tab>
</div>
<div *ngIf="isStub()" class="p-3">
<mat-card class="alert alert-warning mat-elevation-z" role="alert">
<mat-icon class="alert-warning-icon">warning</mat-icon> To see tools, please refresh the workflow.
</mat-card>
</div>
</mat-tab>
</div>
<mat-tab id="metricsTab" label="Metrics">
<app-executions-tab [entry]="workflow" [version]="selectedVersion"></app-executions-tab>
</mat-tab>
<mat-tab *ngIf="!isPublic() && isHosted() && isOwner" id="permissionsTab" label="Permissions">
<app-permissions [workflow]="workflow"></app-permissions>
</mat-tab>
Expand Down
Loading