Skip to content

Commit 535d874

Browse files
authored
Merge pull request #144 from delphi-hub/release/1.0.0
Release/1.0.0
2 parents 1b825d9 + d2e60a6 commit 535d874

File tree

4 files changed

+22
-12
lines changed

4 files changed

+22
-12
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name := "delphi-management"
55
organization := "de.upb"
66

77

8-
version := "1.0.0-SNAPSHOT"
8+
version := "1.0.0"
99

1010

1111
scalaVersion := "2.12.4"

client/src/app/dashboard/graph-view/graph-view.service.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,22 @@ export class GraphViewService {
118118
}
119119

120120
private mapLinksToEdges(links: Array<InstanceLink>): Array<cytoscape.ElementDefinition> {
121-
const edges: Array<cytoscape.ElementDefinition> = links.map((edgeVal) => {
122-
return {data: {id: edgeVal.idFrom + '_' + edgeVal.idTo, source: edgeVal.idFrom, target: edgeVal.idTo, status: edgeVal.linkState}};
121+
const edges: Array<cytoscape.ElementDefinition> = links.filter(edgeVal => this.targetsExists(edgeVal)).map((edgeVal) => {
122+
return {data: {id: edgeVal.idFrom + '_' + edgeVal.idTo, source: edgeVal.idFrom, target: edgeVal.idTo, status: edgeVal.linkState}};
123123
});
124124
return edges;
125125
}
126126

127+
private targetsExists(instanceLink: InstanceLink) {
128+
129+
const instances = this.storeService.getState().instances;
130+
if (instances[instanceLink.idFrom] && instances[instanceLink.idTo]) {
131+
return true;
132+
} else {
133+
return false;
134+
}
135+
}
136+
127137
public getGraphConfig() {
128138
return new GraphConfig();
129139
}

client/src/app/dashboard/table-all/table-all.component.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
-->
1818
<div *ngIf="dataSource.data.length == 0; else tableBlock">
1919
There are currently no instances running.
20+
<div class="col-lg-2 col-md-2 col-sm-2">
21+
<div *ngIf="authService.userIsAdmin()">
22+
<button mat-raised-button color="primary" id="addButton" (click)="openAddDialog()">Add
23+
Instance</button>
24+
</div>
25+
</div>
2026
</div>
2127
<ng-template #tableBlock>
2228
<div class="container">
@@ -149,7 +155,7 @@
149155

150156
</table>
151157
</div>
158+
<div *ngIf="!hideControlElements">
159+
<mat-paginator class="paginator" [pageSizeOptions]="[5, 10, 20]"></mat-paginator>
160+
</div>
152161
</ng-template>
153-
<div *ngIf="!hideControlElements">
154-
<mat-paginator class="paginator" [pageSizeOptions]="[5, 10, 20]"></mat-paginator>
155-
</div>

client/src/app/dashboard/table-all/table-all.component.spec.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,4 @@ describe('TableAllComponent', () => {
7575
expect(apiService).toBeTruthy();
7676
})));
7777

78-
it('should check for apply filter keyup event', () => {
79-
spyOn(component, 'applyFilter');
80-
fixture.detectChanges();
81-
expect(fixture.nativeElement.querySelectorAll('mat-form-field').length).toBe(1);
82-
});
83-
8478
});

0 commit comments

Comments
 (0)