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
1 change: 1 addition & 0 deletions modules/ui/src/app/mocks/progress.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ const PROGRESS_DATA_RESPONSE = (
) => {
return {
status,
mac_addr: '01:02:03:04:05:06',
device: {
manufacturer: 'Delta',
model: '03-DIN-CPU',
Expand Down
5 changes: 5 additions & 0 deletions modules/ui/src/app/mocks/reports.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { MatTableDataSource } from '@angular/material/table';

export const HISTORY = [
{
mac_addr: '01:02:03:04:05:06',
status: 'compliant',
device: {
manufacturer: 'Delta',
Expand All @@ -16,6 +17,7 @@ export const HISTORY = [
},
{
status: 'compliant',
mac_addr: '01:02:03:04:05:07',
device: {
manufacturer: 'Delta',
model: '03-DIN-SRC',
Expand All @@ -30,6 +32,7 @@ export const HISTORY = [

export const HISTORY_AFTER_REMOVE = [
{
mac_addr: '01:02:03:04:05:06',
status: 'compliant',
device: {
manufacturer: 'Delta',
Expand All @@ -49,6 +52,7 @@ export const HISTORY_AFTER_REMOVE = [
export const FORMATTED_HISTORY = [
{
status: 'compliant',
mac_addr: '01:02:03:04:05:06',
device: {
manufacturer: 'Delta',
model: '03-DIN-SRC',
Expand All @@ -64,6 +68,7 @@ export const FORMATTED_HISTORY = [
},
{
status: 'compliant',
mac_addr: '01:02:03:04:05:07',
device: {
manufacturer: 'Delta',
model: '03-DIN-SRC',
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 @@ -16,6 +16,7 @@
import { Device } from './device';

export interface TestrunStatus {
mac_addr: string;
status: string;
device: IDevice;
started: string | null;
Expand Down
2 changes: 1 addition & 1 deletion modules/ui/src/app/pages/reports/history.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export class HistoryComponent implements OnInit, OnDestroy {

removeDevice(data: TestrunStatus) {
this.store.deleteReport({
mac_addr: data.device.mac_addr,
mac_addr: data.mac_addr,
started: data.started,
});
this.focusNextButton();
Expand Down
3 changes: 1 addition & 2 deletions modules/ui/src/app/pages/reports/reports.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,7 @@ export class ReportsStore extends ComponentStore<ReportsComponentState> {
) {
const history = current;
const idx = history.findIndex(
report =>
report.device.mac_addr === mac_addr && report.started === started
report => report.mac_addr === mac_addr && report.started === started
);
if (typeof idx === 'number') {
history.splice(idx, 1);
Expand Down