Skip to content
Snippets Groups Projects
Commit 40370021 authored by Igor Ignác's avatar Igor Ignác
Browse files

Merge branch 'adaptive-model-simulator-adjustments' into 'master'

Adaptive model simulator adjustments

See merge request muni-kypo-crp/frontend-angular/apis/kypo-training-api!66
parents e37ae3e3 2a98eefc
Branches
Tags
No related merge requests found
13.0.7 Export phase mapper and abstract phase dto for from public api.
13.0.6 Added field that marks if current level of training run has been answered. 13.0.6 Added field that marks if current level of training run has been answered.
13.0.5 Fix MITRE techniques mapping. 13.0.5 Fix MITRE techniques mapping.
13.0.4 Added support for movement between already finished levels. 13.0.4 Added support for movement between already finished levels.
......
...@@ -47,7 +47,9 @@ export class TrainingLevelMapper { ...@@ -47,7 +47,9 @@ export class TrainingLevelMapper {
result.variant_answers = trainingLevel.variantAnswers; result.variant_answers = trainingLevel.variantAnswers;
result.hints = HintMapper.toDTOs(trainingLevel.hints); result.hints = HintMapper.toDTOs(trainingLevel.hints);
result.reference_solution = ReferenceSolutionNodeMapper.toDTOs(trainingLevel.referenceSolution); result.reference_solution = ReferenceSolutionNodeMapper.toDTOs(trainingLevel.referenceSolution);
result.mitre_techniques = MitreTechniqueMapper.toDTOs(trainingLevel.mitreTechniques); if (trainingLevel.mitreTechniques) {
result.mitre_techniques = MitreTechniqueMapper.toDTOs(trainingLevel.mitreTechniques);
}
result.expected_commands = trainingLevel.expectedCommands; result.expected_commands = trainingLevel.expectedCommands;
return result; return result;
} }
......
...@@ -44,7 +44,9 @@ export class TrainingPhaseMapper { ...@@ -44,7 +44,9 @@ export class TrainingPhaseMapper {
result.title = phase.title; result.title = phase.title;
result.decision_matrix = this.mapDecisionMatrixToDTO(phase.decisionMatrix); result.decision_matrix = this.mapDecisionMatrixToDTO(phase.decisionMatrix);
result.tasks = TaskMapper.toUpdateDTOs(phase.tasks); result.tasks = TaskMapper.toUpdateDTOs(phase.tasks);
result.mitre_techniques = MitreTechniqueMapper.toDTOs(phase.mitreTechniques); if (phase.mitreTechniques) {
result.mitre_techniques = MitreTechniqueMapper.toDTOs(phase.mitreTechniques);
}
result.expected_commands = phase.expectedCommands; result.expected_commands = phase.expectedCommands;
return result; return result;
} }
......
...@@ -6,6 +6,8 @@ export * from './lib/kypo-training-api.module'; ...@@ -6,6 +6,8 @@ export * from './lib/kypo-training-api.module';
export * from './lib/other/kypo-training-api-config'; export * from './lib/other/kypo-training-api-config';
export * from './lib/dto/training-definition/training-definition-dto'; export * from './lib/dto/training-definition/training-definition-dto';
export * from './lib/mappers/training-definition/training-definition-mapper'; export * from './lib/mappers/training-definition/training-definition-mapper';
export * from './lib/mappers/phase/phase-mapper';
export * from './lib/dto/phase/abstract-phase-dto';
// API ABSTRACT SERVICES // API ABSTRACT SERVICES
export * from './lib/api/definition/training-definition-api.service'; export * from './lib/api/definition/training-definition-api.service';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment