-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Outsource test device data to a separate file.
- Loading branch information
1 parent
5af4c20
commit 3a3fd64
Showing
8 changed files
with
125 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
web/src/app/pages/devices/devices-manage/devices-manage.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<div class="row"> | ||
<div class="col-6"> | ||
<div class="card"> | ||
<div class="card-body"> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
<div class="col-6"> | ||
|
||
</div> | ||
</div> |
Empty file.
23 changes: 23 additions & 0 deletions
23
web/src/app/pages/devices/devices-manage/devices-manage.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { DevicesManageComponent } from './devices-manage.component'; | ||
|
||
describe('DevicesManageComponent', () => { | ||
let component: DevicesManageComponent; | ||
let fixture: ComponentFixture<DevicesManageComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [DevicesManageComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(DevicesManageComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
20 changes: 20 additions & 0 deletions
20
web/src/app/pages/devices/devices-manage/devices-manage.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Component } from '@angular/core'; | ||
import {Device} from "../../../services/device.service"; | ||
import {dummyDevices} from "../../../../../test/data/devices"; | ||
|
||
@Component({ | ||
selector: 'app-devices-manage', | ||
standalone: true, | ||
imports: [], | ||
templateUrl: './devices-manage.component.html', | ||
styleUrl: './devices-manage.component.scss' | ||
}) | ||
export class DevicesManageComponent { | ||
public device: Device | undefined; | ||
|
||
constructor() { | ||
this.device = dummyDevices[0]; | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import {Device, DeviceIcon, ProtectionStatus} from "../../src/app/services/device.service"; | ||
|
||
export const dummyDevices: Device[] = [ | ||
{ | ||
id: 1, | ||
name: "Test Server 1", | ||
connection: true, | ||
icon: DeviceIcon.SERVER, | ||
selected: false, | ||
lastBackup: "25.12.2023 13:55", | ||
protection: ProtectionStatus.OK, | ||
agent: "OpenSSH_6.6.1p1", | ||
ip_addresses: ["127.0.0.2"], | ||
os: { | ||
osName: "Ubuntu 22.04", | ||
cpu: "AMD Epyc 7402P", | ||
ram: "64 GB RAM", | ||
totalHarddrive: "1 TB" | ||
}, | ||
machineIdentifier: "33970533-952c-43e9-a999-27f5ba1c655c", | ||
backupPlans: [] | ||
}, | ||
{ | ||
id: 2, | ||
name: "Test Server 2", | ||
connection: true, | ||
icon: DeviceIcon.SERVER, | ||
selected: false, | ||
lastBackup: "22.12.2023 09:33", | ||
protection: ProtectionStatus.WARNING, | ||
agent: "OpenSSH_6.6.1p1", | ||
ip_addresses: ["127.0.0.2", "182.322.33.134"], | ||
os: { | ||
osName: "Ubuntu 22.04", | ||
cpu: "AMD Epyc 7402P", | ||
ram: "64 GB RAM", | ||
totalHarddrive: "1 TB" | ||
}, | ||
comment: "Hello World, this is a description of this device. How are you? How long could this text can be?", | ||
machineIdentifier: "33970533-952c-43e9-a999-27f5ba1c655c", | ||
backupPlans: [] | ||
}, | ||
{ | ||
id: 3, | ||
name: "Test Computer", | ||
connection: false, | ||
icon: DeviceIcon.COMPUTER, | ||
selected: false, | ||
lastBackup: "25.12.2023 11:15", | ||
protection: ProtectionStatus.ERROR, | ||
agent: "OpenSSH_6.6.1p1", | ||
ip_addresses: ["127.0.0.2"], | ||
os: { | ||
osName: "Ubuntu 22.04", | ||
cpu: "AMD Epyc 7402P", | ||
ram: "64 GB RAM", | ||
totalHarddrive: "1 TB" | ||
}, | ||
machineIdentifier: "33970533-952c-43e9-a999-27f5ba1c655c", | ||
backupPlans: [] | ||
}, | ||
] |