Skip to content

Commit 808dd88

Browse files
authored
Merge pull request #56 from kikkomep/fix/0.3.0-issues
Fix/0.3.0 issues
2 parents 5ccc284 + dc74ea7 commit 808dd88

File tree

3 files changed

+42
-31
lines changed

3 files changed

+42
-31
lines changed

src/app/utils/services/app.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,7 @@ export class AppService {
749749
let workflow_versions: WorkflowVersion[] = [];
750750

751751
let workflowsStatus: WorkflowsLoadingStatus = null;
752+
this.subjectLoadingWorkflowsStatus.next(null);
752753

753754
this.setLoadingWorkflows(true);
754755
return this.api

src/app/views/dashboard/dashboard.component.html

Lines changed: 39 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ <h2 class="text-primary font-weight-light p-2">
3838
<div>
3939
<span *ngIf="((isLoading|async)===true)" data-toggle="tooltip" tooltipPosition="right" data-html="true"
4040
title="The dashboard collects your subscribed workflows">
41-
{{ "Loading " + (isUserLogged() ? "Dashboard" : "Workflows") + "....."}}
41+
{{ "Loading " + (isUserLogged() && !browseButtonEnabled ? "Dashboard" : "Workflows") + "....."}}
4242
</span>
4343
<span *ngIf="(isLoading|async)===false && (!workflowNameFilter || workflowNameFilter.length==0)"
4444
pTooltip="{{ isUserLogged() ? 'the dashboard collects your workflow subscriptions' : 'registered workflows' }}"
4545
showDelay=2000 tooltipPosition="right" data-html="true">
46-
{{ isUserLogged() ? "Dashboard" : "Workflows" }}
46+
{{ browseButtonEnabled && isUserLogged() ? 'Registered Workflows' : isUserLogged() ? "Dashboard" : "Workflows" }}
4747
</span>
4848
</div>
4949
<div *ngIf="workflowNameFilter && workflowNameFilter.length>0">
@@ -68,8 +68,7 @@ <h2 class="text-primary font-weight-light p-2">
6868
<ng-container *ngIf="workflowNameFilter == '______ALL_____'; then allWorkflows; else matchingWorkflows;">
6969
</ng-container>
7070
<ng-template #allWorkflows>
71-
{{ browseButtonEnabled && isUserLogged() ? 'Registered Workflows' : isUserLogged() ? "Dashboard" :
72-
"Workflows" }}
71+
{{ browseButtonEnabled && isUserLogged() ? 'Registered Workflows' : isUserLogged() ? "Dashboard" : "Workflows" }}
7372
</ng-template>
7473
<ng-template #matchingWorkflows>Workflows matching "<b>{{workflowNameFilter}}</b>"</ng-template>
7574
</ng-template>
@@ -380,19 +379,6 @@ <h3>{{ workflows ? getStatsLength(workflowStats.unknown) : 0 }}</h3>
380379
</a></span>
381380
</div>
382381

383-
<!-- Workflow Registry -->
384-
<div class="item-detail" *ngIf="item.registry">
385-
<span class="item-icon">
386-
<i class="fas fa-xs fa-database mr-1"></i>
387-
</span>
388-
<span class="item-label">registry ID: </span>
389-
<span class="cut-text">
390-
<a href="{{ item.registryLink }}" target="_blank">{{
391-
item.registryLink
392-
}}
393-
</a></span>
394-
</div>
395-
396382
<!-- Workflow Submitter -->
397383
<div *ngIf="item?.version?.submitter" class="item-detail">
398384
<span class="item-icon">
@@ -421,6 +407,30 @@ <h3>{{ workflows ? getStatsLength(workflowStats.unknown) : 0 }}</h3>
421407
class="m-0 p-0" *ngIf="a_index < item.authors.length - 1">, </span></span>
422408
</p>
423409
</div>
410+
411+
<!-- Workflow Registry -->
412+
<div *ngFor="let reg of item.registries" class="item-detail">
413+
<span class="item-icon">
414+
<i class="fas fa-external-link-alt fa-xs mr-1" style="width: 10px;"></i>
415+
</span>
416+
<span class="item-label">{{reg.name}}: </span>
417+
<span class="cut-text">
418+
<a [href]="item.getRegistryLink(reg.identifier)" target="_blank">{{
419+
item.getRegistryLink(reg.identifier)
420+
}}
421+
</a></span>
422+
</div>
423+
424+
<!-- Workflow Creation time -->
425+
<div *ngIf="item.created" class="item-detail">
426+
<span class="item-icon">
427+
<i class="far fa-clock fa-xs mr-1"></i>
428+
</span>
429+
<span class="item-label">created: </span>
430+
<span class="cut-text">
431+
{{ item.created * 1000 | date:'long' }}
432+
</span>
433+
</div>
424434
</div>
425435
<!-- Workflows Details -->
426436
</div>
@@ -824,25 +834,26 @@ <h3>{{ workflows ? getStatsLength(workflowStats.unknown) : 0 }}</h3>
824834

825835
<ng-template pTemplate="empty">
826836
<!-- no workflow found/matching -->
827-
<div *ngIf="workflows && workflows.length === 0" class="no-workflow-container">
828-
837+
<div class="no-workflow-container">
829838
<div class="no-workflow"
830-
*ngIf="workflows && workflows.length === 0 && (!statusFilter && !workflowNameFilter)">
839+
*ngIf="(!workflows || workflows.length === 0) && (!statusFilter && !workflowNameFilter)">
831840
No workflow found
832841
</div>
833842

834843
<div class="no-workflow"
835-
*ngIf="workflows && workflows.length === 0 && (statusFilter || workflowNameFilter)">
844+
*ngIf="(statusFilter || workflowNameFilter)">
836845
No matching workflow
837846
</div>
838847

839-
Click on
840-
<a class='add-wf' href="/dashboard;add=true">
841-
<i class="fas fa-plus-circle"></i>
842-
to register a workflow
843-
</a>
844-
<br>or use the main search box to find and subscribe
845-
<br>to workflows registered by others in the community
848+
<div *ngIf="isUserLogged() && !browseButtonEnabled">
849+
Click on
850+
<a class='add-wf' href="/dashboard;add=true">
851+
<i class="fas fa-plus-circle"></i>
852+
to register a workflow
853+
</a>
854+
<br>or use the main search box to find and subscribe
855+
<br>to workflows registered by others in the community
856+
</div>
846857
</div>
847858
<!-- /.no workflow found/matching-->
848859
</ng-template>

src/app/views/dashboard/dashboard.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,8 @@ export class DashboardComponent
390390
this._workflowNameFilter = value ? value.replace('SEARCH_KEY###', '') : '';
391391
this.editModeEnabled = false;
392392
this.prepareTableData();
393+
// reset dataview paginator
394+
this.goToFirstPage();
393395
}
394396

395397
public get isLoading(): Observable<boolean> {
@@ -765,9 +767,6 @@ export class DashboardComponent
765767

766768
this.checkWindowSize();
767769

768-
// reset dataview paginator
769-
this.goToFirstPage();
770-
771770
// this.scrollTop();
772771

773772
this.cdref.detectChanges();

0 commit comments

Comments
 (0)