Skip to content

Commit e5a2a2f

Browse files
committed
readme refresh done
1 parent 7f1ff48 commit e5a2a2f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Analysim.Web/ClientApp/src/app/projects/project/project.component.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,19 @@ export class ProjectComponent implements OnInit {
176176
closeDisplayNotebookModal() {
177177
this.displayNotebookModalRef.hide();
178178
this.router.navigate([this.router.url.split('/').slice(0,5).join('/')])
179+
this.projectService.getNotebookVersions(this.readmeNotebook).subscribe(versions => {
180+
this.versions = versions;
181+
// console.log("Versions: ", this.versions);
182+
if (this.versions.length > 0) {
183+
this.latestVersion = this.versions[0]; // Default to the latest version
184+
}
185+
// console.log("the loatest version : ", this.latestVersion);
186+
this.projectService.getNotebookFile(this.readmeNotebook, this.latestVersion).subscribe(
187+
notebookJson => {
188+
// console.log("the notebook content is : ", notebookJson);
189+
this.notebookContent = this.sanitizer.bypassSecurityTrustHtml(this.renderNotebook(notebookJson));
190+
});
191+
});
179192
}
180193

181194
renderNotebook(notebookJson: any): string {

0 commit comments

Comments
 (0)