File tree Expand file tree Collapse file tree 2 files changed +24
-13
lines changed
src/app/component/circular-heatmap Expand file tree Collapse file tree 2 files changed +24
-13
lines changed Original file line number Diff line number Diff line change @@ -45,19 +45,7 @@ <h2>Nothing to show</h2>
4545 </ mat-panel-title >
4646 </ mat-expansion-panel-header >
4747 < ng-template matExpansionPanelContent >
48- < div
49- *ngIf ="
50- markdown.render(activityDetails.description);
51- else ifFileIsNotAMarkdown
52- ">
53- < p
54- [innerHTML] ="
55- markdown.render(activityDetails.description)
56- "> </ p >
57- </ div >
58- < ng-template #ifFileIsNotAMarkdown >
59- < p [innerHTML] ="activityDetails.description "> </ p >
60- </ ng-template >
48+ < p [innerHTML] ="activityDetails.description "> </ p >
6149 </ ng-template >
6250 </ mat-expansion-panel >
6351 < mat-expansion-panel
Original file line number Diff line number Diff line change @@ -746,6 +746,17 @@ export class CircularHeatmapComponent implements OnInit {
746746 }
747747 }
748748
749+ defineStringValues (
750+ dataToCheck : string ,
751+ valueOfDataIfUndefined : string
752+ ) : string {
753+ try {
754+ return this . markdown . render ( dataToCheck ) ;
755+ } catch {
756+ return valueOfDataIfUndefined ;
757+ }
758+ }
759+
749760 navigate ( dim : string , subdim : string , activityName : string ) {
750761 let navigationExtras = {
751762 dimension : dim ,
@@ -754,6 +765,18 @@ export class CircularHeatmapComponent implements OnInit {
754765 } ;
755766 this . yaml . setURI ( './assets/YAML/generated/generated.yaml' ) ;
756767 this . activityDetails = this . YamlObject [ dim ] [ subdim ] [ activityName ] ;
768+ this . activityDetails . description = this . defineStringValues (
769+ this . activityDetails . description ,
770+ this . activityDetails . description
771+ ) ;
772+ this . activityDetails . risk = this . defineStringValues (
773+ this . activityDetails . risk ,
774+ this . activityDetails . risk
775+ ) ;
776+ this . activityDetails . measure = this . defineStringValues (
777+ this . activityDetails . measure ,
778+ this . activityDetails . measure
779+ ) ;
757780 console . log ( this . YamlObject ) ;
758781 console . log ( this . YamlObject [ dim ] [ subdim ] ) ;
759782 if ( this . activityDetails ) {
You can’t perform that action at this time.
0 commit comments