From 762f6a3223d897e9231e864e32728b582e30232a Mon Sep 17 00:00:00 2001 From: Eugenio Romano Date: Wed, 7 Jun 2017 07:32:56 +0100 Subject: [PATCH] add info and link on current last git commit (#1940) --- .../app/components/about/about.component.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/demo-shell-ng2/app/components/about/about.component.ts b/demo-shell-ng2/app/components/about/about.component.ts index de70fee740..4d7fa53321 100644 --- a/demo-shell-ng2/app/components/about/about.component.ts +++ b/demo-shell-ng2/app/components/about/about.component.ts @@ -34,6 +34,8 @@ export class AboutComponent implements OnInit { ecmHost: string = ''; bpmHost: string = ''; + githubUrlCommitAlpha: string = 'https://github.com/Alfresco/alfresco-ng2-components/commits/'; + constructor(private http: Http, private appConfig: AppConfigService, private logService: LogService) { @@ -86,4 +88,19 @@ export class AboutComponent implements OnInit { } } } + + private gitHubLinkCreation(alfrescoPackagesTableRepresentation): void { + let corePackage = alfrescoPackagesTableRepresentation.find((packageUp) => { + return packageUp.name === 'ng2-alfresco-core'; + }); + + if (corePackage) { + let commitIsh = corePackage.version.split('-'); + if (commitIsh.length > 1) { + this.githubUrlCommitAlpha = this.githubUrlCommitAlpha + commitIsh; + } else { + this.githubUrlCommitAlpha = this.githubUrlCommitAlpha + corePackage.version; + } + } + } }