summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/footer/footer.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/footer/footer.component.ts')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/footer/footer.component.ts71
1 files changed, 71 insertions, 0 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/footer/footer.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/footer/footer.component.ts
new file mode 100644
index 00000000..7aae6d0b
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/footer/footer.component.ts
@@ -0,0 +1,71 @@
+import { Component, OnInit } from '@angular/core';
+import { ManifestService } from 'src/app/shared/services';
+import { environment } from 'src/environments/environment';
+
+
+declare var runAnalytics: any
+@Component({
+ selector: 'app-footer',
+ templateUrl: './footer.component.html',
+ styleUrls: ['./footer.component.scss']
+})
+export class FooterComponent implements OnInit {
+
+buildVersion: string;
+ api = environment;
+ brandName: string;
+ footerLink: string;
+ footerLinkText: string;
+ footerMessage: string;
+ footerLogoImagePath: string;
+ footerLogoText: string;
+
+ constructor(private manifest: ManifestService) { }
+
+ ngOnInit() {
+ this.buildVersion = '';
+ this.manifestDetails();
+
+ this.brandName = "ONAP Portal SDK";
+ if(this.api.brandName != ''){
+ this.brandName = this.api.brandName;
+ }
+ this.footerLink = this.api.footerLink;
+ this.footerLinkText = this.api.footerLinkText;
+ this.footerMessage= this.api.footerMessage;
+ if(this.api.footerLogoImagePath !=''){
+ this.footerLogoImagePath= this.api.footerLogoImagePath;
+ }
+ this.footerLogoText= this.api.footerLogoText;
+ this.portalHook();
+
+ }
+
+ manifestDetails() {
+ this.manifest.getManifest().subscribe((_res: any) => {
+ this.buildVersion = _res['Build-Number'];
+ }, (_err) => {
+
+ });
+ }
+
+ portalHook() {
+
+ let done = false;
+ let script = document.createElement('script');
+ script.src = "api/v3/analytics"
+ script.async = true;
+ script.onload = ()=> {
+ runAnalytics();
+ }
+
+ document.head.appendChild(script);
+
+ }
+ }
+
+
+
+
+
+ \ No newline at end of file