Demo minor fix

pull/6/head
Alvaro Puente Mella 2024-08-05 16:46:40 +02:00
parent ecba08ecac
commit 2fe25308f6
9 changed files with 107 additions and 68 deletions

View File

@ -23,8 +23,6 @@ export class AcctionsModalComponent {
} }
onSend(): void { onSend(): void {
console.log('send Action');
console.log(this.selectedElements);
this.toastService.success(' Acción enviada a: ' + this.selectedElements); this.toastService.success(' Acción enviada a: ' + this.selectedElements);
} }

View File

@ -41,12 +41,12 @@ mat-card {
background-color: rgba(0, 0, 0, 0); background-color: rgba(0, 0, 0, 0);
color: black; color: black;
text-align: center; text-align: center;
padding: 10px; padding: 15px;
box-sizing: border-box; box-sizing: border-box;
} }
.client-name { .client-name {
font-size: medium; font-size: small;
font-weight: bold; font-weight: bold;
} }

View File

@ -13,9 +13,9 @@
<img mat-card-image src="assets/images/client.png" alt="Client" class="client-image" i18n-alt="@@client-image-alt"/> <img mat-card-image src="assets/images/client.png" alt="Client" class="client-image" i18n-alt="@@client-image-alt"/>
<div class="client-info"> <div class="client-info">
<div class="client-name">{{ client.name }}</div> <div class="client-name">{{ client.name }}</div>
<div class="client-details"> <!-- <div class="client-details">
<span>{{ client.ip }}</span> <span>{{ client.ip }}</span>
</div> </div> -->
</div> </div>
</div> </div>
</mat-card> </mat-card>

View File

@ -1,11 +1,6 @@
<h1 mat-dialog-title i18n="@@client-properties-title">Propiedades cliente</h1> <h1 mat-dialog-title i18n="@@client-properties-title">Propiedades cliente</h1>
<mat-dialog-content> <mat-dialog-content>
<mat-tab-group dynamicHeight> <mat-tab-group dynamicHeight>
<mat-tab label="Datos generales" i18n-tab="@@general-data-tab">Datos generales</mat-tab>
<mat-tab label="Propiedades de red" i18n-tab="@@network-properties-tab">Propiedades de red</mat-tab>
<mat-tab label="Propiedades del aula" i18n-tab="@@classroom-properties-tab">Propiedades del aula</mat-tab>
<mat-tab label="Acciones" i18n-tab="@@actions-tab">Acciones</mat-tab>
<mat-tab label="Particiones" i18n-tab="@@partitions-tab">Particiones</mat-tab>
<mat-tab label="Datos generales"> <mat-tab label="Datos generales">
<table mat-table [dataSource]="generalData" class="mat-elevation-z8"> <table mat-table [dataSource]="generalData" class="mat-elevation-z8">

View File

