-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from SRGSSR/develop
Release deeplink aggregation
- Loading branch information
Showing
40 changed files
with
1,931 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<div class="col-md-12"> | ||
<h2 class="text-center"> | ||
Deep link reports | ||
</h2> | ||
<p class="text-center">Only failed parsing urls are reported and ordered by JS version and count.</p> | ||
|
||
<table class="table table-striped"> | ||
<thead> | ||
<tr> | ||
<th *ngFor="let col of columns"> | ||
{{col}} | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr *ngFor="let deeplinkReport of deeplinkReports"> | ||
<td *ngFor="let col of columns"> | ||
{{deeplinkReport[col]}} | ||
</td> | ||
<td> | ||
<button class="btn btn-danger" (click)="deleteDeeplinkReport(deeplinkReport)">Delete</button> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { DeeplinkComponent } from './deeplink.component'; | ||
|
||
describe('DeeplinkComponent', () => { | ||
let component: DeeplinkComponent; | ||
let fixture: ComponentFixture<DeeplinkComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ DeeplinkComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(DeeplinkComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { Router } from '@angular/router'; | ||
|
||
import {DeeplinkReport} from '../models/deeplink-report.model'; | ||
import { DeeplinkService } from './deeplink.service'; | ||
|
||
@Component({ | ||
selector: 'app-user', | ||
templateUrl: './deeplink.component.html', | ||
styles: [] | ||
}) | ||
export class DeeplinkComponent implements OnInit { | ||
deeplinkReports: DeeplinkReport[]; | ||
columns: string[]; | ||
|
||
constructor(private router: Router, private deeplinkService: DeeplinkService) { | ||
|
||
} | ||
|
||
ngOnInit() { | ||
this.columns = this.deeplinkService.getColumns(); | ||
|
||
this.deeplinkService.getDeeplinkReports() | ||
.subscribe( data => { | ||
console.log(data); | ||
this.deeplinkReports = data; | ||
}); | ||
}; | ||
|
||
deleteDeeplinkReport(deeplinkReport: DeeplinkReport): void { | ||
this.deeplinkService.deleteDeeplinkReport(deeplinkReport) | ||
.subscribe( data => { | ||
this.deeplinkReports = this.deeplinkReports.filter(dr => dr !== deeplinkReport); | ||
}) | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import {Injectable} from '@angular/core'; | ||
import {HttpClient, HttpHeaders} from '@angular/common/http'; | ||
|
||
import {DeeplinkReport} from '../models/deeplink-report.model'; | ||
|
||
|
||
const httpOptions = { | ||
headers: new HttpHeaders({'Content-Type': 'application/json'}) | ||
}; | ||
|
||
@Injectable() | ||
export class DeeplinkService { | ||
|
||
constructor(private http: HttpClient) { | ||
} | ||
|
||
private deeplinkReportUrl = '/api/v1/deeplink/report'; | ||
|
||
public getDeeplinkReports() { | ||
return this.http.get<DeeplinkReport[]>(this.deeplinkReportUrl); | ||
} | ||
|
||
public deleteDeeplinkReport(deeplinkReport) { | ||
return this.http.delete(this.deeplinkReportUrl + "/" + deeplinkReport.id); | ||
} | ||
|
||
public getColumns() { | ||
return [ | ||
"id", | ||
"clientId", | ||
"clientTime", | ||
"count", | ||
"jsVersion", | ||
"url", | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export class DeeplinkReport { | ||
id: string; | ||
clientId: string; | ||
clientTime: string; | ||
count: number; | ||
jsVersion: number; | ||
url: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.