refs #691. Important improvements ogDhcp. Demo
parent
54bdcd926a
commit
833a586c96
|
@ -10,17 +10,6 @@
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.images-button-row {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-start;
|
|
||||||
margin-top: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
margin-left: 10px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.divider {
|
.divider {
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
}
|
}
|
||||||
|
@ -29,22 +18,6 @@ button {
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.imagesLists-container {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card.unidad-card {
|
|
||||||
height: 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.image-container {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
border-bottom: 1px solid rgba(122, 122, 122, 0.555);
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-container {
|
.search-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
@ -59,24 +32,6 @@ button {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-container h4 {
|
|
||||||
margin: 0;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mat-icon-button {
|
|
||||||
margin-left: 16px;
|
|
||||||
align-self: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mat-menu {
|
|
||||||
min-width: 160px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.image-name{
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 50px;
|
margin-top: 50px;
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
<mat-icon>menu</mat-icon>
|
<mat-icon>menu</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<mat-menu #menu="matMenu">
|
<mat-menu #menu="matMenu">
|
||||||
<button mat-menu-item (click)="toggleAction(subnet, 'post')">Crear en og-dhcp</button>
|
<button mat-menu-item [disabled]="subnet.synchronized" (click)="toggleAction(subnet, 'post')">Crear en og-dhcp</button>
|
||||||
<button mat-menu-item (click)="addClientsToSubnet(subnet)">Añadir cliente</button>
|
<button mat-menu-item (click)="addClientsToSubnet(subnet)">Añadir cliente</button>
|
||||||
<button mat-menu-item (click)="toggleAction(subnet, 'put')">Actualizar datos en og-dhcp</button>
|
<button mat-menu-item (click)="toggleAction(subnet, 'put')">Actualizar datos en og-dhcp</button>
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
|
|
|
@ -8,6 +8,7 @@ import { DeleteModalComponent } from '../../../shared/delete_modal/delete-modal/
|
||||||
import { ToastrService } from 'ngx-toastr';
|
import { ToastrService } from 'ngx-toastr';
|
||||||
import { AddClientsToSubnetComponent } from './add-clients-to-subnet/add-clients-to-subnet.component';
|
import { AddClientsToSubnetComponent } from './add-clients-to-subnet/add-clients-to-subnet.component';
|
||||||
import {ServerInfoDialogComponent} from "./server-info-dialog/server-info-dialog.component";
|
import {ServerInfoDialogComponent} from "./server-info-dialog/server-info-dialog.component";
|
||||||
|
import {Observable} from "rxjs";
|
||||||
|
|
||||||
export interface Subnet {
|
export interface Subnet {
|
||||||
'@id': string;
|
'@id': string;
|
||||||
|
@ -52,7 +53,7 @@ export class OgDhcpSubnetsComponent {
|
||||||
{ columnDef: 'nextServer', header: 'Next Server', cell: (subnet: Subnet) => subnet.nextServer },
|
{ columnDef: 'nextServer', header: 'Next Server', cell: (subnet: Subnet) => subnet.nextServer },
|
||||||
{ columnDef: 'bootFileName', header: 'Boot File Name', cell: (subnet: Subnet) => subnet.bootFileName },
|
{ columnDef: 'bootFileName', header: 'Boot File Name', cell: (subnet: Subnet) => subnet.bootFileName },
|
||||||
{ columnDef: 'synchronized', header: 'Sincronizado', cell: (subnet: Subnet) => `${subnet.synchronized}`},
|
{ columnDef: 'synchronized', header: 'Sincronizado', cell: (subnet: Subnet) => `${subnet.synchronized}`},
|
||||||
{ columnDef: 'serverId', header: 'IP Servidor DHCP', cell: (subnet: Subnet) => subnet.serverId },
|
{ columnDef: 'serverId', header: 'Id Servidor DHCP', cell: (subnet: Subnet) => subnet.serverId },
|
||||||
{ columnDef: 'clients', header: 'Lista de clientes', cell: (subnet: Subnet) => `${subnet.clients}`},
|
{ columnDef: 'clients', header: 'Lista de clientes', cell: (subnet: Subnet) => `${subnet.clients}`},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -177,25 +178,26 @@ export class OgDhcpSubnetsComponent {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
loadAlert() {
|
loadAlert(): Observable<any> {
|
||||||
this.http.get(`${this.baseUrl}/og-dhcp/server/get-collection`)
|
return this.http.get<any>(`${this.baseUrl}/og-dhcp/server/get-collection`);
|
||||||
.subscribe(response => {
|
|
||||||
// @ts-ignore
|
|
||||||
this.alertMessage = response.message
|
|
||||||
}, error => {
|
|
||||||
console.error('Error al cargar la información del alert', error);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
openSubnetInfoDialog() {
|
openSubnetInfoDialog() {
|
||||||
this.loadAlert()
|
this.loadAlert().subscribe(
|
||||||
|
response => {
|
||||||
|
this.alertMessage = response.message;
|
||||||
|
|
||||||
this.dialog.open(ServerInfoDialogComponent, {
|
this.dialog.open(ServerInfoDialogComponent, {
|
||||||
width: '600px',
|
width: '600px',
|
||||||
data: {
|
data: {
|
||||||
alertMessage: this.alertMessage,
|
message: this.alertMessage
|
||||||
length: this.length
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
error => {
|
||||||
|
console.error('Error al cargar la información del alert', error);
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
addClientsToSubnet(subnet: Subnet) {
|
addClientsToSubnet(subnet: Subnet) {
|
||||||
|
|
Loading…
Reference in New Issue