@ -152,7 +152,7 @@
</mat-card> </mat-card>
</div> </div>
</mat-tab> </mat-tab>
<mat-tab label="Búsqueda avanzada" > <mat-tab i18n-label label="Búsqueda avanzada" >
<h2 class="title" i18n="@@searchTitle">Búsqueda</h2> <h2 class="title" i18n="@@searchTitle">Búsqueda</h2>
<div class="container"> <div class="container">
<div class="header"> <div class="header">
@ -194,8 +194,8 @@
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<mat-label i18n="@@selectAnotherOptionLabel" class="temp_filter">Planta</mat-label> <mat-label i18n="@@floorLabel" class="temp_filter">Planta</mat-label>
<mat-select [(value)]="selectedFilter1" (selectionChange)="applyFilter()"> <mat-select [(value)]="selectedFilter1">
<mat-option value="none" i18n="@@noneOption">Ninguno</mat-option> <mat-option value="none" i18n="@@noneOption">Ninguno</mat-option>
<mat-option value="option1" i18n="@@option1">Planta 1</mat-option> <mat-option value="option1" i18n="@@option1">Planta 1</mat-option>
<mat-option value="option2" i18n="@@option2">Planta 2</mat-option> <mat-option value="option2" i18n="@@option2">Planta 2</mat-option>
@ -211,7 +211,7 @@
<mat-form-field> <mat-form-field>
<mat-label i18n="@@selectAnotherOptionLabel" class="temp_filter">Sistema Operativo</mat-label> <mat-label i18n="@@selectAnotherOptionLabel" class="temp_filter">Sistema Operativo</mat-label>
<mat-select multiple> <mat-select multiple [(value)]="selectedFilterOS" >
<mat-option value="none" i18n="@@noneOption">Ninguno</mat-option> <mat-option value="none" i18n="@@noneOption">Ninguno</mat-option>
<mat-option value="Windows 10 Education 1803 64 bits">Windows 10 Education 1803 64 bits</mat-option> <mat-option value="Windows 10 Education 1803 64 bits">Windows 10 Education 1803 64 bits</mat-option>
<mat-option value="Ubuntu 18.04.1 LTS 64 bits">Ubuntu 18.04.1 LTS 64 bits</mat-option> <mat-option value="Ubuntu 18.04.1 LTS 64 bits">Ubuntu 18.04.1 LTS 64 bits</mat-option>
@ -289,7 +289,7 @@
<mat-form-field> <mat-form-field>
<mat-label i18n="@@selectStateLabel" class="temp_filter">Estado</mat-label> <mat-label i18n="@@selectStateLabel" class="temp_filter">Estado</mat-label>
<mat-select multiple> <mat-select multiple [(value)]="selectedFilterStatus">
<mat-option value="off" i18n="@@offOption">off</mat-option> <mat-option value="off" i18n="@@offOption">off</mat-option>
<mat-option value="initializing" i18n="@@initializingOption">initializing</mat-option> <mat-option value="initializing" i18n="@@initializingOption">initializing</mat-option>
<mat-option value="oglive" i18n="@@ogliveOption">oglive</mat-option> <mat-option value="oglive" i18n="@@ogliveOption">oglive</mat-option>
@ -304,18 +304,18 @@
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<mat-label class="temp_filter">IP</mat-label> <mat-label class="temp_filter">IP</mat-label>
<input matInput placeholder="Dírección IP" i18n> <input matInput placeholder="Dírección IP" i18n [(ngModel)]="filterIP">
</mat-form-field> </mat-form-field>
<mat-form-field class="example-full-width" > <mat-form-field class="example-full-width" >
<mat-label class="temp_filter">MAC</mat-label> <mat-label class="temp_filter">MAC</mat-label>
<input matInput placeholder="Dírección IP" i18n > <input matInput placeholder="Dírección IP" i18n [(ngModel)]="filterMAC">
</mat-form-field> </mat-form-field>
</ng-container> </ng-container>
<button mat-raised-button color="primary" (click)="saveFilters()" i18n="@@saveFiltersButton">Guardar Filtros</button> <button mat-raised-button color="primary" (click)="saveFilters()" i18n="@@saveFiltersButton">Guardar Filtros</button>
<button mat-raised-button color="accent" (click)="sendActions()" i18n="@@saveFiltersButton" [disabled]="selectedElements.length === 0">Enviar Acción</button> <button mat-raised-button color="accent" (click)="sendActions()" i18n="@@sendFiltersButton" [disabled]="selectedElements.length === 0">Enviar Acción</button>
</div> </div>
<div class="results"> <div class="results">
<ng-container *ngIf="filteredResults && filteredResults.length > 0; else noResults"> <ng-container *ngIf="filteredResults && filteredResults.length > 0; else noResults">

View File

@ -39,6 +39,12 @@ export class GroupsComponent implements OnInit {
searchTerm: string = ''; searchTerm: string = '';
selectedFilter1: string = 'none'; selectedFilter1: string = 'none';
selectedFilter2: string = 'none'; selectedFilter2: string = 'none';
selectedFilterOS: string[] = [];
selectedFilterStatus: string[] = [];
filterIP: string = '';
filterMAC: string = '';
filterName: string = ''; filterName: string = '';
filteredResults: any[] = []; filteredResults: any[] = [];
savedFilterNames: any[] = []; savedFilterNames: any[] = [];
@ -329,7 +335,12 @@ export class GroupsComponent implements OnInit {
filters: { filters: {
filter0: this.filterName, filter0: this.filterName,
filter1: this.selectedFilter1, filter1: this.selectedFilter1,
filter2: this.selectedFilter2 filter2: this.selectedFilter2,
filter3: this.selectedFilterOS,
filter4: this.selectedFilterStatus,
filter5: this.filterIP,
filter6: this.filterMAC,
} }
}; };
@ -355,6 +366,12 @@ export class GroupsComponent implements OnInit {
this.filterName = response.filters.filter0 || ''; this.filterName = response.filters.filter0 || '';
this.selectedFilter1 = response.filters.filter1 || null; this.selectedFilter1 = response.filters.filter1 || null;
this.selectedFilter2 = response.filters.filter2 || ''; this.selectedFilter2 = response.filters.filter2 || '';
this.selectedFilterOS = response.filters.filter3 || [];
this.selectedFilterStatus = response.filters.filter4 || [];
this.filterIP = response.filters.filter5 || '';
this.filterMAC = response.filters.filter6 || '';
this.applyFilter(); this.applyFilter();
} }
}, error => { }, error => {

View File

@ -50,4 +50,5 @@ export class HeaderComponent implements OnInit {
console.log("User edited successfully!") console.log("User edited successfully!")
}); */ }); */
} }
} }

