1 |
54479
|
myrto.kouk
|
/**
|
2 |
|
|
* Created by myrto on 11/24/17.
|
3 |
|
|
*/
|
4 |
|
|
import { Component, OnInit } from '@angular/core';
|
5 |
|
|
import { PiwikInfo } from '../../domain/typeScriptClasses';
|
6 |
|
|
import { ActivatedRoute, Router } from '@angular/router';
|
7 |
|
|
import { PiwikService } from '../../services/piwik.service';
|
8 |
|
|
import { AuthenticationService } from '../../services/authentication.service';
|
9 |
|
|
|
10 |
|
|
@Component ({
|
11 |
|
|
selector: 'app-metrics-instructions',
|
12 |
|
|
templateUrl: 'metrics-instructions.component.html'
|
13 |
|
|
})
|
14 |
|
|
|
15 |
|
|
export class MetricsInstructionsComponent implements OnInit {
|
16 |
|
|
piwik: PiwikInfo;
|
17 |
|
|
errorMessage: string;
|
18 |
|
|
|
19 |
|
|
constructor(
|
20 |
|
|
private route: ActivatedRoute,
|
21 |
|
|
private router: Router,
|
22 |
|
|
private piwikService: PiwikService,
|
23 |
|
|
private authService: AuthenticationService) {}
|
24 |
|
|
|
25 |
|
|
ngOnInit() {
|
26 |
|
|
this.getPiwik();
|
27 |
57129
|
stefania.m
|
let body = document.getElementsByTagName('body')[0];
|
28 |
|
|
body.classList.remove("top_bar_active"); //remove the class
|
29 |
57150
|
stefania.m
|
body.classList.remove("page_heading_active");
|
30 |
58065
|
stefania.m
|
body.classList.remove("landing");
|
31 |
|
|
body.classList.add("dashboard");
|
32 |
54479
|
myrto.kouk
|
}
|
33 |
|
|
|
34 |
|
|
getPiwik(): void {
|
35 |
|
|
const id = this.route.snapshot.paramMap.get('id');
|
36 |
|
|
this.piwikService.getPiwikInfo(id).subscribe(
|
37 |
|
|
piwik => this.piwik = piwik,
|
38 |
|
|
error => console.log(error),
|
39 |
57994
|
andreas.ma
|
() => {}
|
40 |
54479
|
myrto.kouk
|
);
|
41 |
|
|
}
|
42 |
|
|
|
43 |
|
|
}
|