Skip to content
Open
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
11 changes: 1 addition & 10 deletions src/app/component/modal-message/modal-message.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,7 @@ export class ModalMessageComponent implements OnInit {

DSOMM_host: string = 'https://github.com/devsecopsmaturitymodel';
DSOMM_url: string = `${this.DSOMM_host}/DevSecOps-MaturityModel-data`;
meassageTemplates: Record<string, DialogInfo> = {
generated_yaml: new DialogInfo(
`{message}\n\n` +
`Please download the activity template \`generated.yaml\` ` +
`from [DSOMM-data](${this.DSOMM_url}) on GitHub.\n\n` +
'The DSOMM activities are maintained and distributed ' +
'separately from the software.',
'DSOMM startup problems'
),
};
meassageTemplates: Record<string, DialogInfo> = {};

constructor(
public dialog: MatDialog,
Expand Down
18 changes: 6 additions & 12 deletions src/app/service/loader/data-loader.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,12 @@ export class LoaderService {
private async loadActivities(meta: MetaStore): Promise<ActivityStore> {
const activityStore = new ActivityStore();
const errors: string[] = [];
let usingLegacyYamlFile = false;

if (meta.activityFiles.length == 0) {
throw new MissingModelError('No `activityFiles` are specified in `meta.yaml`.');
}
for (let filename of meta.activityFiles) {
if (this.debug) console.log(`${perfNow()}s: Loading activity file: ${filename}`);
usingLegacyYamlFile ||= filename.endsWith('generated/generated.yaml');

const response: ActivityFile = await this.loadActivityFile(filename);

Expand All @@ -173,16 +171,12 @@ export class LoaderService {
// Handle validation errors
if (errors.length > 0) {
errors.forEach(error => console.error(error));

// Legacy generated.yaml has several data validation problems. Do not report these
if (!usingLegacyYamlFile) {
throw new DataValidationError(
'Data validation error after loading: ' +
filename +
'\n\n----\n\n' +
errors.join('\n\n')
);
}
throw new DataValidationError(
'Data validation error after loading: ' +
filename +
'\n\n----\n\n' +
errors.join('\n\n')
);
}
}
return activityStore;
Expand Down
3 changes: 1 addition & 2 deletions src/assets/YAML/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ teamGroups:
$ref: 'default/teams.yaml#/teamGroups'

activityFiles:
# - generated/generated.yaml # Old structure - No longer used
- default/model.yaml
- default/model.yaml
# - custom/custom-activities.yaml # For customizing your own activities


Expand Down