refs #1922. Show new fields in clients table
testing/ogGui-multibranch/pipeline/head This commit looks good
Details
testing/ogGui-multibranch/pipeline/head This commit looks good
Details
parent
c7919cf412
commit
a0d833726d
|
@ -348,9 +348,22 @@
|
|||
<th mat-header-cell *matHeaderCellDef mat-sort-header>IP </th>
|
||||
<td mat-cell *matCellDef="let client" matTooltip="{{ getClientPath(client) }}"
|
||||
matTooltipPosition="left" matTooltipShowDelay="500">
|
||||
{{ client.ip }}
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
<span>{{ client.ip }}</span>
|
||||
<span style="font-size: 0.75rem; color: gray;">{{ client.mac }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="firmwareType">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{ 'firmwareType' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let client">
|
||||
<mat-chip s>
|
||||
{{ client.firmwareType ? client.firmwareType : 'N/A' }}
|
||||
</mat-chip>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="oglive">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> OG Live </th>
|
||||
<td mat-cell *matCellDef="let client"> {{ client.ogLive?.date | date }} </td>
|
||||
|
@ -429,4 +442,4 @@
|
|||
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -87,7 +87,7 @@ export class GroupsComponent implements OnInit, OnDestroy {
|
|||
{ value: 'mac', name: 'Mac' },
|
||||
];
|
||||
|
||||
displayedColumns: string[] = ['select', 'status', 'ip', 'name', 'oglive', 'subnet', 'pxeTemplate', 'actions'];
|
||||
displayedColumns: string[] = ['select', 'status', 'ip', 'firmwareType', 'name', 'oglive', 'subnet', 'pxeTemplate', 'actions'];
|
||||
|
||||
private _sort!: MatSort;
|
||||
|
||||
|
|
|
@ -105,6 +105,7 @@ export class ManageClientComponent implements OnInit {
|
|||
this.parentUnitsWithPaths = this.parentUnits.map(unit => ({
|
||||
id: unit['@id'],
|
||||
name: unit.name,
|
||||
netiface: unit.networkSettings?.netiface,
|
||||
path: this.dataService.getOrganizationalUnitPath(unit, this.parentUnits),
|
||||
repository: unit.networkSettings?.repository?.['@id'],
|
||||
hardwareProfile: unit.networkSettings?.hardwareProfile?.['@id'],
|
||||
|
@ -226,7 +227,8 @@ export class ManageClientComponent implements OnInit {
|
|||
repository: selectedUnit.repository || null,
|
||||
hardwareProfile: selectedUnit.hardwareProfile || null,
|
||||
ogLive: selectedUnit.ogLive || null,
|
||||
menu: selectedUnit.menu || null
|
||||
menu: selectedUnit.menu || null,
|
||||
netiface: selectedUnit.netiface || null,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,10 +72,4 @@ describe('OgDhcpSubnetsComponent', () => {
|
|||
expect(component).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should call syncSubnets and handle success', () => {
|
||||
component.syncSubnets();
|
||||
expect(mockHttpClient.post).toHaveBeenCalledWith(`${component.baseUrl}/subnets/sync`, {});
|
||||
expect(mockToastrService.success).toHaveBeenCalledWith('Sincronización con componente DHCP exitosa');
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
"labelOrganizationalUnit": "Organizational Unit",
|
||||
"buttonCancel": "Cancel",
|
||||
"buttonAdd": "Add",
|
||||
"firmwareType": "Firmware",
|
||||
"addRule": "Add rule",
|
||||
"rulesHeader": "Rules",
|
||||
"statusUnavailable": "Unavailable",
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
"labelOrganizationalUnit": "Unidad organizativa",
|
||||
"buttonCancel": "Cancelar",
|
||||
"buttonAdd": "Añadir",
|
||||
"firmwareType": "Firmware",
|
||||
"back": "Atrás",
|
||||
"addClientDialogTitle": "Añadir Cliente",
|
||||
"dialogTitleEditUser": "Editar usuario",
|
||||
|
|
Loading…
Reference in New Issue