View File

@ -1,19 +1,20 @@
{ {
"locale": "en", "locale": "en",
"translations": { "translations": {
"digital-board": "Digital board", "actions-modal-title": "Actions",
"projector-alt": "Projector",
"client-image-alt": "Client",
"save-disposition-button": "Save layout",
"client-properties-title": "Client Properties",
"property-header": "Property",
"value-header": "Value",
"power-on-button": "Power On", "power-on-button": "Power On",
"power-off-button": "Power Off", "power-off-button": "Power Off",
"reset-button": "Reset", "reset-button": "Reset",
"other-actions-1": "Other actions 1", "other-actions-1": "Other Actions 1",
"other-actions-2": "Other actions 2", "other-actions-2": "Other Actions 2",
"other-actions-3": "Other actions 3", "other-actions-3": "Other Actions 3",
"digital-board": "Digital Board",
"projector-alt": "Projector",
"client-image-alt": "Client",
"save-disposition-button": "Save Disposition",
"client-properties-title": "Client Properties",
"property-header": "Property",
"value-header": "Value",
"close-button": "Close", "close-button": "Close",
"add-client-dialog-title": "Add Client", "add-client-dialog-title": "Add Client",
"organizational-unit-label": "Parent", "organizational-unit-label": "Parent",
@ -35,9 +36,9 @@
"add-button": "Add", "add-button": "Add",
"edit-client-dialog-title": "Edit Client", "edit-client-dialog-title": "Edit Client",
"delete-dialog-title": "Delete", "delete-dialog-title": "Delete",
"delete-dialog-content": "Do you want to delete the clients located in {$INTERPOLATION} or move them to the top level?", "delete-dialog-content": "Do you want to delete the clients located in {$INTERPOLATION} or do you want to relocate them to the higher level?",
"delete-all-clients-button": "Delete all clients", "delete-all-clients-button": "Delete all clients",
"reposition-clients-button": "Reposition", "reposition-clients-button": "Relocate",
"deleteDialogTitle": "Delete", "deleteDialogTitle": "Delete",
"deleteConfirmationMessage": "Are you sure you want to delete {$INTERPOLATION}?", "deleteConfirmationMessage": "Are you sure you want to delete {$INTERPOLATION}?",
"cancelButton": "Cancel", "cancelButton": "Cancel",
@ -46,17 +47,17 @@
"newOrganizationalUnitButton": "New Organizational Unit", "newOrganizationalUnitButton": "New Organizational Unit",
"newClientButton": "New Client", "newClientButton": "New Client",
"legendButton": "Legend", "legendButton": "Legend",
"classroomMapButton": "Classroom Layout", "classroomMapButton": "Classroom Map",
"searchLabel": "Search", "searchLabel": "Search",
"searchPlaceholder": "Search", "searchPlaceholder": "Search",
"searchHint": "Press 'enter' to search among organizational units", "searchHint": "Press 'enter' to search among organizational units",
"organizationalUnitTitle": "Organizational Unit", "organizationalUnitTitle": "Organizational Unit",
"viewTreeTooltip": "account_tree ", "viewTreeTooltip": "account_tree ",
"viewTreeMenu": "View Organization Chart", "viewTreeMenu": "View Organizational Chart",
"editUnitTooltip": "edit ", "editUnitTooltip": "edit ",
"editUnitMenu": "Edit", "editUnitMenu": "Edit",
"viewUnitTool": "visibility ", "viewUnitTool": "visibility ",
"viewUnitMenu": "View Details", "viewUnitMenu": "View Data",
"addInternalUnitTool": "add_home_work ", "addInternalUnitTool": "add_home_work ",
"addInternalUnitMenu": "Add Organizational Unit", "addInternalUnitMenu": "Add Organizational Unit",
"addClientDevice": "devices ", "addClientDevice": "devices ",
@ -70,9 +71,10 @@
"addClientTooltip": "devices", "addClientTooltip": "devices",
"deleteElementTooltip": "delete", "deleteElementTooltip": "delete",
"deleteElementMenu": "Delete Element", "deleteElementMenu": "Delete Element",
"7122753603772512402": "Advanced Search",
"searchTitle": "Search", "searchTitle": "Search",
"selectFilterLabel": "Select filter", "selectFilterLabel": "Select Filter",
"selectOptionLabel": "Select an option", "selectOptionLabel": "Select an Option",
"organizationalUnitsOption": "Organizational Units", "organizationalUnitsOption": "Organizational Units",
"clientsOption": "Clients", "clientsOption": "Clients",
"nameLabel": "Name", "nameLabel": "Name",
@ -82,13 +84,25 @@
"classroomsGroupOption": "Classroom Groups", "classroomsGroupOption": "Classroom Groups",
"classroomOption": "Classrooms", "classroomOption": "Classrooms",
"clientGroupOption": "Client Groups", "clientGroupOption": "Client Groups",
"selectAnotherOptionLabel": "Select another option", "floorLabel": "Floor",
"noneOption": "None", "noneOption": "None",
"option1": "Option 1", "option1": "Floor 1",
"option2": "Option 2", "option2": "Floor 2",
"option3": "Option 3", "option3": "Floor 3",
"selectAnotherOptionLabel": "Operating System",
"selectStateLabel": "State",
"offOption": "off",
"initializingOption": "initializing",
"ogliveOption": "oglive",
"busyOption": "busy",
"linuxOption": "linux",
"linuxSessionOption": "linux_session",
"macosOption": "macos",
"windowsOption": "windows",
"windowsSessionOption": "windows_session",
"saveFiltersButton": "Save Filters", "saveFiltersButton": "Save Filters",
"internalUnits": "Internal Units: {$INTERPOLATION}", "sendFiltersButton": "Send Action",
"internalUnits": "Internal units: {$INTERPOLATION}",
"clients": "Clients: {$INTERPOLATION}", "clients": "Clients: {$INTERPOLATION}",
"noResultsMessage": "No results to display.", "noResultsMessage": "No results to display.",
"orgUnitTitle": "Organizational Unit", "orgUnitTitle": "Organizational Unit",
@ -137,12 +151,12 @@
"2366056895545879062": "Power On", "2366056895545879062": "Power On",
"7368908909686115507": "Power Off", "7368908909686115507": "Power Off",
"7760171369336053154": "Reset", "7760171369336053154": "Reset",
"6799187990933478083": "Other actions 1", "6799187990933478083": "Other Actions 1",
"8971534271481971645": "Other actions 2", "8971534271481971645": "Other Actions 2",
"3300614831699539964": "Other actions 3", "3300614831699539964": "Other Actions 3",
"viewTreeTitle": "View Organizational Unit Tree", "viewTreeTitle": "View Organizational Unit Tree",
"closeButton": "Close", "closeButton": "Close",
"webConsoleTitle": "Opengnsys Web Console", "webConsoleTitle": "Opengnsys Webconsole",
"admin": "Administration", "admin": "Administration",
"editUser": "Edit User", "editUser": "Edit User",
"usersMenuItem": "Users", "usersMenuItem": "Users",
@ -160,18 +174,18 @@
"headerOpengnsys": "Opengnsys", "headerOpengnsys": "Opengnsys",
"loginlabelUsername": "Enter your username", "loginlabelUsername": "Enter your username",
"loginlabelPassword": "Enter your password", "loginlabelPassword": "Enter your password",
"buttonLogin": "Log In", "buttonLogin": "Login",
"labelUsers": "Users", "labelUsers": "Users",
"labelRoles": "Roles", "labelRoles": "Roles",
"dialogTitleAddRole": "Add Role (TBD)", "dialogTitleAddRole": "Add Role (TBD)",
"labelRoleName": "Name", "labelRoleName": "Name",
"sectionTitlePermissions": "Permissions:", "sectionTitlePermissions": "Permissions:",
"checkboxManageUsers": "Manage users", "checkboxManageUsers": "Manage Users",
"checkboxPXEConfig": "PXE Configuration", "checkboxPXEConfig": "PXE Configuration",
"checkboxConsoleImages": "Web Console Images", "checkboxConsoleImages": "Web Console Images",
"checkboxManageComponents": "Manage various components", "checkboxManageComponents": "Manage Different Components",
"checkboxCreateImages": "Create images", "checkboxCreateImages": "Create Images",
"checkboxServerConfigScript": "Server configuration script", "checkboxServerConfigScript": "Server Configuration Script",
"checkboxOther": "...", "checkboxOther": "...",
"buttonCancel": "Cancel", "buttonCancel": "Cancel",
"buttonAdd": "Add", "buttonAdd": "Add",

View File

@ -1,6 +1,13 @@
{ {
"locale": "es", "locale": "es",
"translations": { "translations": {
"actions-modal-title": "Acciones",
"power-on-button": "Encender",
"power-off-button": "Apagar",
"reset-button": "Resetear",
"other-actions-1": "Otras acciones 1",
"other-actions-2": "Otras acciones 2",
"other-actions-3": "Otras acciones 3",
"digital-board": "Pizarra digital", "digital-board": "Pizarra digital",
"projector-alt": "Proyector", "projector-alt": "Proyector",
"client-image-alt": "Client", "client-image-alt": "Client",
@ -8,12 +15,6 @@
"client-properties-title": "Propiedades cliente", "client-properties-title": "Propiedades cliente",
"property-header": "Propiedad", "property-header": "Propiedad",
"value-header": "Valor", "value-header": "Valor",
"power-on-button": "Encender",
"power-off-button": "Apagar",
"reset-button": "Resetear",
"other-actions-1": "Otras acciones 1",
"other-actions-2": "Otras acciones 2",
"other-actions-3": "Otras acciones 3",
"close-button": "Cerrar", "close-button": "Cerrar",
"add-client-dialog-title": "Añadir Cliente", "add-client-dialog-title": "Añadir Cliente",
"organizational-unit-label": "Padre", "organizational-unit-label": "Padre",
@ -70,6 +71,7 @@
"addClientTooltip": "devices", "addClientTooltip": "devices",
"deleteElementTooltip": "delete", "deleteElementTooltip": "delete",
"deleteElementMenu": "Borrar elemento", "deleteElementMenu": "Borrar elemento",
"7122753603772512402": "Búsqueda avanzada",
"searchTitle": "Búsqueda", "searchTitle": "Búsqueda",
"selectFilterLabel": "Seleccione filtro", "selectFilterLabel": "Seleccione filtro",
"selectOptionLabel": "Selecciona una opción", "selectOptionLabel": "Selecciona una opción",
@ -82,12 +84,24 @@
"classroomsGroupOption": "Grupos de aulas", "classroomsGroupOption": "Grupos de aulas",
"classroomOption": "Aulas", "classroomOption": "Aulas",
"clientGroupOption": "Grupos de clientes", "clientGroupOption": "Grupos de clientes",
"selectAnotherOptionLabel": "Selecciona otra opción", "floorLabel": "Planta",
"noneOption": "Ninguno", "noneOption": "Ninguno",
"option1": "Opción 1", "option1": "Planta 1",
"option2": "Opción 2", "option2": "Planta 2",
"option3": "Opción 3", "option3": "Planta 3",
"selectAnotherOptionLabel": "Sistema Operativo",
"selectStateLabel": "Estado",
"offOption": "off",
"initializingOption": "initializing",
"ogliveOption": "oglive",
"busyOption": "busy",
"linuxOption": "linux",
"linuxSessionOption": "linux_session",
"macosOption": "macos",
"windowsOption": "windows",
"windowsSessionOption": "windows_session",
"saveFiltersButton": "Guardar Filtros", "saveFiltersButton": "Guardar Filtros",
"sendFiltersButton": "Enviar Acción",
"internalUnits": "Unidades internas: {$INTERPOLATION}", "internalUnits": "Unidades internas: {$INTERPOLATION}",
"clients": "Clientes: {$INTERPOLATION}", "clients": "Clientes: {$INTERPOLATION}",
"noResultsMessage": "No hay resultados para mostrar.", "noResultsMessage": "No hay resultados para mostrar.",