Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion modules/ui/src/app/mocks/reports.mock.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HistoryTestrun, TestrunStatus } from '../model/testrun-status';
import { MatTableDataSource } from '@angular/material/table';
import { DeviceStatus } from '../model/device';
import { DeviceStatus, TestingType } from '../model/device';

export const HISTORY = [
{
Expand All @@ -12,6 +12,7 @@ export const HISTORY = [
model: '03-DIN-SRC',
mac_addr: '01:02:03:04:05:06',
firmware: '1.2.2',
test_pack: TestingType.Qualification,
},
report: 'https://api.testrun.io/report.pdf',
started: '2023-06-23T10:11:00.123Z',
Expand All @@ -26,6 +27,7 @@ export const HISTORY = [
model: '03-DIN-SRC',
mac_addr: '01:02:03:04:05:07',
firmware: '1.2.3',
test_pack: TestingType.Qualification,
},
report: 'https://api.testrun.io/report.pdf',
started: '2023-07-23T10:11:00.123Z',
Expand All @@ -40,6 +42,7 @@ export const HISTORY = [
model: '03-DIN-SRC',
mac_addr: '01:02:03:04:05:08',
firmware: '1.2.2',
test_pack: TestingType.Qualification,
},
report: 'https://api.testrun.io/report.pdf',
started: '2023-06-23T10:11:00.123Z',
Expand All @@ -57,6 +60,7 @@ export const HISTORY_AFTER_REMOVE = [
model: '03-DIN-SRC',
mac_addr: '01:02:03:04:05:06',
firmware: '1.2.2',
test_pack: TestingType.Qualification,
},
report: 'https://api.testrun.io/report.pdf',
started: '2023-06-23T10:11:00.123Z',
Expand All @@ -71,6 +75,7 @@ export const HISTORY_AFTER_REMOVE = [
model: '03-DIN-SRC',
mac_addr: '01:02:03:04:05:08',
firmware: '1.2.2',
test_pack: TestingType.Qualification,
},
report: 'https://api.testrun.io/report.pdf',
started: '2023-06-23T10:11:00.123Z',
Expand All @@ -88,13 +93,15 @@ export const FORMATTED_HISTORY = [
model: '03-DIN-SRC',
mac_addr: '01:02:03:04:05:06',
firmware: '1.2.2',
test_pack: TestingType.Qualification,
},
report: 'https://api.testrun.io/report.pdf',
started: '2023-06-23T10:11:00.123Z',
finished: '2023-06-23T10:17:10.123Z',
deviceFirmware: '1.2.2',
deviceInfo: 'Delta 03-DIN-SRC',
duration: '06m 10s',
program: 'Device Qualification',
},
{
status: 'compliant',
Expand All @@ -105,13 +112,15 @@ export const FORMATTED_HISTORY = [
model: '03-DIN-SRC',
mac_addr: '01:02:03:04:05:07',
firmware: '1.2.3',
test_pack: TestingType.Qualification,
},
report: 'https://api.testrun.io/report.pdf',
started: '2023-07-23T10:11:00.123Z',
finished: '2023-07-23T10:17:10.123Z',
deviceFirmware: '1.2.3',
deviceInfo: 'Delta 03-DIN-SRC',
duration: '06m 10s',
program: 'Device Qualification',
},
{
mac_addr: null,
Expand All @@ -122,13 +131,15 @@ export const FORMATTED_HISTORY = [
model: '03-DIN-SRC',
mac_addr: '01:02:03:04:05:08',
firmware: '1.2.2',
test_pack: TestingType.Qualification,
},
report: 'https://api.testrun.io/report.pdf',
started: '2023-06-23T10:11:00.123Z',
finished: '2023-06-23T10:17:10.123Z',
deviceFirmware: '1.2.2',
deviceInfo: 'Delta 03-DIN-SRC',
duration: '06m 10s',
program: 'Device Qualification',
},
];

Expand Down
1 change: 1 addition & 0 deletions modules/ui/src/app/model/testrun-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export interface TestrunStatus {
export interface HistoryTestrun extends TestrunStatus {
deviceFirmware: string;
deviceInfo: string;
program: string;
duration: string;
}

Expand Down
14 changes: 14 additions & 0 deletions modules/ui/src/app/pages/reports/reports.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,20 @@ <h2 class="title" tabindex="-1">Reports</h2>
<td *matCellDef="let data" mat-cell>{{ data.deviceFirmware }}</td>
</ng-container>

<!-- Program Column -->
<ng-container matColumnDef="program">
<th
*matHeaderCellDef
mat-header-cell
mat-sort-header
sortActionDescription="Sort by program type">
Program
</th>
<td *matCellDef="let data" mat-cell>
{{ data.program }}
</td>
</ng-container>

<!-- Result Column -->
<ng-container matColumnDef="status">
<th
Expand Down
1 change: 1 addition & 0 deletions modules/ui/src/app/pages/reports/reports.store.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ describe('ReportsStore', () => {
'duration',
'deviceInfo',
'deviceFirmware',
'program',
'status',
'report',
],
Expand Down
2 changes: 2 additions & 0 deletions modules/ui/src/app/pages/reports/reports.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ export class ReportsStore extends ComponentStore<ReportsComponentState> {
deviceFirmware: item.device.firmware,
deviceInfo: item.device.manufacturer + ' ' + item.device.model,
duration: this.getDuration(item.started, item.finished),
program: item.device.test_pack ?? '',
};
});
}
Expand Down Expand Up @@ -367,6 +368,7 @@ export class ReportsStore extends ComponentStore<ReportsComponentState> {
'duration',
'deviceInfo',
'deviceFirmware',
'program',
'status',
'report',
],
Expand Down