Skip to content

Commit c025d20

Browse files
authored
Merge pull request #251 from wurstbrot/gsoc-2023
Gsoc 2023
2 parents 0be57de + 13b0c75 commit c025d20

22 files changed

+603
-206
lines changed

src/app/app-routing.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ import { MappingComponent } from './component/mapping/mapping.component';
66
import { MatrixComponent } from './component/matrix/matrix.component';
77
import { ActivityDescriptionComponent } from './component/activity-description/activity-description.component';
88
import { UsageComponent } from './component/usage/usage.component';
9+
import { Teams } from './component/teams/teams.component';
910

1011
const routes: Routes = [
1112
{ path: '', component: MatrixComponent },
1213
{ path: 'circular-heatmap', component: CircularHeatmapComponent },
1314
{ path: 'activity-description', component: ActivityDescriptionComponent },
1415
{ path: 'mapping', component: MappingComponent },
1516
{ path: 'usage', component: UsageComponent },
17+
{ path: 'teams', component: Teams },
1618
{ path: 'about', component: AboutUsComponent },
1719
];
1820

src/app/app.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { ReadmeToHtmlComponent } from './component/readme-to-html/readme-to-html
1919
import { UsageComponent } from './component/usage/usage.component';
2020
import { AboutUsComponent } from './component/about-us/about-us.component';
2121
import { DependencyGraphComponent } from './component/dependency-graph/dependency-graph.component';
22+
import { Teams } from './component/teams/teams.component';
2223

2324
@NgModule({
2425
declarations: [
@@ -34,6 +35,7 @@ import { DependencyGraphComponent } from './component/dependency-graph/dependenc
3435
UsageComponent,
3536
AboutUsComponent,
3637
DependencyGraphComponent,
38+
Teams,
3739
],
3840
imports: [
3941
BrowserModule,
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
.content-box {
2-
margin: 20px;
3-
width: 95%;
4-
/*height: 100%;*/
5-
/*background-color: paleturquoise;*/
6-
}
2+
margin: 20px;
3+
width: 95%;
4+
/*height: 100%;*/
5+
/*background-color: paleturquoise;*/
6+
}
77

88
.mat-form-field + .mat-form-field {
99
margin-left: 8px;
1010
}
1111

12-
.mat-raised-button{
12+
.mat-raised-button {
1313
margin-right: 8px;
14+
}
15+
.teams-implemented-list {
16+
list-style: none;
1417
}

src/app/component/activity-description/activity-description.component.html

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ <h1>
6161
<b>Difficulty of Implementation</b>
6262
</mat-panel-title>
6363
</mat-expansion-panel-header>
64-
<p>Knowledge: {{ this.KnowledgeLabels[this.currentActivity.knowledge] }}</p>
64+
<p>
65+
Knowledge: {{ this.KnowledgeLabels[this.currentActivity.knowledge] }}
66+
</p>
6567
<p>Time: {{ this.GeneralLabels[this.currentActivity.time] }}</p>
6668
<p>Resources: {{ this.GeneralLabels[this.currentActivity.resources] }}</p>
6769
</mat-expansion-panel>
@@ -188,13 +190,28 @@ <h1>
188190
<mat-expansion-panel>
189191
<mat-expansion-panel-header>
190192
<mat-panel-title>
191-
<b>Implemented</b>
193+
<b>Implemented By</b>
192194
</mat-panel-title>
193195
</mat-expansion-panel-header>
194196
<div
195-
*ngIf="currentActivity.isImplemented; then thenBlock; else elseBlock"></div>
196-
<ng-template #thenBlock> Implemented </ng-template>
197-
<ng-template #elseBlock> Not Implemented </ng-template>
197+
*ngIf="
198+
currentActivity.teamsImplemented;
199+
then thenBlock;
200+
else elseBlock
201+
"></div>
202+
<ng-template #thenBlock>
203+
<ul class="teams-implemented-list">
204+
<li *ngFor="let item of currentActivity.teamsImplemented | keyvalue">
205+
<b>{{ item.key }}</b
206+
>:{{ item.value }}
207+
</li>
208+
</ul>
209+
</ng-template>
210+
<ng-template #elseBlock
211+
>teamsImplemented variable not present <br />
212+
<p *ngIf="currentActivity.isImplemented === false">Not Implemented</p>
213+
<p *ngIf="currentActivity.isImplemented === true">Implemented</p>
214+
</ng-template>
198215
</mat-expansion-panel>
199216
<mat-expansion-panel>
200217
<mat-expansion-panel-header>
@@ -205,7 +222,9 @@ <h1>
205222
<app-dependency-graph
206223
dimension="{{ currentActivity.dimension }}"
207224
subDimension="{{ currentActivity.subDimension }}"
208-
activityName="{{ currentActivity.activityName }}"></app-dependency-graph>
225+
activityName="{{
226+
currentActivity.activityName
227+
}}"></app-dependency-graph>
209228
</mat-expansion-panel>
210229

211230
<mat-expansion-panel>

src/app/component/activity-description/activity-description.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export interface activityDescription {
3434
assessment: string;
3535
comments: string;
3636
isImplemented: boolean;
37+
teamsImplemented: Object;
3738
}
3839

3940
@Component({
@@ -66,6 +67,7 @@ export class ActivityDescriptionComponent implements OnInit {
6667
evidence: '',
6768
comments: '',
6869
isImplemented: false,
70+
teamsImplemented: {},
6971
};
7072

7173
YamlObject: any;
@@ -199,6 +201,7 @@ export class ActivityDescriptionComponent implements OnInit {
199201
data['isImplemented'],
200202
false
201203
);
204+
this.currentActivity.teamsImplemented = data['teamsImplemented'];
202205
this.openall();
203206
});
204207
}

