Skip to content

Commit

Permalink
clean console
Browse files Browse the repository at this point in the history
  • Loading branch information
antonin77 committed Dec 9, 2024
1 parent 1e5f9fd commit 0ee6bdb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
1 change: 0 additions & 1 deletion src/app/views/detail/database/detail-database.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ export class DetailDatabaseView implements OnInit, OnDestroy {
title: `<span>${this.pipe.transform(new Date(c.start * 1000), 'HH:mm:ss.SSS')} - ${this.pipe.transform(new Date(c.end * 1000), 'HH:mm:ss.SSS')}</span> (${this.durationPipe.transform({start: c.start, end: c.end})})<br>
<h4>${c.count ? c.count : ''}</h4>`
}
console.log(item);
item.type = item.end <= item.start ? 'point' : 'range' // TODO : change this to equals dh_dbt is set to timestamps(6), currently set to timestmap(3)
if (c.exception?.message || c.exception?.type) {
item.className = 'bdd-failed';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@ export class StatisticExceptionTableComponent {

@ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort;
/*.slice(0, 5).map((r: {count: number, errorType: string}) => {
const index = r?.errorType.lastIndexOf('.') + 1;
return { count: r.count, class: r?.errorType?.substring(index) };
})*/

@Input() set data(objects: any) {
console.log(objects)
if (objects?.length) { //.pipe(map((d: any) => d.slice(0, 5)))
if (objects?.length) {
this.dataSource = new MatTableDataSource(objects);
this.dataSource.paginator = this.paginator;
this.dataSource.sort = this.sort;
Expand Down
16 changes: 8 additions & 8 deletions src/app/views/statistic/database/statistic-database.view.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,28 @@
</header-page>

<div style="display: flex; justify-content: space-between; gap: 1em; margin-bottom: 1em;">
<chart type="area" [config]="constants.REPARTITION_REQUEST_BY_PERIOD_LINE" [data]="requests?.repartitionRequestByPeriodLine?.data"
<chart type="area" [config]="constants.REPARTITION_REQUEST_BY_PERIOD_LINE" [data]="requests?.repartitionRequestByPeriodLine?.data || []"
[isLoading]="requests.repartitionRequestByPeriodLine?.isLoading" style="width:33%" class="mat-elevation-z5" />
<chart type="area" [config]="constants.REPARTITION_REQUEST_ERROR_BY_PERIOD_LINE" [data]="requests?.repartitionRequestByPeriodLine?.data"
<chart type="area" [config]="constants.REPARTITION_REQUEST_ERROR_BY_PERIOD_LINE" [data]="requests?.repartitionRequestByPeriodLine?.data || []"
[isLoading]="requests.repartitionRequestByPeriodLine?.isLoading" style="width:33%" class="mat-elevation-z5" />
<chart type="area" [config]="constants.REPARTITION_REQUEST_SLOWEST_BY_PERIOD_LINE" [data]="requests?.repartitionRequestByPeriodLine?.data"
<chart type="area" [config]="constants.REPARTITION_REQUEST_SLOWEST_BY_PERIOD_LINE" [data]="requests?.repartitionRequestByPeriodLine?.data || []"
[isLoading]="requests.repartitionRequestByPeriodLine?.isLoading" style="width:33%" class="mat-elevation-z5" />
</div>

<div style="display: flex; justify-content: space-between; gap: 1em; margin-bottom: 1em;" class="mat-elevation-z5">
<chart style="width: 70%;" type="column" [config]="constants.REPARTITION_SPEED_BAR"
[data]="requests.repartitionTimeByPeriodBar?.data" [isLoading]="requests.repartitionTimeByPeriodBar?.isLoading" />
[data]="requests.repartitionTimeByPeriodBar?.data || []" [isLoading]="requests.repartitionTimeByPeriodBar?.isLoading" />
<mat-divider style="margin-top: 5em; margin-bottom: 5em;" [vertical]="true"></mat-divider>
<chart style="width: 30%;" type="pie" [config]="constants.REPARTITION_SPEED_PIE"
[data]="requests.repartitionTimePie?.data" [isLoading]="requests.repartitionTimePie?.isLoading" />
[data]="requests.repartitionTimePie?.data || []" [isLoading]="requests.repartitionTimePie?.isLoading" />
</div>

<div style="display: flex; justify-content: space-between; gap: 1em; margin-bottom: 1em;" class="mat-elevation-z5">
<div style="width:100%">
<!-- <div line-chart [config]="countOKLineChartConfig" [data]="countMinMaxAvg" ></div> -->
<chart type="line" [config]="constants.REPARTITION_MAX_BY_PERIOD_LINE" [data]="requests.repartitionTimeByPeriodBar?.data"
<chart type="line" [config]="constants.REPARTITION_MAX_BY_PERIOD_LINE" [data]="requests.repartitionTimeByPeriodBar?.data || []"
[isLoading]="requests.repartitionTimeByPeriodBar?.isLoading" />
<chart type="line" [config]="constants.REPARTITION_AVG_BY_PERIOD_LINE" [data]="requests.repartitionTimeByPeriodBar?.data"
<chart type="line" [config]="constants.REPARTITION_AVG_BY_PERIOD_LINE" [data]="requests.repartitionTimeByPeriodBar?.data || []"
[isLoading]="requests.repartitionTimeByPeriodBar?.isLoading" />
</div>
</div>
Expand All @@ -54,7 +54,7 @@
[isLoading]="requests.usersInfo?.isLoading" />
</div> -->
<div style="margin-bottom: 1em;">
<exception-table [data]="requests.exceptions?.data" [isLoading]="requests.exceptions?.isLoading"></exception-table>
<exception-table [data]="requests.exceptions?.data || []" [isLoading]="requests.exceptions?.isLoading"></exception-table>
</div>

<!-- <div style="display: flex; justify-content: space-between; gap: 1em; margin-bottom: 1em;">
Expand Down

0 comments on commit 0ee6bdb

Please sign in to comment.