Skip to content

Commit afd60f8

Browse files
committed
Adjustments before demo
1 parent 06ae2e8 commit afd60f8

10 files changed

Lines changed: 43 additions & 161 deletions

File tree

src/app/app.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<mat-icon>menu</mat-icon>
1313
</button>
1414
<div class="tag-line">
15-
<div class="tag-title">Alpha v4 edition</div>
15+
<div class="tag-title">{{ title || defaultTitle }}</div>
1616
<div class="tag-subtitle">{{ subtitle }}</div>
1717
</div>
1818
<div class="dummy"></div>

src/app/app.component.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ describe('AppComponent', () => {
2323
expect(app).toBeTruthy();
2424
});
2525

26-
it(`should have as title 'DSOMM'`, () => {
27-
expect(app.title).toEqual('DSOMM');
28-
});
29-
3026
it('check for fork me on github ribbon generation', () => {
3127
const fixture = TestBed.createComponent(AppComponent);
3228
const HTMLElement: HTMLElement = fixture.nativeElement;

src/app/app.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import { ThemeService } from './service/theme.service';
77
styleUrls: ['./app.component.css'],
88
})
99
export class AppComponent implements OnInit {
10-
title = 'DSOMM';
10+
title = '';
11+
defaultTitle = 'DSOMM beta edition';
1112
subtitle = '';
1213
menuIsOpen: boolean = true;
1314

src/app/model/meta-store.ts

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ const fallbackMetaStrings: MetaStrings = {
1515
knowledgeLabels: ['Low', 'Medium', 'High'],
1616
};
1717

18-
const LOCALSTORAGE_KEY: string = 'meta';
19-
const PROGRESS_DEFINITIONS_KEY: string = 'progressDefinitions';
18+
const STORAGE_TEAMS_KEY: string = 'meta.teams';
19+
const STORAGE_GROUPS_KEY: string = 'meta.teamGroups';
20+
const STORAGE_PROGRESS_DEFINITIONS_KEY: string = 'meta.progressDefinitions';
2021

2122
export class MetaStore {
2223
private yamlService: YamlService = new YamlService();
@@ -71,16 +72,16 @@ export class MetaStore {
7172

7273
public saveProgressDefinition(definitions: ProgressDefinitions): void {
7374
this.progressDefinition = definitions;
74-
localStorage.setItem(PROGRESS_DEFINITIONS_KEY, JSON.stringify(definitions));
75+
localStorage.setItem(STORAGE_PROGRESS_DEFINITIONS_KEY, JSON.stringify(definitions));
7576
}
7677

7778
public resetProgressDefinition(): void {
7879
this.progressDefinition = { ...this.defaultProgressDefinition };
79-
localStorage.removeItem(PROGRESS_DEFINITIONS_KEY);
80+
localStorage.removeItem(STORAGE_PROGRESS_DEFINITIONS_KEY);
8081
}
8182

8283
private loadStoredProgressDefinition(): void {
83-
const stored = localStorage.getItem(PROGRESS_DEFINITIONS_KEY);
84+
const stored = localStorage.getItem(STORAGE_PROGRESS_DEFINITIONS_KEY);
8485
if (stored) {
8586
try {
8687
this.progressDefinition = JSON.parse(stored);
@@ -96,35 +97,42 @@ export class MetaStore {
9697
public updateTeamsAndGroups(teams: TeamNames, teamGroups: TeamGroups): void {
9798
this.teams = teams;
9899
this.teamGroups = teamGroups;
99-
this.saveToLocalStorage();
100+
this.saveTeamsAndGroups();
100101
}
101102

102103
public asStorableYamlString(): string {
103104
return this.yamlService.stringify({ teams: this.teams, teamGroups: this.teamGroups });
104105
}
105106

106-
public saveToLocalStorage() {
107-
let yamlStr: string = this.asStorableYamlString();
108-
localStorage.setItem(LOCALSTORAGE_KEY, yamlStr);
107+
public saveTeamsAndGroups() {
108+
let yamlStr: string = this.yamlService.stringify(this.teams);
109+
localStorage.setItem(STORAGE_TEAMS_KEY, yamlStr);
110+
yamlStr = this.yamlService.stringify(this.teamGroups);
111+
localStorage.setItem(STORAGE_GROUPS_KEY, yamlStr);
109112
this.hasLocalStorage = true;
110113
}
111114

112-
public deleteLocalStorage() {
113-
localStorage.removeItem(LOCALSTORAGE_KEY);
115+
public deleteTeamsAndGroups() {
116+
localStorage.removeItem(STORAGE_TEAMS_KEY);
117+
localStorage.removeItem(STORAGE_GROUPS_KEY);
114118
this.hasLocalStorage = false;
115119
}
116120

117-
public loadStoredMeta(): void {
118-
let storedMeta: string | null = localStorage.getItem(LOCALSTORAGE_KEY);
119-
if (storedMeta) {
120-
try {
121-
let metaData = this.yamlService.parse(storedMeta);
122-
this.addMeta(metaData);
123-
this.hasLocalStorage = true;
124-
console.log('Loaded stored meta from localStorage');
125-
} catch (error) {
126-
console.error('Failed to load stored meta from localStorage:', error);
127-
}
121+
public loadTeamsAndGroups(): void {
122+
let storedTeams: string | null = localStorage.getItem(STORAGE_TEAMS_KEY);
123+
let storedGroups: string | null = localStorage.getItem(STORAGE_GROUPS_KEY);
124+
try {
125+
let metaTeams: TeamNames | null = null;
126+
let metaGroups: TeamGroups | null = null;
127+
128+
if (storedTeams) metaTeams = this.yamlService.parse(storedTeams);
129+
if (storedGroups) metaGroups = this.yamlService.parse(storedGroups);
130+
131+
this.addMeta({ teams: metaTeams, teamGroups: metaGroups });
132+
this.hasLocalStorage = true;
133+
console.log('Loaded stored meta from localStorage');
134+
} catch (error) {
135+
console.error('Failed to load stored meta from localStorage:', error);
128136
}
129137
}
130138

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,28 +107,25 @@
107107
display: none;
108108
}
109109
.team-list {
110-
display: table;
111110
width: 100%;
112111
list-style: none;
113112
padding: 0;
114113
margin: 0;
115114
}
116115
.team-list li {
117-
display: table-row;
116+
display: grid;
117+
grid-template-columns: minmax(100px, auto) 1fr;
118+
gap: 16px;
118119
align-items: center;
119120
margin-bottom: 8px;
120121
}
121122
.team-label {
122-
display: table-cell;
123123
white-space: nowrap;
124-
padding-right: 16px;
125-
vertical-align: middle;
126124
text-align: right;
127125
font-size: smaller;
128126
}
129-
progress-slider {
130-
display: table-cell;
131-
vertical-align: middle;
127+
app-progress-slider {
128+
width: 100%;
132129
}
133130
.mat-chip-list {
134131
display: flex;

src/app/pages/teams/teams.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export class TeamsComponent implements OnInit, AfterViewInit {
163163
let buttonClicked: string = await this.displayDeleteBrowserTeamsDialog();
164164

165165
if (buttonClicked === 'Delete') {
166-
this.dataStore?.meta?.deleteLocalStorage();
166+
this.dataStore?.meta?.deleteTeamsAndGroups();
167167
location.reload(); // Make sure all load routines are initialized
168168
}
169169
}

src/app/service/loader/data-loader.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export class LoaderService {
7474
}
7575
const meta: MetaStore = new MetaStore();
7676
meta.init(await this.yamlService.loadYaml(this.META_FILE));
77-
meta.loadStoredMeta();
77+
meta.loadTeamsAndGroups();
7878

7979
if (!meta.activityFiles) {
8080
throw Error("The meta.yaml has no 'activityFiles' to be loaded");

src/assets/YAML/meta.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ browserSettings:
44
changeProgressionDefinition: true
55

66

7-
teamProgressFile: 'team-progress-default.yaml'
7+
teamProgressFile: 'team-progress.yaml'
88
progressDefinition:
99
Not implemented:
1010
score: 0%
@@ -14,7 +14,7 @@ progressDefinition:
1414
definition: Activity has been put in the backlog but not yet started
1515
Started:
1616
score: 40%
17-
definition: Activity has been started and is partly implemented
17+
definition: Activity has been started for at least one application
1818
Fully implemented:
1919
score: 100%
2020
definition: Fully implemented

src/assets/YAML/team-progress-default.yaml

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/assets/YAML/team-progress.yaml

Lines changed: 1 addition & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,120 +1,2 @@
1+
# Export team progress from the browser, and replace this file
12
progress:
2-
a340f46b-6360-4cb8-847b-a0d3483d09d3: # Building and testing of artifacts in virtual environments
3-
'Team A':
4-
'Planned': 2025-01-01
5-
'Started': 2025-02-01
6-
'Team B':
7-
'Planned': 2025-03-01
8-
'Started': 2025-04-01
9-
'Team D':
10-
'Planned': 2025-04-01
11-
'Implemented': 2025-05-01
12-
'Not referenced':
13-
'Planned': 2000-01-01
14-
'Started': 2000-07-01
15-
'Implemented': 2000-12-31
16-
f6f7737f-25a9-4317-8de2-09bf59f29b5b: # Defined build process
17-
'Team B':
18-
'Planned': 2025-01-01
19-
'Started': 2025-02-01
20-
'Team C':
21-
'Planned': 2025-03-01
22-
'Started': 2025-04-01
23-
'Implemented': 2025-05-01
24-
'Team D':
25-
'Planned': 2025-04-01
26-
'Team A':
27-
'Planned': 2025-07-13
28-
3d1f4c3b-f713-46d9-933a-54a014a26c03: # Simple system metrics
29-
'Team D':
30-
'Implemented': 2025-05-22
31-
'Started': 2025-05-12
32-
'Planned': 2025-02-23
33-
'Team C':
34-
'Implemented': 2025-08-22
35-
'Started': 2025-06-12
36-
'Planned': 2025-05-21
37-
'Team B':
38-
'Implemented': 2025-05-31
39-
'Started': 2025-05-14
40-
'Planned': 2025-05-01
41-
'Team A':
42-
'Implemented': 2025-01-08
43-
'Started': 2025-01-08
44-
'Planned': 2025-01-08
45-
f08a3219-6941-43ec-8762-4aff739f4664: # Simple budget metrics
46-
'Team D':
47-
'Implemented': 2025-07-24
48-
'Started': 2025-07-20
49-
'Planned': 2025-07-12
50-
'Team C':
51-
'Implemented': 2025-07-25
52-
'Started': 2025-06-12
53-
'Planned': 2025-06-12
54-
'Team B':
55-
'Implemented': 2025-06-25
56-
'Started': 2025-05-22
57-
'Planned': 2025-05-12
58-
'Team A':
59-
'Implemented': 2025-05-12
60-
'Started': 2025-04-22
61-
'Planned': 2025-04-01
62-
e9a6d403-a467-445e-b98a-74f0c29da0b1: # Simple application metrics
63-
'Team D':
64-
'Implemented': 2025-07-12
65-
'Started': 2025-07-02
66-
'Planned': 2025-06-22
67-
'Team C':
68-
'Implemented': 2025-07-21
69-
'Started': 2025-07-19
70-
'Planned': 2025-06-22
71-
'Team B':
72-
'Implemented': 2025-08-22
73-
'Started': 2025-07-29
74-
'Planned': 2025-06-22
75-
'Team A':
76-
'Implemented': 2025-04-01
77-
'Started': 2025-03-13
78-
'Planned': 2025-03-01
79-
4eced38a-7904-4c45-adb0-50b663065540: # Centralized system logging
80-
'Team B':
81-
'Planned': 2025-05-22
82-
'Team C':
83-
'Started': 2025-05-22
84-
'Planned': 2025-05-22
85-
'Team D':
86-
'Implemented': 2025-05-24
87-
'Started': 2025-05-22
88-
'Planned': 2025-05-22
89-
74938a3f-1269-49b9-9d0f-c43a79a1985a: # Defined deployment process
90-
'Team A':
91-
'Started': 2025-01-01
92-
'Planned': 2025-01-01
93-
'Team B':
94-
'Planned': 2025-08-22
95-
'Team C':
96-
'Started': 2025-08-22
97-
'Planned': 2025-07-19
98-
'Team D':
99-
'Planned': 2025-01-22
100-
2a44b708-734f-4463-b0cb-86dc46344b2f: # Inventory of production components
101-
'Team A':
102-
'Planned': 2025-03-22
103-
'Team B':
104-
'Planned': 2025-03-22
105-
'Team C':
106-
'Started': 2025-05-17
107-
'Planned': 2025-03-22
108-
'Team D':
109-
'Started': 2025-06-12
110-
'Planned': 2025-03-22
111-
9f107927-61e9-4574-85ad-3f2b4bca8665: # Signing of code
112-
'Team A':
113-
'Implemented': 2025-04-22
114-
'Started': 2025-03-12
115-
'Planned': 2025-03-02
116-
'Team B':
117-
'Started': 2025-06-02
118-
'Planned': 2025-04-04
119-
'Team C':
120-
'Planned': 2025-09-22

0 commit comments

Comments
 (0)