src/app/component/circular-heatmap/circular-heatmap.component.css

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,23 @@
1313
border: none;
1414
text-align: left;
1515
cursor: pointer;
16+
font-weight: 700;
1617
}
1718

18-
.example-card {
19+
.right-panel {
1920
float: right;
2021
width: 25%;
2122
margin: 5%;
2223
padding: 20px;
2324
}
2425
.downloadButtonClass {
25-
position: absolute;
26+
position: fixed;
2627
padding: 10px;
2728
bottom: 5%;
2829
right: 5%;
2930
}
3031
.resetButtonClass {
31-
position: absolute;
32+
position: fixed;
3233
padding: 10px;
3334
bottom: 5%;
3435
right: 18%;
@@ -68,3 +69,15 @@
6869
justify-content: top;
6970
margin-left: auto;
7071
}
72+
.team-list {
73+
list-style-type: none;
74+
margin: 0;
75+
padding: 0 1em;
76+
}
77+
/* .team-filter {
78+
padding: 0;
79+
width: 60%;
80+
} */
81+
.team-filter > .mat-form-field {
82+
display: block;
83+
}

src/app/component/circular-heatmap/circular-heatmap.component.html

Lines changed: 93 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
<div class="col-md-3"></div>
44
<div class="col-md-6">
55
<div class="overlay-details" [hidden]="!showOverlay">
6-
<div *ngIf="activityDetails; then activityTrue; else activityFalse"></div>
6+
<div
7+
*ngIf="activityDetails; then activityTrue; else activityFalse"></div>
78
<ng-template #activityTrue>
89
<div class="overlay-modal">
910
<mat-accordion multi="true" class="overlay-accordion">
@@ -47,7 +48,9 @@ <h2>Nothing to show</h2>
4748
<p [innerHTML]="activityDetails.description"></p>
4849
</ng-template>
4950
</mat-expansion-panel>
50-
<mat-expansion-panel [expanded]="true" *ngIf="activityDetails.risk">
51+
<mat-expansion-panel
52+
[expanded]="true"
53+
*ngIf="activityDetails.risk">
5154
<mat-expansion-panel-header>
5255
<mat-panel-title>
5356
<b>Risk</b>
@@ -97,6 +100,7 @@ <h2>Nothing to show</h2>
97100
<p [innerHTML]="activityDetails.dependsOn"></p>
98101
</ng-template>
99102
</mat-expansion-panel>
103+
100104
<mat-expansion-panel
101105
[expanded]="true"
102106
*ngIf="activityDetails.difficultyOfImplementation">
@@ -117,6 +121,20 @@ <h2>Nothing to show</h2>
117121
</p>
118122
</ng-template>
119123
</mat-expansion-panel>
124+
<mat-expansion-panel
125+
[expanded]="true"
126+
*ngIf="activityDetails.tags">
127+
<mat-expansion-panel-header>
128+
<mat-panel-title>
129+
<b>Tags</b>
130+
</mat-panel-title>
131+
</mat-expansion-panel-header>
132+
<ng-template matExpansionPanelContent>
133+
<ul *ngFor="let tag of activityDetails.tags">
134+
<li [innerHTML]="tag"></li>
135+
</ul>
136+
</ng-template>
137+
</mat-expansion-panel>
120138
<mat-expansion-panel
121139
[expanded]="true"
122140
*ngIf="activityDetails.references">
@@ -172,45 +190,79 @@ <h2>Nothing to show</h2>
172190
</ng-template>
173191
</div>
174192
<div id="chart" class="heatmapClass">
175-
<mat-card class="example-card" *ngIf="showActivityCard">
176-
<mat-card-title-group>
177-
<mat-card-title>{{ cardHeader }}</mat-card-title>
178-
<mat-card-subtitle>{{ cardSubheader }}</mat-card-subtitle>
179-
</mat-card-title-group>
180-
<mat-card-content *ngFor="let activity of activityData; index as i">
181-
<div *ngIf="activity.ifActivityDone; then trueBlock; else falseBlock"></div>
182-
<p>
183-
<ng-template #trueBlock>
184-
<mat-checkbox
185-
(click)="this.toggleCheckbox(i)"
186-
[checked]="true"
187-
color="primary">
188-
</mat-checkbox>
189-
<button
190-
class="normal-button"
191-
(click)="
192-
navigate(currentDimension, cardHeader, 1, activity['activityName'])
193-
">
194-
{{ activity['activityName'] }}
195-
</button>
196-
</ng-template>
197-
<ng-template #falseBlock>
198-
<mat-checkbox
199-
(click)="this.toggleCheckbox(i)"
200-
[checked]="false"
201-
color="primary">
202-
</mat-checkbox>
203-
<button
204-
class="normal-button"
205-
(click)="
206-
navigate(currentDimension, cardHeader, 1, activity['activityName'])
207-
">
208-
{{ activity['activityName'] }}
209-
</button>
210-
</ng-template>
211-
</p>
212-
</mat-card-content>
213-
</mat-card>
193+
<div class="right-panel">
194+
<div class="team-filter">
195+
<mat-form-field class="team-chip-list">
196+
<mat-label>Team Group Filter</mat-label>
197+
<mat-chip-list selectable>
198+
<mat-chip
199+
#c="matChip"
200+
(click)="toggleTeamGroupSelection(c)"
201+
selected>
202+
All
203+
</mat-chip>
204+
<mat-chip
205+
#c="matChip"
206+
*ngFor="let group of teamGroups | keyvalue"
207+
(click)="toggleTeamGroupSelection(c)">
208+
{{ group.key }}
209+
</mat-chip>
210+
</mat-chip-list>
211+
</mat-form-field>
212+
<mat-form-field>
213+
<mat-label>Team Filter</mat-label>
214+
<mat-chip-list selectable multiple>
215+
<mat-chip
216+
#c="matChip"
217+
*ngFor="let team of teamList"
218+
(click)="toggleTeamSelection(c)">
219+
{{ team }}
220+
</mat-chip>
221+
</mat-chip-list>
222+
</mat-form-field>
223+
</div>
224+
<mat-card class="example-card" *ngIf="showActivityCard">
225+
<mat-card-title-group>
226+
<mat-card-title>{{ cardHeader }}</mat-card-title>
227+
<mat-card-subtitle>{{ cardSubheader }}</mat-card-subtitle>
228+
</mat-card-title-group>
229+
<mat-card-content
230+
*ngFor="let activity of activitysData; index as activityIndex">
231+
<mat-expansion-panel>
232+
<mat-expansion-panel-header>
233+
<mat-panel-title>
234+
<button
235+
class="normal-button"
236+
(click)="
237+
$event.preventDefault();
238+
navigate(
239+
currentDimension,
240+
cardHeader,
241+
activity['activityName']
242+
)
243+
">
244+
{{ activity['activityName'] }}
245+
</button>
246+
</mat-panel-title>
247+
</mat-expansion-panel-header>
248+
<ng-template matExpansionPanelContent>
249+
<ul class="team-list">
250+
<li
251+
*ngFor="let item of activity.teamsImplemented | keyvalue">
252+
<mat-checkbox
253+
[checked]="item.value === true"
254+
color="primary"
255+
(click)="this.teamCheckbox(activityIndex, item.key)">
256+
{{ item.key }}
257+
</mat-checkbox>
258+
</li>
259+
</ul>
260+
</ng-template>
261+
</mat-expansion-panel>
262+
</mat-card-content>
263+
</mat-card>
264+
</div>
265+
214266
<button
215267
class="normal-button"
216268
mat-raised-button

src/app/component/circular-heatmap/circular-heatmap.component.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
33
import { ymlService } from 'src/app/service/yaml-parser/yaml-parser.service';
44
import { CircularHeatmapComponent } from './circular-heatmap.component';
55
import { RouterTestingModule } from '@angular/router/testing';
6+
import { MatChip } from '@angular/material/chips';
67

78
describe('CircularHeatmapComponent', () => {
89
let component: CircularHeatmapComponent;
@@ -15,6 +16,11 @@ describe('CircularHeatmapComponent', () => {
1516
declarations: [CircularHeatmapComponent],
1617
}).compileComponents();
1718
});
19+
beforeEach(async () => {
20+
TestBed.configureTestingModule({
21+
declarations: [MatChip],
22+
}).compileComponents();
23+
});
1824

1925
beforeEach(() => {
2026
fixture = TestBed.createComponent(CircularHeatmapComponent);

0 commit comments

Comments
 (0)