diff --git a/ogWebconsole/src/app/components/ogdhcp/operation-result-dialog/operation-result-dialog.component.spec.ts b/ogWebconsole/src/app/components/ogdhcp/operation-result-dialog/operation-result-dialog.component.spec.ts index 21f235c..54efba1 100644 --- a/ogWebconsole/src/app/components/ogdhcp/operation-result-dialog/operation-result-dialog.component.spec.ts +++ b/ogWebconsole/src/app/components/ogdhcp/operation-result-dialog/operation-result-dialog.component.spec.ts @@ -1,5 +1,5 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; - +import { MatDialogModule, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { OperationResultDialogComponent } from './operation-result-dialog.component'; describe('OperationResultDialogComponent', () => { @@ -8,7 +8,12 @@ describe('OperationResultDialogComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [OperationResultDialogComponent] + declarations: [OperationResultDialogComponent], + imports: [MatDialogModule], + providers: [ + { provide: MatDialogRef, useValue: {} }, + { provide: MAT_DIALOG_DATA, useValue: { success: [], errors: [] } } + ] }) .compileComponents(); @@ -20,4 +25,4 @@ describe('OperationResultDialogComponent', () => { it('should create', () => { expect(component).toBeTruthy(); }); -}); +}); \ No newline at end of file diff --git a/ogWebconsole/src/app/components/ogdhcp/show-clients/show-clients.component.html b/ogWebconsole/src/app/components/ogdhcp/show-clients/show-clients.component.html index 0e16228..2c6c669 100644 --- a/ogWebconsole/src/app/components/ogdhcp/show-clients/show-clients.component.html +++ b/ogWebconsole/src/app/components/ogdhcp/show-clients/show-clients.component.html @@ -4,32 +4,36 @@
- + Buscar nombre del cliente - + search - Pulsar 'enter' para buscar Buscar IP - + search - Pulsar 'enter' para buscar Buscar Mac - + search - Pulsar 'enter' para buscar @@ -38,13 +42,12 @@ + text="Visualiza y administra las subredes listadas según los filtros aplicados.">
{{ column.header }} - Client Icon + Client Icon @@ -62,9 +65,9 @@
+ text="Navega entre las páginas de subredes usando el paginador."> + (page)="onPageChange($event)">
@@ -72,4 +75,4 @@ - + \ No newline at end of file diff --git a/ogWebconsole/src/app/components/ogdhcp/show-clients/show-clients.component.spec.ts b/ogWebconsole/src/app/components/ogdhcp/show-clients/show-clients.component.spec.ts index 5a64023..be1714b 100644 --- a/ogWebconsole/src/app/components/ogdhcp/show-clients/show-clients.component.spec.ts +++ b/ogWebconsole/src/app/components/ogdhcp/show-clients/show-clients.component.spec.ts @@ -1,22 +1,22 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; - import { ShowClientsComponent } from './show-clients.component'; -import {MatExpansionModule} from "@angular/material/expansion"; -import {MatIconModule} from "@angular/material/icon"; -import {MatDividerModule} from "@angular/material/divider"; -import {MatFormFieldModule} from "@angular/material/form-field"; -import {MatSelectModule} from "@angular/material/select"; -import {MatPaginatorModule} from "@angular/material/paginator"; -import {BrowserAnimationsModule} from "@angular/platform-browser/animations"; -import {FormsModule} from "@angular/forms"; -import {MatInputModule} from "@angular/material/input"; -import {MatTableModule} from "@angular/material/table"; -import {TranslateModule} from "@ngx-translate/core"; -import {JoyrideModule} from "ngx-joyride"; -import {MatDialog, MatDialogModule, MatDialogRef} from "@angular/material/dialog"; -import {HttpClient} from "@angular/common/http"; -import {ToastrService} from "ngx-toastr"; -import {of} from "rxjs"; +import { MatExpansionModule } from "@angular/material/expansion"; +import { MatIconModule } from "@angular/material/icon"; +import { MatDividerModule } from "@angular/material/divider"; +import { MatFormFieldModule } from "@angular/material/form-field"; +import { MatSelectModule } from "@angular/material/select"; +import { MatPaginatorModule } from "@angular/material/paginator"; +import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; +import { FormsModule } from "@angular/forms"; +import { MatInputModule } from "@angular/material/input"; +import { MatTableModule } from "@angular/material/table"; +import { TranslateModule } from "@ngx-translate/core"; +import { JoyrideModule } from "ngx-joyride"; +import { MatDialog, MatDialogModule, MatDialogRef, MAT_DIALOG_DATA } from "@angular/material/dialog"; +import { HttpClient } from "@angular/common/http"; +import { ToastrService } from "ngx-toastr"; +import { of } from "rxjs"; +import { LoadingComponent } from '../../../shared/loading/loading.component'; describe('ShowClientsComponent', () => { let component: ShowClientsComponent; @@ -33,7 +33,7 @@ describe('ShowClientsComponent', () => { mockHttpClient.post.and.returnValue(of({})); await TestBed.configureTestingModule({ - declarations: [ShowClientsComponent], + declarations: [ShowClientsComponent, LoadingComponent], imports: [ MatExpansionModule, MatIconModule, @@ -53,13 +53,11 @@ describe('ShowClientsComponent', () => { { provide: MatDialog, useValue: mockDialog }, { provide: HttpClient, useValue: mockHttpClient }, { provide: ToastrService, useValue: mockToastrService }, - { - provide: MatDialogRef, - useValue: {} - }, + { provide: MatDialogRef, useValue: {} }, + { provide: MAT_DIALOG_DATA, useValue: {} }, ], }) - .compileComponents(); + .compileComponents(); fixture = TestBed.createComponent(ShowClientsComponent); component = fixture.componentInstance; @@ -69,4 +67,4 @@ describe('ShowClientsComponent', () => { it('should create', () => { expect(component).toBeTruthy(); }); -}); +}); \ No newline at end of file diff --git a/ogWebconsole/src/app/components/ogdhcp/show-clients/show-clients.component.ts b/ogWebconsole/src/app/components/ogdhcp/show-clients/show-clients.component.ts index 0b50afc..ddff94b 100644 --- a/ogWebconsole/src/app/components/ogdhcp/show-clients/show-clients.component.ts +++ b/ogWebconsole/src/app/components/ogdhcp/show-clients/show-clients.component.ts @@ -1,10 +1,10 @@ -import {Component, Inject, OnInit} from '@angular/core'; -import {ToastrService} from "ngx-toastr"; -import {HttpClient} from "@angular/common/http"; -import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from "@angular/material/dialog"; -import {MatTableDataSource} from "@angular/material/table"; -import {Subnet} from "../og-dhcp-subnets.component"; -import {Client} from "../../groups/model/model"; +import { Component, Inject, OnInit } from '@angular/core'; +import { ToastrService } from "ngx-toastr"; +import { HttpClient } from "@angular/common/http"; +import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from "@angular/material/dialog"; +import { MatTableDataSource } from "@angular/material/table"; +import { Subnet } from "../og-dhcp-subnets.component"; +import { Client } from "../../groups/model/model"; @Component({ selector: 'app-show-clients',