[ACS-6251] remove dead code and imports from insights (#9059)

* remove dead code and imports from insights

* [ci:force] base class to reduce code duplications

* [ci:force] reduce code by introducing base class

* [ci:force] fix import paths

* [ci:force] fix types

* [ci:force] remove pdf from insights unit tests

* [ci:force] improve test performance

* remove obsolete mock file

* remove deleted export
This commit is contained in:
Denys Vuika
2023-11-06 11:30:49 +00:00
committed by GitHub
parent adf5a5e008
commit fe8f4a5e74
99 changed files with 617 additions and 1323 deletions

View File

@@ -26,7 +26,6 @@ import { AnalyticsGeneratorComponent } from './analytics-generator.component';
encapsulation: ViewEncapsulation.None
})
export class AnalyticsComponent implements OnChanges {
/** appId ID of the target app. */
@Input()
appId: number;
@@ -37,19 +36,19 @@ export class AnalyticsComponent implements OnChanges {
/** hideParameters. */
@Input()
hideParameters: boolean = false;
hideParameters = false;
/** emitted when editReport. */
@Output()
editReport = new EventEmitter();
editReport = new EventEmitter<string>();
/** emitted when reportSaved. */
@Output()
reportSaved = new EventEmitter();
reportSaved = new EventEmitter<string>();
/** emitted when reportDeleted. */
@Output()
reportDeleted = new EventEmitter();
reportDeleted = new EventEmitter<string>();
@ViewChild('analyticsGenerator', { static: true })
analyticsGenerator: AnalyticsGeneratorComponent;
@@ -60,8 +59,8 @@ export class AnalyticsComponent implements OnChanges {
this.analyticsGenerator.reset();
}
public showReport($event: any) {
this.analyticsGenerator.generateReport(`${this.reportId}`, $event);
public showReport(reportQuery: ReportQuery) {
this.analyticsGenerator.generateReport(`${this.reportId}`, reportQuery);
}
public reset() {
@@ -72,12 +71,11 @@ export class AnalyticsComponent implements OnChanges {
this.editReport.emit(name);
}
public onSaveReportSuccess(reportId) {
public onSaveReportSuccess(reportId: string) {
this.reportSaved.emit(reportId);
}
public onDeleteReportSuccess() {
this.reportDeleted.emit();
public onDeleteReportSuccess(reportId: string) {
this.reportDeleted.emit(reportId);
}
}