#1174 Refresh the report list after edit report title

This commit is contained in:
mauriziovitale84
2016-12-14 15:14:37 +00:00
parent a12c370cc7
commit 8bfa71bc48
7 changed files with 51 additions and 9 deletions

View File

@@ -57,13 +57,21 @@ export class AnalyticsReportListComponent implements OnInit {
this.reports.push(report);
});
this.getReportListByAppId();
this.getReportList();
}
/**
* Get the report list by app id
* Reload the component
*/
getReportListByAppId() {
reload() {
this.reset();
this.getReportList();
}
/**
* Get the report list
*/
getReportList() {
this.analyticsService.getReportList().subscribe(
(res: ReportParametersModel[]) => {
if (res && res.length === 0) {
@@ -108,6 +116,15 @@ export class AnalyticsReportListComponent implements OnInit {
return this.reports === undefined || (this.reports && this.reports.length === 0);
}
/**
* Reset the list
*/
private reset() {
if (!this.isReportsEmpty()) {
this.reports = [];
}
}
/**
* Select the current report
* @param report